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