From 05bd41aab8c9dba2cf7afcd78493415761f11d9d Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 26 九月 2024 08:54:08 +0800
Subject: [PATCH] update 供应商刷新问题
---
plugins/http.js | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/plugins/http.js b/plugins/http.js
index 083f90c..59919fb 100644
--- a/plugins/http.js
+++ b/plugins/http.js
@@ -72,7 +72,7 @@
code: 0,
msg: ''
})
- } else if (res.data.code === '3000' || res.data && res.data.code &&
+ } else if (res.data.code === '3000' || res.data.code === '30000' || res.data && res.data.code &&
res.data.code.startsWith('3000')) {
let validmsg = ''
if (Array.isArray(res.data.data)) {
@@ -109,8 +109,10 @@
res.data.code.startsWith('401')) {
console.log('resp', res)
// storage.removeItem('token')
- await store.dispatch('logout')
- message.showToast('登录信息失效')
+ // await store.dispatch('logout')
+ store.commit('updateLogin', false)
+
+ await message.showToast('登录信息失效')
// #ifdef PUB_CUSTOMER
uni.reLaunch({
@@ -151,9 +153,10 @@
// commit('updat')
// store.commit('updateLogin', false)
console.log('401', res)
- storage.removeItem('token')
- await store.dispatch('logout')
- message.showToast('登录信息失效')
+ // storage.removeItem('token')
+ // await store.dispatch('logout')
+ store.commit('updateLogin', false)
+ await message.showToast('登录信息失效')
// #ifdef PUB_CUSTOMER
--
Gitblit v1.9.3