Browse Source

错误提示

master
Enzo 4 years ago
parent
commit
f277007035
  1. 3
      common/http.interceptor.js
  2. 4
      manifest.json
  3. 2
      pages/login/index.vue

3
common/http.interceptor.js

@ -20,12 +20,13 @@ const install = (Vue, vm) => {
return true;
};
let that = this;
// 响应拦截
Vue.prototype.$u.http.interceptor.response = res => {
if(res.code == 0) {
return res;
} else if(res.code == -2) {
this.$url('/page/login/index');
that.$url('/page/login/index');
uni.clearStorageSync('userinfo');
}else {
vm.$msg(res.msg);

4
manifest.json

@ -50,9 +50,9 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx27c51a989127de12",
"appid" : "wxeb58570b5e04d147",
"setting" : {
"urlCheck" : false,
"urlCheck" : true,
"es6" : false,
"postcss" : true
},

2
pages/login/index.vue

@ -110,6 +110,8 @@
setTimeout(() => {
this.$toBack();
}, 1000);
}).catch(err => {
this.$msg(JSON.stringify(err));
})
}
}

Loading…
Cancel
Save