feat(抽奖活动页): 修复任务完成进度的展示问题,修复接口参数问题
This commit is contained in:
parent
170c2f1fb3
commit
a0822da7a8
@ -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 {
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user