From 7324e194981d4c6a8b53c41361447291d4b9e10e Mon Sep 17 00:00:00 2001 From: yangjie <812952667@qq.com> Date: Tue, 17 Aug 2021 14:50:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E6=8E=88=E6=9D=83=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 16 ++++++++-------- Utils/Request.js | 2 +- Utils/bRequest.js | 2 +- pages.json | 13 +++++++++++++ pages/login/loginInvalid/loginInvalid.vue | 22 ++++++++++++++++++++++ 5 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 pages/login/loginInvalid/loginInvalid.vue diff --git a/App.vue b/App.vue index 8718b2d..3886872 100644 --- a/App.vue +++ b/App.vue @@ -5,15 +5,15 @@ // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 - // url: 'https://hsg.dctpay.com/crest', - // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // brestUrl : 'https://hsg.dctpay.com/brest', - // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', + url: 'https://hsg.dctpay.com/crest', + imgUrl: 'https://hsg.dctpay.com/filesystem/', + brestUrl : 'https://hsg.dctpay.com/brest', + imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', //测试 - url: 'https://hsgcs.dctpay.com/crest', - brestUrl : 'https://hsgcs.dctpay.com/brest', - imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + // url: 'https://hsgcs.dctpay.com/crest', + // brestUrl : 'https://hsgcs.dctpay.com/brest', + // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', userInfo: "", brestUserInfo : '', openId: '', diff --git a/Utils/Request.js b/Utils/Request.js index 8068674..c51641c 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -13,7 +13,7 @@ function request(method, url, data) { }, //有的时候这里不一定是 token 还可能是 Authorization success(res) { resolve(res) - if(res.statusCode == 401 || res.data.return_code == 102068){ + if(res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code == 104001){ uni.showToast({ title:'登录信息过期,请重新授权', icon:'none', diff --git a/Utils/bRequest.js b/Utils/bRequest.js index 432f0dc..b623110 100644 --- a/Utils/bRequest.js +++ b/Utils/bRequest.js @@ -13,7 +13,7 @@ function requestbrest(method, url, data) { }, success(res) { resolve(res) - if (res.statusCode == 401 || res.statusCode == 102068) { + if (res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code == 104001) { uni.showToast({ title: '登录信息过期,请重新授权', icon: 'none', diff --git a/pages.json b/pages.json index 01f3084..45d984d 100644 --- a/pages.json +++ b/pages.json @@ -463,6 +463,19 @@ } } + ,{ + "path" : "pages/login/loginInvalid/loginInvalid", + "style" : + { + "enablePullDownRefresh": false, + "navigationBarTitleText": "", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "navigationBarTextStyle": "white" + } + + } ], "globalStyle": { diff --git a/pages/login/loginInvalid/loginInvalid.vue b/pages/login/loginInvalid/loginInvalid.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/login/loginInvalid/loginInvalid.vue @@ -0,0 +1,22 @@ + + + + +