From 3b4a0b925a0d9b5ac07410aa28c7e3df2701beba Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 23 Sep 2025 10:33:37 +0800 Subject: [PATCH] =?UTF-8?q?test:=20log=E8=B0=83=E8=AF=95=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=A4=B4=E8=8E=B7=E5=8F=96=E5=8A=9F=E8=83=BD2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/TopList/TopList.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/views/TopList/TopList.vue b/src/views/TopList/TopList.vue index f379fc1..bd4b171 100644 --- a/src/views/TopList/TopList.vue +++ b/src/views/TopList/TopList.vue @@ -1056,13 +1056,21 @@ const getAllTopOne = async () => { //获取用户信息 const getUserInfo = async () => { - if (Object.keys(userInfo.value).length === 0) { - const resUserInfo = await getMemberProfile() - if (resUserInfo.status && resUserInfo.body) { - userInfo.value = resUserInfo.body + try { + if (Object.keys(userInfo.value).length === 0) { + const resUserInfo = await getMemberProfile() + console.log('resUserInfo:', resUserInfo) + + if (resUserInfo.status && resUserInfo.body) { + userInfo.value = resUserInfo.body + } } + getMyContribution() // 获取我的贡献 + } catch (error) { + console.error('Failed to fetch get user:', error) + console.error('error:' + error.response.errorMsg) + throw error } - getMyContribution() // 获取我的贡献 } // 关闭弹窗