From 9e85ccfb80b8aee78690fbd17e6e00d0fad79496 Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Thu, 25 Jul 2024 11:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B0=81=E8=A3=85=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/globalJs/request.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/globalJs/request.js b/common/globalJs/request.js index 05b44fe..c9e5820 100644 --- a/common/globalJs/request.js +++ b/common/globalJs/request.js @@ -67,13 +67,15 @@ class Request { if (_this.resInterceptors && typeof _this.resInterceptors === 'function') { let resInterceptors = _this.resInterceptors(res); // console.log('resInterceptors-----------------',resInterceptors) - if(resInterceptors.statusCode == 400 || resInterceptors.data.code == 403){ + if(resInterceptors.statusCode == 401 || resInterceptors.data.code == 403){ $.toast('登录信息已过期,请重新登录') $.removeData('token') setTimeout(() => { $.openNew('/pages/logIn/logIn') },1500) return + }else if(resInterceptors.statusCode != 200){ + $.toast(resInterceptors.data.message) } if (!resInterceptors && resInterceptors != '') { reject('返回值已被您拦截!');