From f2770070353803bbb0e8a05cb77de09a2d6125ac Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Wed, 15 Sep 2021 19:11:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.interceptor.js | 3 ++- manifest.json | 4 ++-- pages/login/index.vue | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 8e8a454..1862504 100644 --- a/common/http.interceptor.js +++ b/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); diff --git a/manifest.json b/manifest.json index 25bbc5f..477adb2 100644 --- a/manifest.json +++ b/manifest.json @@ -50,9 +50,9 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wx27c51a989127de12", + "appid" : "wxeb58570b5e04d147", "setting" : { - "urlCheck" : false, + "urlCheck" : true, "es6" : false, "postcss" : true }, diff --git a/pages/login/index.vue b/pages/login/index.vue index 7c35ef7..16c4147 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -110,6 +110,8 @@ setTimeout(() => { this.$toBack(); }, 1000); + }).catch(err => { + this.$msg(JSON.stringify(err)); }) } }