From 533170f0a9f755b1511c949207b2c32942095df8 Mon Sep 17 00:00:00 2001 From: kk <875203880@qq.com> Date: Sat, 11 Jul 2026 20:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=93=E6=9E=84=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 603bca1..9523562 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -418,14 +418,15 @@ export default { const openId = uni.getStorageSync('openid') || ''; const infoRes = await gatewayGet('/api/v1/user/info', { open_id: openId }); const infoData = (infoRes.data || {}).data || {}; - if (infoData.user_id) { + const userInfo = infoData.user_info || {}; + if (userInfo.user_id) { const existing = getCachedUserInfo() || {}; uni.setStorageSync('user_info', { ...existing, - user_id: infoData.user_id, - nickname: infoData.nickname || existing.nickname || '', - avatar: infoData.avatar || existing.avatar || '', - phone: infoData.phone || existing.phone || '', + user_id: userInfo.user_id, + nickname: userInfo.nickname || existing.nickname || '', + avatar: userInfo.avatar || existing.avatar || '', + phone: userInfo.phone || existing.phone || '', }); this.loadUserInfo(); }