From 6e067aa0830ab613905c6c71874170b21136e676 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期五, 18 十月 2024 09:34:07 +0800 Subject: [PATCH] update 打印的,去掉一种不需要的编码格式euc-kr来减少包大小 --- 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