feat(幸运美金第四期): 对接接口

This commit is contained in:
hzj 2026-04-10 16:25:06 +08:00
parent 88a414ac71
commit 133695d7ad

View File

@ -1664,7 +1664,6 @@ import { useThrottle } from '@/utils/useDebounce'
import { getMemberProfile, getUserIdentity } from '@/api/wallet'
import {
ranklist, //
validActivity, //
activityDetail, //
myRecharge, //
activityRewardConfigs, //
@ -1748,8 +1747,10 @@ const maskLayerShow = computed(() => {
const barrageList = ref([]) //
//
const activityId = ref('2007771533988216322') //ID
const activityCode = ref('16322') //
const activity = ref({}) //
const activityId = ref('') //
const userInfo = ref({}) //
const userIdentity = ref({}) //
@ -2303,7 +2304,7 @@ const getUserInfo = async () => {
//
const getRanking = async () => {
let data = {
activityId: '2005571533988298753',
activityId: activityId.value,
pageNo: rankingPageNo.value,
pageSize: 20,
}
@ -2328,24 +2329,18 @@ const getRanking = async () => {
//
const getActivityDetail = async () => {
const resvalidActivity = await validActivity() //
if (resvalidActivity.body?.id) {
activityId.value = resvalidActivity.body.id || ''
getDrawableAmount() //
const resDetail = await activityDetail(resvalidActivity.body.activityCode)
if (resDetail.status && resDetail.body) {
activity.value = resDetail.body
} else {
activity.value = {}
}
getDrawableAmount() //
const resDetail = await activityDetail(activityCode.value)
if (resDetail.status && resDetail.body) {
activity.value = resDetail.body
} else {
activity.value = {}
}
}
//
const getMyRecharge = async () => {
const resMyRecharge = await myRecharge('2005571533988298753')
const resMyRecharge = await myRecharge(activityId.value)
if (resMyRecharge.status && resMyRecharge.body) {
myRechargeRecode.value = resMyRecharge.body
} else {
@ -2357,7 +2352,7 @@ const getMyRecharge = async () => {
const getActivityReward = async () => {
let data = {
activityType: 'CONSUMPTION_ACTIVITY',
activityId: '2005571533988298753',
activityId: activityId.value,
}
const resActivityReward = await activityRewardConfigs(data)
if (resActivityReward.status && resActivityReward.body) {
@ -2367,11 +2362,11 @@ const getActivityReward = async () => {
if (rewards.sort == 1) {
addReward = [
{
type: 'TICKET',
cover: imageUrl('ticket'),
content: 10,
},
// {
// type: 'TICKET',
// cover: imageUrl('ticket'),
// content: 10,
// },
]
} else if (rewards.sort == 2) {
addReward = [
@ -2484,7 +2479,7 @@ const showDetail = (type, reward) => {
//
const getTickets = async () => {
const resTickets = await myTickets()
const resTickets = await myTickets(activityId.value)
if (resTickets.status && resTickets.body) {
rollTimes.value = resTickets.body
} else {
@ -2494,7 +2489,7 @@ const getTickets = async () => {
//
const getTotalDrawCount = async () => {
const resTotalDrawCount = await myTotalDrawCount()
const resTotalDrawCount = await myTotalDrawCount(activityId.value)
if (resTotalDrawCount.status && resTotalDrawCount.body) {
totalDraw.value = resTotalDrawCount.body
}
@ -2510,7 +2505,7 @@ const getDrawableAmount = async () => {
//
const getTaskList = async () => {
const resTaskList = await ActTaskList()
const resTaskList = await ActTaskList(activityId.value)
if (resTaskList.status && resTaskList.body) {
taskList.value = resTaskList.body
}
@ -2520,7 +2515,7 @@ const getTaskList = async () => {
const getConfigsBadgeInfo = async () => {
let data = {
activityType: 'USER_RECHARGE_DRAW',
activityId: '2005571533988298753',
activityId: activityId.value,
}
const resConfigsBadge = await rewardConfigsBadge(data)
if (resConfigsBadge.status && resConfigsBadge.body) {
@ -2530,7 +2525,7 @@ const getConfigsBadgeInfo = async () => {
//
const getDrawRecords = async () => {
const resDrawRecords = await drawRecords()
const resDrawRecords = await drawRecords(activityCode.value)
if (resDrawRecords.status && resDrawRecords.body) {
myRecords.value = resDrawRecords.body?.records || []
}
@ -2538,7 +2533,7 @@ const getDrawRecords = async () => {
//
const getWinners = async () => {
const resWinners = await winnerHistory()
const resWinners = await winnerHistory(activityId.value)
if (resWinners.status && resWinners.body) {
barrageList.value = resWinners.body
}
@ -2581,7 +2576,7 @@ const receiveReward = async (rewards) => {
const receiveRechargeBadge = async (rewards) => {
let data = {
activityType: rewards.activityType,
activityId: '2005571533988298753',
activityId: activityId.value,
ruleId: rewards.ruleId,
}
try {