feat: 统一活动接口调整
This commit is contained in:
parent
5a73708900
commit
f84795a47d
@ -182,20 +182,6 @@ export const apiGetDrawBackpackLogs = async (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取指定类型活动资源
|
|
||||||
export const apiGetActivityResource = async (activityType) => {
|
|
||||||
try {
|
|
||||||
const response = await get(
|
|
||||||
`/props-activity-cnf/client/listActivityResource?sysOrigin=LIKEI&activityType=${activityType}`,
|
|
||||||
)
|
|
||||||
return response
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed to get activity resource:', error)
|
|
||||||
console.error('error:' + error.response.errorMsg)
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用碎片兑换资源
|
// 用碎片兑换资源
|
||||||
export const exchangeGood = async (data) => {
|
export const exchangeGood = async (data) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -98,20 +98,6 @@ export const activityRewardConfigs = async (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取配置奖励.
|
|
||||||
export const apigetRewardConfigs = async (data) => {
|
|
||||||
try {
|
|
||||||
const response = await get(
|
|
||||||
`/props-activity-cnf/client/listActivityResource?sysOrigin=${data.sysOrigin}&activityType=${data.activityType}`,
|
|
||||||
)
|
|
||||||
return response
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed to fetch get gifts ranking reward:', error)
|
|
||||||
console.error('error:' + error.response.errorMsg)
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取剩余中奖券
|
// 获取剩余中奖券
|
||||||
export const myTickets = async (activityId) => {
|
export const myTickets = async (activityId) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -393,14 +393,14 @@ const router = createRouter({
|
|||||||
component: () => import('../views/Activities/LoginReward/index.vue'),
|
component: () => import('../views/Activities/LoginReward/index.vue'),
|
||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/daily-recharge',
|
||||||
|
name: 'daily-recharge',
|
||||||
|
component: () => import('../views/Activities/DailyRecharge/index.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
},
|
||||||
|
|
||||||
// 限时活动
|
// 限时活动
|
||||||
{
|
|
||||||
path: '/activities/active-game',
|
|
||||||
name: 'active-game',
|
|
||||||
component: () => import('../views/Activities/ActiveGame/index.vue'),
|
|
||||||
meta: { requiresAuth: true },
|
|
||||||
}, //2026年5月1日上午5点结束
|
|
||||||
{
|
{
|
||||||
path: '/activities/poker-ace',
|
path: '/activities/poker-ace',
|
||||||
name: 'pokerAce',
|
name: 'pokerAce',
|
||||||
|
|||||||
@ -664,12 +664,15 @@ import {
|
|||||||
activityDetail, // 获取活动详情
|
activityDetail, // 获取活动详情
|
||||||
ranklist, //获取排行榜
|
ranklist, //获取排行榜
|
||||||
activityRewardConfigs, // 获取活动奖励配置列表
|
activityRewardConfigs, // 获取活动奖励配置列表
|
||||||
apigetRewardConfigs, // 获取礼物排行榜奖励列表.
|
|
||||||
winnerHistory, //获取历史中奖用户
|
winnerHistory, //获取历史中奖用户
|
||||||
withdrawableAmount, //获取可提现金额
|
withdrawableAmount, //获取可提现金额
|
||||||
myRecharge, // 获取充值记录
|
myRecharge, // 获取充值记录
|
||||||
} from '@/api/lottery'
|
} from '@/api/lottery'
|
||||||
|
|
||||||
|
import {
|
||||||
|
apiGetActivityResource, // 获取礼物排行榜奖励列表.
|
||||||
|
} from '@/api/activity.js'
|
||||||
|
|
||||||
import Task from './Task.vue'
|
import Task from './Task.vue'
|
||||||
import Ranking from './Ranking.vue'
|
import Ranking from './Ranking.vue'
|
||||||
import RankingReward from './RankingReward.vue'
|
import RankingReward from './RankingReward.vue'
|
||||||
@ -1142,11 +1145,7 @@ const getRanking = async (rankingType = 'lottery') => {
|
|||||||
|
|
||||||
//获取游戏奖励列表
|
//获取游戏奖励列表
|
||||||
const getGameReward = async () => {
|
const getGameReward = async () => {
|
||||||
let data = {
|
const resActivityReward = await apiGetActivityResource('LUCKY_GIFT_REWARD')
|
||||||
sysOrigin: 'LIKEI',
|
|
||||||
activityType: 'LUCKY_GIFT_REWARD',
|
|
||||||
}
|
|
||||||
const resActivityReward = await apigetRewardConfigs(data)
|
|
||||||
if (resActivityReward.status && resActivityReward.body) {
|
if (resActivityReward.status && resActivityReward.body) {
|
||||||
rankingRewards.value = resActivityReward.body.map((rewards) => {
|
rankingRewards.value = resActivityReward.body.map((rewards) => {
|
||||||
let addReward = []
|
let addReward = []
|
||||||
|
|||||||
@ -81,10 +81,7 @@ import { formatRewardDisplay } from '@/utils/rewardFormatter.js'
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
apiGetActivityResource, //获取兑换资源
|
apiGetActivityResource, //获取兑换资源
|
||||||
apiGetMyLotteryTicketCount, // 获取我的剩余抽奖券数量
|
} from '@/api/activity.js'
|
||||||
apiGetUserFragmentBackpack, // 获取用户碎片背包
|
|
||||||
exchangeGood, //用碎片兑换资源
|
|
||||||
} from '@/api/couple.js'
|
|
||||||
|
|
||||||
import itemCenter from '@/components/itemCenter.vue'
|
import itemCenter from '@/components/itemCenter.vue'
|
||||||
import maskLayer from '@/components/MaskLayer.vue'
|
import maskLayer from '@/components/MaskLayer.vue'
|
||||||
|
|||||||
@ -1000,7 +1000,6 @@ import {
|
|||||||
getThisWeekRewardsAndGifts, // 获取本周奖励和礼物
|
getThisWeekRewardsAndGifts, // 获取本周奖励和礼物
|
||||||
getRankingListAndMyRanking, // 获取排行榜和我的排名
|
getRankingListAndMyRanking, // 获取排行榜和我的排名
|
||||||
getHistoryTopOne, // 获取历史榜首
|
getHistoryTopOne, // 获取历史榜首
|
||||||
activityResource, // 活动特定资源
|
|
||||||
} from '@/api/activity.js'
|
} from '@/api/activity.js'
|
||||||
|
|
||||||
import BackgroundLayer from '@/components/BackgroundLayer.vue'
|
import BackgroundLayer from '@/components/BackgroundLayer.vue'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user