var storage = require('../common/storage.js'); function srcFn(url,isLogin){ if(isLogin && !storage.getUserToken()){ uni.navigateTo({ url:'/pages/loginRegister/login' }) return } uni.navigateTo({ url, }) } export default { install: function (vm) { vm.prototype.$srcFn = srcFn; }, };