diff --git a/src/views/Invitation/inviteNewUser.vue b/src/views/Invitation/inviteNewUser.vue index eadcfef..24008c0 100644 --- a/src/views/Invitation/inviteNewUser.vue +++ b/src/views/Invitation/inviteNewUser.vue @@ -473,7 +473,7 @@ :contentStyle="`padding: 36.5vw 9vw 18vw;align-items: flex-start;gap: 11vw;`" >
-
*7Days
+
+ {{ formatRewardDisplay(reward.type, reward) }} +
@@ -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(), //获取充值奖励 ]) }