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 {