From a0822da7a877ee5247fbe167523a7b93e486061f Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 24 Oct 2025 18:27:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8A=BD=E5=A5=96=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E9=A1=B5):=20=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=BF=9B=E5=BA=A6=E7=9A=84=E5=B1=95=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Activities/Lottery/Lottery.vue | 15 +++++++++------ src/views/Wallet/CashOut/CashOut.vue | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/views/Activities/Lottery/Lottery.vue b/src/views/Activities/Lottery/Lottery.vue index 95fa774..bdc5896 100644 --- a/src/views/Activities/Lottery/Lottery.vue +++ b/src/views/Activities/Lottery/Lottery.vue @@ -875,7 +875,7 @@ const barrageList = ref([]) // 活动详情 const activity = ref({}) //活动详情和奖池 -const activityCode = ref('') //活动码 +const activityId = ref('') //活动码 const userInfo = ref({}) //用户信息 const userIdentity = ref({}) //用户身份 @@ -936,6 +936,9 @@ const showTarget = (task) => { let timeType = task.targetValue < 60 let currentValue = timeType ? task.currentValue : task.currentValue / 60 let targetValue = timeType ? task.targetValue : task.targetValue / 60 + // 直接去除小数部分(向下取整) + currentValue = Math.floor(currentValue) + targetValue = Math.floor(targetValue) let timeUnit = timeType ? 'mins' : 'hours' return `On the mic(${currentValue}/${targetValue}${timeUnit})` @@ -976,7 +979,7 @@ const searchPayee = () => { // 前往提现页 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 resvalidActivity = await validActivity() //活动是否有效 - if (resvalidActivity.body?.activityCode) { - activityCode.value = resvalidActivity.body.activityCode || '' + if (resvalidActivity.body?.id) { + activityId.value = resvalidActivity.body.id || '' getDrawableAmount() //获取可提现金额 - const resDetail = await activityDetail(activityCode.value) + const resDetail = await activityDetail(resvalidActivity.body.activityCode) if (resDetail.status && resDetail.body) { activity.value = resDetail.body } else { @@ -1381,7 +1384,7 @@ const getTickets = async () => { //可提现金额 const getDrawableAmount = async () => { - const resDrawableAmount = await withdrawableAmount(activityCode.value) + const resDrawableAmount = await withdrawableAmount(activityId.value) if (resDrawableAmount.status && resDrawableAmount.body) { currentAmount.value = resDrawableAmount.body } else { diff --git a/src/views/Wallet/CashOut/CashOut.vue b/src/views/Wallet/CashOut/CashOut.vue index 64cde87..731159f 100644 --- a/src/views/Wallet/CashOut/CashOut.vue +++ b/src/views/Wallet/CashOut/CashOut.vue @@ -198,7 +198,7 @@ import { useRouter, useRoute } from 'vue-router' const router = useRouter() const route = useRoute() -const activityCode = route.query.activityCode || '' +const activityId = route.query.activityId || '' const maskLayerShow = ref(false) const currentAmount = ref(0) //可提现金额 @@ -222,7 +222,7 @@ const gotoKYC = () => { const CashOut = () => { if (hasBankCard.value) { try { - const resApply = withdrawApply({ ...getApplyInfo(), activityId: activityCode }) + const resApply = withdrawApply({ ...getApplyInfo(), activityId: activityId }) if (resApply.status) { setApplyInfo() router.go(-1) @@ -242,7 +242,7 @@ const Receive = () => { //获取可提现金额 const getDrawableAmount = async () => { - const resDrawableAmount = await withdrawableAmount(activityCode) + const resDrawableAmount = await withdrawableAmount(activityId) if (resDrawableAmount.status && resDrawableAmount.body) { currentAmount.value = resDrawableAmount.body } else {