From b3c745650301859ef6daa5063f5db03b35c7dffc Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 16 Sep 2025 14:35:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(request):=20=E8=8E=B7=E5=8F=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E5=A4=B1=E8=B4=A5=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/request.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/request.js b/config/request.js index 0cf3490..a3863ea 100644 --- a/config/request.js +++ b/config/request.js @@ -78,6 +78,20 @@ module.exports = vm => { }) }, 1500) } else if (data.code == 500) { + if (['/member/api/member/get-info'].includes(response?.config?.url)) { + uni.showToast({ + title: '登录失败', + icon: 'none', + duration: 800, + }) + setTimeout(() => { + uni.reLaunch({ + url: '/pages/login/index', + }) + }, 800) + removeToken() + return data + } uni.$u.toast(data.msg) return data } else {