From f3d5b195d4fcfbd3939ff72e0521a6419fd2a9b5 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Mon, 2 Feb 2026 20:32:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=96=B0=E9=99=90=E6=97=B6=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E9=A1=B5=E9=9D=A2):=20=E7=99=BB=E5=BD=95=E5=A5=96?= =?UTF-8?q?=E5=8A=B1=E9=A2=86=E5=8F=96=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Activities/LoginReward/index.vue | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/views/Activities/LoginReward/index.vue b/src/views/Activities/LoginReward/index.vue index d1cf49f..14ea3fa 100644 --- a/src/views/Activities/LoginReward/index.vue +++ b/src/views/Activities/LoginReward/index.vue @@ -42,12 +42,12 @@ >
@@ -127,10 +127,10 @@ const currentDayIndex = ref(0) // 当前签到天数 const todayReceived = ref(false) // 今日是否已领取 // 展示不同图片 -const showImgUrl = (currentDayIndex, reward) => { +const showImgUrl = (index) => { // 未领取状态 - if (reward.sort > currentDayIndex) { - if (reward.sort < 7) { + if (index > currentDayIndex.value) { + if (index < 6) { console.log(`imageUrl('itemLock')`, imageUrl('itemLock')) return imageUrl('itemLock') @@ -140,8 +140,17 @@ const showImgUrl = (currentDayIndex, reward) => { } // 已领取状态 + else if (index < currentDayIndex.value) { + if (index < 6) { + return imageUrl(getImgName('itemReceived')) + } else { + return imageUrl(getImgName('itemBigReceived')) + } + } + + // 当天领取状态 else if (todayReceived.value) { - if (reward.sort < 7) { + if (index < 6) { return imageUrl(getImgName('itemReceived')) } else { return imageUrl(getImgName('itemBigReceived')) @@ -203,7 +212,7 @@ const getLoginRewards = async () => { // 今天是否已签到 const getTodayLoginStatus = async () => { - const resTodayLoginStatus = await apiGetTodayLoginStatus(currentDayIndex.value) + const resTodayLoginStatus = await apiGetTodayLoginStatus('1') if (resTodayLoginStatus.status && resTodayLoginStatus.body) { todayReceived.value = resTodayLoginStatus.body } @@ -214,7 +223,7 @@ const receiveTaskReward = async () => { let data = { id: rewardInfo.value.rule.id, resourceGroupId: rewardInfo.value.rule.resourceGroupId, - dailyKey: currentDayIndex.value, + dailyKey: '1', } try { const resReceive = await postReceiveLoginReward(data)