From 104ee6bf19e01347e9dc1cf1044458e756a02d11 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Fri, 5 Jan 2024 10:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=99=BB=E5=BD=95=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/request/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/request/index.js b/utils/request/index.js index 8db227c..3b858f7 100644 --- a/utils/request/index.js +++ b/utils/request/index.js @@ -109,6 +109,14 @@ $http.dataFactory = async res => { }) } + // 提示登录 + if(res.response.statusCode==401){ + return Promise.reject({ + statusCode: res.response.statusCode, + errMsg: '登录失效了,请重新登录系统' + }) + } + // console.log("rsp",res.response) let httpData = res.response.data