hookehuyr

feat(recall): 添加用户信息检查并优化活动注册按钮显示

在timeline.vue中添加用户信息检查逻辑
将ActivityHistoryPage.vue中的按钮显示条件移至按钮本身
......@@ -64,9 +64,9 @@
</div>
<!-- Fixed Bottom Buttons -->
<div v-if="!userInfo.has_activity_registration"
<div
class="fixed bottom-0 left-0 right-0 bg-white/60 backdrop-blur-md p-4 pb-8 z-30 shadow-[0_-2px_10px_rgba(0,0,0,0.05)]">
<van-button block color="#0052D9" class="!rounded-lg !mb-3 !h-[44px] !text-base !font-bold"
<van-button v-if="!userInfo.has_activity_registration" block color="#0052D9" class="!rounded-lg !mb-3 !h-[44px] !text-base !font-bold"
@click="handleCollectCoins">
收集星球币
</van-button>
......
......@@ -191,6 +191,11 @@ onMounted(async () => {
recordDate.value = res.data?.record_date || ''
lastActivityDate.value = res.data?.last_activity_date || ''
}
const resUserInfo = await userInfoAPI()
// 登录之后需要判断是否有完善个人信息
if (resUserInfo.code) {
userInfo.value = resUserInfo.data?.user || {}
}
}
})
......