feat(新限时活动页面): 登录奖励领取功能调整

This commit is contained in:
hzj 2026-02-02 20:32:27 +08:00
parent f628f5bde0
commit f3d5b195d4

View File

@ -42,12 +42,12 @@
>
<div
style="position: absolute; inset: 0; z-index: 2"
v-if="reward.sort > currentDayIndex || todayReceived"
v-if="index != currentDayIndex || (index == currentDayIndex && todayReceived)"
@click.stop
>
<img
v-smart-img
:src="showImgUrl(currentDayIndex, reward)"
:src="showImgUrl(index)"
alt=""
style="width: 100%; height: 100%; display: block; object-fit: cover"
/>
@ -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)