feat(cp排行榜): 补充图片指令,修复签到问题

This commit is contained in:
hzj 2026-01-19 20:15:43 +08:00
parent c6cb5cbe52
commit c323767884
5 changed files with 52 additions and 9 deletions

View File

@ -17,6 +17,7 @@
"
>
<img
v-smart-img
:src="item.propsGroup?.activityRewardProps?.[0].cover"
alt=""
style="width: 70%; display: block; object-fit: cover"

View File

@ -3,7 +3,11 @@
<itemCenter
:imgUrl="imageUrl('rewardBg')"
:contentStyle="`inset: 4vw 6vw 10vw;`"
:class="{ 'grayscale-container': rewards.dayIndex > currentDayIndex || !rewards.isSigned }"
:class="{
'grayscale-container':
rewards.dayIndex > currentDayIndex ||
(rewards.dayIndex < currentDayIndex && !rewards.isSigned),
}"
>
<!-- 奖品展示 -->
<div style="width: 100%; height: 100%" :style="layerStyle">

View File

@ -53,6 +53,7 @@
<div style="position: relative; display: flex; flex-direction: column; gap: 2vw">
<!-- 取消按钮 -->
<img
v-smart-img
:src="imageUrl('helpBt')"
alt=""
style="
@ -84,6 +85,7 @@
<!-- 排名 -->
<div style="width: 10vw; display: flex; justify-content: center; align-items: center">
<img
v-smart-img
v-for="(digit, index) in getRankDigits(item.rank)"
:src="getDigitImageUrl(digit)"
style="display: block; width: 3vw; object-fit: cover"
@ -104,7 +106,8 @@
>
<!-- 情侣1头像 -->
<img
:src="item.userAvatar"
v-smart-img
:src="item.userAvatar || ''"
alt=""
style="
display: block;
@ -119,7 +122,8 @@
/>
<!-- 情侣2头像 -->
<img
:src="item.cpUserAvatar"
v-smart-img
:src="item.cpUserAvatar || ''"
alt=""
style="
display: block;
@ -158,6 +162,7 @@
<!-- 贡献 -->
<div style="width: auto; min-width: 0; display: flex; align-items: center">
<img
v-smart-img
:src="imageUrl('distribution')"
alt=""
style="width: 10vw; display: block; object-fit: cover"
@ -318,6 +323,31 @@ const apiGetTop3Rewards = async () => {
try {
const response = await apiGetCpRewardPool(type)
if (response.status && response.body) {
let rewards = response.body
if (weeklyShow.value == 'SEASON_CP_GIFT') {
rewards[0].activityRewardProps.push(
{
cover: '',
content: 'Banner*30Days',
quantity: 0,
type: 'GIFT',
},
{
cover: '',
content: 'ID: 7 digits * 1',
quantity: 0,
type: 'GIFT',
},
)
} else {
rewards[0].activityRewardProps.push({
cover: '',
content: 'Homepage Ad* 7 days',
quantity: 0,
type: 'GIFT',
})
}
rewardsTop3.value = response.body || [] //
}
} catch (error) {

View File

@ -253,11 +253,12 @@
>
<!-- 预览图 -->
<img
v-if="item.cover != ''"
:src="item.cover"
alt=""
style="display: block; width: 10vw; object-fit: cover"
style="min-width: 0; display: block; width: 10vw; object-fit: cover"
/>
<div style="color: #fff">
<div style="min-width: 0; color: #fff; white-space: nowrap">
{{ formatRewardDisplay(item.type, item) }}
</div>
</div>

View File

@ -183,7 +183,8 @@
<!-- 排名 -->
<div style="width: 10vw; display: flex; justify-content: center; align-items: center">
<img
v-for="(digit, index) in getRankDigits(myRanking.rank)"
v-smart-img
v-for="(digit, index) in getRankDigits(myRanking.rank || 999)"
:src="getDigitImageUrl(digit)"
style="display: block; width: 3vw; object-fit: cover"
/>
@ -203,7 +204,8 @@
>
<!-- 情侣1头像 -->
<img
:src="myRanking.userAvatar"
v-smart-img
:src="myRanking.userAvatar || ''"
alt=""
style="
display: block;
@ -218,7 +220,8 @@
/>
<!-- 情侣2头像 -->
<img
:src="myRanking.cpUserAvatar"
v-smart-img
:src="myRanking.cpUserAvatar || ''"
alt=""
style="
display: block;
@ -261,6 +264,7 @@
<!-- 贡献 -->
<div style="width: auto; min-width: 0; display: flex; align-items: center">
<img
v-smart-img
:src="imageUrl('distribution')"
alt=""
style="width: 10vw; display: block; object-fit: cover"
@ -359,7 +363,7 @@
<div style="flex: 1; min-width: 0; display: flex; align-items: center; gap: 4vw">
<img
v-smart-img
:src="couple?.cpUserProfile.userAvatar"
:src="couple?.cpUserProfile.userAvatar || ''"
alt=""
style="width: 3em; aspect-ratio: 1/1; border-radius: 50%"
@error="handleAvatarImageError"
@ -842,6 +846,7 @@
</div>
<!-- 奖品 -->
<img
v-smart-img
:src="result[resultShowIndex]?.prize?.prizeImage"
alt=""
width="50%"
@ -957,6 +962,7 @@
>
<div style="display: flex; align-items: center; gap: 4px">
<img
v-smart-img
:src="record.prize?.prizeImage || ''"
alt=""
style="width: 10vw; object-fit: cover; display: block; aspect-ratio: 1/1"
@ -1138,6 +1144,7 @@
<!-- 奖品展示 -->
<img
v-smart-img
:src="topReward.cover"
alt=""
style="width: 60%; display: block; object-fit: cover"