From 61fb851fa3148e9dd3e32b9ab7bf08079b0af993 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 16 Sep 2025 09:37:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E5=88=B7=E6=96=B0token=E6=97=B6=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=93=8D=E5=BA=94=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除对响应数据中.data的直接引用,改为使用完整响应对象 --- src/store/token.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/token.ts b/src/store/token.ts index 126967b..1425f23 100644 --- a/src/store/token.ts +++ b/src/store/token.ts @@ -105,7 +105,7 @@ export const useTokenStore = defineStore( try { const res = await _login(credentials) console.log('普通登录-res: ', res) - await _postLogin(res.data) + await _postLogin(res) uni.showToast({ title: '登录成功', icon: 'success', @@ -133,7 +133,7 @@ export const useTokenStore = defineStore( console.log('微信登录-code: ', code) const res = await _wxLogin(code) console.log('微信登录-res: ', res) - await _postLogin(res.data) + await _postLogin(res) uni.showToast({ title: '登录成功', icon: 'success', @@ -193,7 +193,7 @@ export const useTokenStore = defineStore( const refreshToken = tokenInfo.value.refreshToken const res = await _refreshToken(refreshToken) console.log('刷新token-res: ', res) - setTokenInfo(res.data) + setTokenInfo(res) return res } catch (error) {