From 36a235fe1ead36bf4172e9c0a3148d88ec43063c Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Fri, 31 Oct 2025 16:26:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E7=94=A8=E6=88=B7token=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=A1=AE=E8=AE=A4=EF=BC=8C=E6=89=8D=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/http.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/http.js b/utils/http.js index 1a1330e..a3661d9 100644 --- a/utils/http.js +++ b/utils/http.js @@ -79,16 +79,18 @@ export const http = (options) => { } if (result.data.code === 400) { const userStore = useUserStore() - userStore.clearUserInfo() uni.showModal({ title: "登录失效", content: "点击确定跳转登录页面", confirmText: "确定", cancelText: "取消", success: (res) => { - uni.navigateTo({ - url: '/pages/start/login/login' - }) + if (res.confirm) { + userStore.clearUserInfo() + uni.navigateTo({ + url: '/pages/start/login/login' + }) + } }, }); }