feat(迎新活动): 对接充值奖励接口

This commit is contained in:
hzj 2026-03-05 16:09:18 +08:00
parent 210c3a59e4
commit 31c29296b3

View File

@ -473,7 +473,7 @@
:contentStyle="`padding: 36.5vw 9vw 18vw;align-items: flex-start;gap: 11vw;`"
>
<div
v-for="(reward, index) in rewardsTop"
v-for="(reward, index) in rewardsTop.rewards"
style="flex: 1; align-self: stretch; display: flex; flex-direction: column"
>
<div
@ -494,7 +494,9 @@
/>
</div>
<div style="flex: 1; display: flex; justify-content: center; align-items: center">
<div style="font-size: 1.2em; color: #fff; font-weight: 600">*7Days</div>
<div style="font-size: 1.3em; color: #fff; font-weight: 600">
{{ formatRewardDisplay(reward.type, reward) }}
</div>
</div>
</div>
</itemCenter>
@ -1086,9 +1088,11 @@ import { connectToApp } from '@/utils/appConnector.js'
import { getPngUrl } from '@/config/imagePaths.js'
import { preloadImages } from '@/utils/image/imagePreloader.js'
import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
import { formatRewardDisplay } from '@/utils/rewardFormatter.js'
import {
getRankingListAndMyRanking, //
getThisWeekRewardsAndGifts, //
} from '@/api/activity.js'
import {
getMyInviteCode, //
@ -1133,59 +1137,34 @@ const myInviteIncome = ref({}) //邀请用户收益统计
const myInviteUsers = ref([]) //
const bindingUserRewards = ref([]) //
//
const rechargeRewards = ref([
Array(3).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //(0.99)
Array(3).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //(4.99)
Array(3).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //(9.99)
])
const rechargeRewards = ref(Array(3))
//
const rankingRewards = ref([
Array(2).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //top1
Array(2).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //top2
Array(2).fill({
type: 'GOLD',
detailType: 'GOLD',
content: '1000',
quantity: 0,
amount: 1000,
sort: 1,
}), //top3
// Array(2).fill({
// type: 'GOLD',
// detailType: 'GOLD',
// content: '1000',
// quantity: 0,
// amount: 1000,
// sort: 1,
// }), //top1
// Array(2).fill({
// type: 'GOLD',
// detailType: 'GOLD',
// content: '1000',
// quantity: 0,
// amount: 1000,
// sort: 1,
// }), //top2
// Array(2).fill({
// type: 'GOLD',
// detailType: 'GOLD',
// content: '1000',
// quantity: 0,
// amount: 1000,
// sort: 1,
// }), //top3
])
const Ranking = ref([]) //
@ -1436,7 +1415,7 @@ const getBindingUserRewards = async () => {
//
const getRanking = async () => {
let data = {
activityType: 10,
activityType: 14,
}
const resRanking = await getRankingListAndMyRanking(data)
if (resRanking.status && resRanking.body) {
@ -1448,6 +1427,26 @@ const getRanking = async () => {
}
}
//
const getRewardsAndGifts = async () => {
const resRewardsAndGifts = await getThisWeekRewardsAndGifts('2029443922744954881')
if (resRewardsAndGifts.status && resRewardsAndGifts.body) {
rankingRewards.value = resRewardsAndGifts.body.butOneRewards
}
}
//
const getRechargeRewards = async () => {
let RewardsId = [['2029448725407711234'], ['2029449081176965121'], ['2029449364032438273']]
RewardsId.forEach(async (id, index) => {
const resRechargeRewards = await apiGetBindingUserRewards(id)
if (resRechargeRewards.status && resRechargeRewards.body) {
console.log('resRechargeRewards.body.id', resRechargeRewards.body[`${id}`])
rechargeRewards.value[index] = resRechargeRewards.body[`${id}`]
}
})
}
//
const preloadCriticalImages = async () => {
const criticalImages = [
@ -1490,6 +1489,8 @@ const initData = async () => {
getBindingUserRewards(), //
getRanking(), //
getRewardsAndGifts(), //
getRechargeRewards(), //
])
}