From d0395c1508c147e5f4ae98919390893dfcc3b68b Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 18 Mar 2024 14:08:36 +0800 Subject: [PATCH] =?UTF-8?q?token=E9=80=80=E5=87=BA=E5=90=8E=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.vue | 2 +- static/.DS_Store | Bin 8196 -> 10244 bytes utils/request.js | 2 +- vuex/modules/user.js | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index abea9b4..d7241d4 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -67,7 +67,7 @@ }) }, Quit () { - this.$store.dispatch('delUserInfo') + this.$store.dispatch('delUserInfo', '') uni.redirectTo({ url: '/pages/login/login' }) diff --git a/static/.DS_Store b/static/.DS_Store index 66033672e96d7be6304d6c47dc4c4438bf725a86..ff5d2ef21865b7fc7fe7faff6f52ad390c3c5e65 100644 GIT binary patch delta 723 zcmZp1XbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~50D9Q`uFar4u3~3Dc40#MCo;mr+ z8w;ngPi)}b%+A5W!N@yVK} { content: `${res[1].data.message}`, showCancel: false }) - store.dispatch('delUserInfo') + store.dispatch('delUserInfo', '') uni.redirectTo({ url: '/pages/login/login' }) diff --git a/vuex/modules/user.js b/vuex/modules/user.js index 12b88c3..5d9c208 100644 --- a/vuex/modules/user.js +++ b/vuex/modules/user.js @@ -39,6 +39,7 @@ const actions = { }, delUserInfo({commit}, res) { uni.clearStorageSync('userInfo') + uni.clearStorageSync('saveToken') commit(types.DEL_USER_INFO, res) }, saveToken({commit}, res) { @@ -63,6 +64,7 @@ const mutations = { }, [types.DEL_USER_INFO] (state, res) { state.userInfo = res + state.saveToken = res }, [types.SAVE_TOKEN] (state, res) { state.saveToken = res