hookehuyr

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

在timeline.vue中添加用户信息检查逻辑
将ActivityHistoryPage.vue中的按钮显示条件移至按钮本身
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
64 </div> 64 </div>
65 65
66 <!-- Fixed Bottom Buttons --> 66 <!-- Fixed Bottom Buttons -->
67 - <div v-if="!userInfo.has_activity_registration" 67 + <div
68 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)]"> 68 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)]">
69 - <van-button block color="#0052D9" class="!rounded-lg !mb-3 !h-[44px] !text-base !font-bold" 69 + <van-button v-if="!userInfo.has_activity_registration" block color="#0052D9" class="!rounded-lg !mb-3 !h-[44px] !text-base !font-bold"
70 @click="handleCollectCoins"> 70 @click="handleCollectCoins">
71 收集星球币 71 收集星球币
72 </van-button> 72 </van-button>
......
...@@ -191,6 +191,11 @@ onMounted(async () => { ...@@ -191,6 +191,11 @@ onMounted(async () => {
191 recordDate.value = res.data?.record_date || '' 191 recordDate.value = res.data?.record_date || ''
192 lastActivityDate.value = res.data?.last_activity_date || '' 192 lastActivityDate.value = res.data?.last_activity_date || ''
193 } 193 }
194 + const resUserInfo = await userInfoAPI()
195 + // 登录之后需要判断是否有完善个人信息
196 + if (resUserInfo.code) {
197 + userInfo.value = resUserInfo.data?.user || {}
198 + }
194 } 199 }
195 }) 200 })
196 201
......