From 1e397165245be367eb633723c1a56186fdc8626d Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 12 Jun 2025 17:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E6=A3=80=E8=B7=B3=E8=BD=AC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/yjCanteen.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/yjCanteen.vue b/pages/yjCanteen.vue index c609563..0f0c5a0 100644 --- a/pages/yjCanteen.vue +++ b/pages/yjCanteen.vue @@ -9,6 +9,7 @@ import { getToken } from '@/utils/auth'; + import Cookies from "js-cookie"; // import '@/utils/webview.js' let wv // 计划创建的webview export default { @@ -55,14 +56,19 @@ url: '/pages/system' }); }else if (event.data.data.arg.action == 'logOut') { - uni.reLaunch({ - url: '/pages/login' - }); + // uni.reLaunch({ + // url: '/pages/login' + // }); + this.$store.dispatch('LogOut').then(() => { + uni.removeStorageSync('token') + Cookies.remove('token') + uni.reLaunch({ url: '/pages/login' }) + }) }else if (event.data.data.arg.action == 'sbdCanteen') {// 跳转到sbd食堂 // uni.reLaunch({ // url: '/pages/index' // 测试 // }); - this.$router.push({ path: '/pages/index' }) + this.$router.push({ path: '/pages/index' }) } } },