feat(抽奖活动页): 修复任务完成进度的展示问题,修复接口参数问题

This commit is contained in:
hzj 2025-10-24 18:27:45 +08:00
parent 170c2f1fb3
commit a0822da7a8
2 changed files with 12 additions and 9 deletions

View File

@ -875,7 +875,7 @@ const barrageList = ref([])
// //
const activity = ref({}) // const activity = ref({}) //
const activityCode = ref('') // const activityId = ref('') //
const userInfo = ref({}) // const userInfo = ref({}) //
const userIdentity = ref({}) // const userIdentity = ref({}) //
@ -936,6 +936,9 @@ const showTarget = (task) => {
let timeType = task.targetValue < 60 let timeType = task.targetValue < 60
let currentValue = timeType ? task.currentValue : task.currentValue / 60 let currentValue = timeType ? task.currentValue : task.currentValue / 60
let targetValue = timeType ? task.targetValue : task.targetValue / 60 let targetValue = timeType ? task.targetValue : task.targetValue / 60
//
currentValue = Math.floor(currentValue)
targetValue = Math.floor(targetValue)
let timeUnit = timeType ? 'mins' : 'hours' let timeUnit = timeType ? 'mins' : 'hours'
return `On the mic(${currentValue}/${targetValue}${timeUnit})` return `On the mic(${currentValue}/${targetValue}${timeUnit})`
@ -976,7 +979,7 @@ const searchPayee = () => {
// //
const goToWithdraw = () => { const goToWithdraw = () => {
router.push({ path: '/cash-out', query: { activityCode: activityCode.value } }) router.push({ path: '/cash-out', query: { activityId: activityId.value } })
} }
// //
@ -1356,11 +1359,11 @@ const getRanking = async () => {
const getActivityDetail = async () => { const getActivityDetail = async () => {
const resvalidActivity = await validActivity() // const resvalidActivity = await validActivity() //
if (resvalidActivity.body?.activityCode) { if (resvalidActivity.body?.id) {
activityCode.value = resvalidActivity.body.activityCode || '' activityId.value = resvalidActivity.body.id || ''
getDrawableAmount() // getDrawableAmount() //
const resDetail = await activityDetail(activityCode.value) const resDetail = await activityDetail(resvalidActivity.body.activityCode)
if (resDetail.status && resDetail.body) { if (resDetail.status && resDetail.body) {
activity.value = resDetail.body activity.value = resDetail.body
} else { } else {
@ -1381,7 +1384,7 @@ const getTickets = async () => {
// //
const getDrawableAmount = async () => { const getDrawableAmount = async () => {
const resDrawableAmount = await withdrawableAmount(activityCode.value) const resDrawableAmount = await withdrawableAmount(activityId.value)
if (resDrawableAmount.status && resDrawableAmount.body) { if (resDrawableAmount.status && resDrawableAmount.body) {
currentAmount.value = resDrawableAmount.body currentAmount.value = resDrawableAmount.body
} else { } else {

View File

@ -198,7 +198,7 @@ import { useRouter, useRoute } from 'vue-router'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const activityCode = route.query.activityCode || '' const activityId = route.query.activityId || ''
const maskLayerShow = ref(false) const maskLayerShow = ref(false)
const currentAmount = ref(0) // const currentAmount = ref(0) //
@ -222,7 +222,7 @@ const gotoKYC = () => {
const CashOut = () => { const CashOut = () => {
if (hasBankCard.value) { if (hasBankCard.value) {
try { try {
const resApply = withdrawApply({ ...getApplyInfo(), activityId: activityCode }) const resApply = withdrawApply({ ...getApplyInfo(), activityId: activityId })
if (resApply.status) { if (resApply.status) {
setApplyInfo() setApplyInfo()
router.go(-1) router.go(-1)
@ -242,7 +242,7 @@ const Receive = () => {
// //
const getDrawableAmount = async () => { const getDrawableAmount = async () => {
const resDrawableAmount = await withdrawableAmount(activityCode) const resDrawableAmount = await withdrawableAmount(activityId)
if (resDrawableAmount.status && resDrawableAmount.body) { if (resDrawableAmount.status && resDrawableAmount.body) {
currentAmount.value = resDrawableAmount.body currentAmount.value = resDrawableAmount.body
} else { } else {