feat(新年活动): 完善页面
This commit is contained in:
parent
2c066bde74
commit
4221c9d7f3
@ -421,5 +421,25 @@
|
|||||||
"recharge_reward": "مكافأة إعادة الشحن",
|
"recharge_reward": "مكافأة إعادة الشحن",
|
||||||
"ranking": "الترتيب",
|
"ranking": "الترتيب",
|
||||||
"lottery": "القرعة",
|
"lottery": "القرعة",
|
||||||
"withdraw": "سحب"
|
"withdraw": "سحب",
|
||||||
|
|
||||||
|
"Accumulated recharge": "إجمالي الشحن",
|
||||||
|
"Rewards": "المكافآت",
|
||||||
|
"Total Tickets": "إجمالي التذاكر",
|
||||||
|
"Rewards:": "المكافآت:",
|
||||||
|
"Total Tickets:({ usedCount }/100)": "إجمالي التذاكر:({ usedCount }/100)",
|
||||||
|
"Lucky Dollars Medal*permanent": "ميدالية الدولار المحظوظ*دائم",
|
||||||
|
"Task for tickets": "مهمة للحصول على تذاكر",
|
||||||
|
"Rewards:": "المكافآت:",
|
||||||
|
"done": "تم",
|
||||||
|
"Daily total recharge amount: $1 ({currentValue}/{targetValue})": "إجمالي مبلغ الشحن اليومي: 1 دولار ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $10 ({currentValue}/{targetValue})": "إجمالي مبلغ الشحن اليومي: 10 دولارات ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $50 ({currentValue}/{targetValue})": "إجمالي مبلغ الشحن اليومي: 50 دولار ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $100 ({currentValue}/{targetValue})": "إجمالي مبلغ الشحن اليومي: 100 دولار ({currentValue}/{targetValue})",
|
||||||
|
"Spend 5000 coins in the game ({currentValue}/{targetValue})": "أنفق 5000 عملة في اللعبة ({currentValue}/{targetValue})",
|
||||||
|
"Spend 10000 coins in the game ({currentValue}/{targetValue})": "أنفق 10000 عملة في اللعبة ({currentValue}/{targetValue})",
|
||||||
|
"Spend 50000 coins in the game ({currentValue}/{targetValue})": "أنفق 50000 عملة في اللعبة ({currentValue}/{targetValue})",
|
||||||
|
"Gifts: 5 gifts({currentValue}/{targetValue})": "هدايا: 5 هدايا({currentValue}/{targetValue})",
|
||||||
|
"exchange_success_coins": "تم تبادل {amount} عملة بنجاح",
|
||||||
|
"exchange_failed_coins": "فشل التبادل لـ {amount} عملة، يرجى المحاولة لاحقاً."
|
||||||
}
|
}
|
||||||
|
|||||||
@ -421,5 +421,25 @@
|
|||||||
"recharge_reward": "Recharge Reward",
|
"recharge_reward": "Recharge Reward",
|
||||||
"ranking": "Ranking",
|
"ranking": "Ranking",
|
||||||
"lottery": "Lottery",
|
"lottery": "Lottery",
|
||||||
"withdraw": "Withdraw"
|
"withdraw": "Withdraw",
|
||||||
|
|
||||||
|
"Accumulated recharge": "Accumulated recharge",
|
||||||
|
"Rewards": "Rewards",
|
||||||
|
"Total Tickets": "Total Tickets",
|
||||||
|
"Rewards:": "Rewards:",
|
||||||
|
"Total Tickets:({ usedCount }/100)": "Total Tickets:({ usedCount }/100)",
|
||||||
|
"Lucky Dollars Medal*permanent": "Lucky Dollars Medal*permanent",
|
||||||
|
"Task for tickets": "Task for tickets",
|
||||||
|
"Rewards:": "Rewards:",
|
||||||
|
"done": "done",
|
||||||
|
"Daily total recharge amount: $1 ({currentValue}/{targetValue})": "Daily total recharge amount: $1 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $10 ({currentValue}/{targetValue})": "Daily total recharge amount: $10 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $50 ({currentValue}/{targetValue})": "Daily total recharge amount: $50 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $100 ({currentValue}/{targetValue})": "Daily total recharge amount: $100 ({currentValue}/{targetValue})",
|
||||||
|
"Spend 5000 coins in the game ({currentValue}/{targetValue})": "Spend 5000 coins in the game ({currentValue}/{targetValue})",
|
||||||
|
"Spend 10000 coins in the game ({currentValue}/{targetValue})": "Spend 10000 coins in the game ({currentValue}/{targetValue})",
|
||||||
|
"Spend 50000 coins in the game ({currentValue}/{targetValue})": "Spend 50000 coins in the game ({currentValue}/{targetValue})",
|
||||||
|
"Gifts: 5 gifts({currentValue}/{targetValue})": "Gifts: 5 gifts({currentValue}/{targetValue})",
|
||||||
|
"exchange_success_coins": "Successfully exchanged {amount} coins",
|
||||||
|
"exchange_failed_coins": "Exchange failed for {amount} coins, please try again later."
|
||||||
}
|
}
|
||||||
|
|||||||
@ -421,5 +421,25 @@
|
|||||||
"recharge_reward": "充值奖励",
|
"recharge_reward": "充值奖励",
|
||||||
"ranking": "排行榜",
|
"ranking": "排行榜",
|
||||||
"lottery": "抽奖",
|
"lottery": "抽奖",
|
||||||
"withdraw": "提现"
|
"withdraw": "提现",
|
||||||
|
|
||||||
|
"Accumulated recharge": "累计充值",
|
||||||
|
"Rewards": "奖励",
|
||||||
|
"Total Tickets": "总抽奖券",
|
||||||
|
"Rewards:": "奖励:",
|
||||||
|
"Total Tickets:({ usedCount }/100)": "总抽奖券:({ usedCount }/100)",
|
||||||
|
"Lucky Dollars Medal*permanent": "幸运美元徽章*永久",
|
||||||
|
"Task for tickets": "获取抽奖券任务",
|
||||||
|
"Rewards:": "奖励:",
|
||||||
|
"done": "已完成",
|
||||||
|
"Daily total recharge amount: $1 ({currentValue}/{targetValue})": "每日总充值金额: 1美元 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $10 ({currentValue}/{targetValue})": "每日总充值金额: 10美元 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $50 ({currentValue}/{targetValue})": "每日总充值金额: 50美元 ({currentValue}/{targetValue})",
|
||||||
|
"Daily total recharge amount: $100 ({currentValue}/{targetValue})": "每日总充值金额: 100美元 ({currentValue}/{targetValue})",
|
||||||
|
"Spend 5000 coins in the game ({currentValue}/{targetValue})": "在游戏内消费5000金币 ({currentValue}/{targetValue})",
|
||||||
|
"Spend 10000 coins in the game ({currentValue}/{targetValue})": "在游戏内消费10000金币 ({currentValue}/{targetValue})",
|
||||||
|
"Spend 50000 coins in the game ({currentValue}/{targetValue})": "在游戏内消费50000金币 ({currentValue}/{targetValue})",
|
||||||
|
"Gifts: 5 gifts({currentValue}/{targetValue})": "礼物: 5个礼物({currentValue}/{targetValue})",
|
||||||
|
"exchange_success_coins": "成功兑换 {amount} 金币",
|
||||||
|
"exchange_failed_coins": "兑换 {amount} 金币失败,请稍后重试。"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,12 +216,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 账号 -->
|
<!-- 账号 -->
|
||||||
<div>ID:{{ myRechargeRecode?.account }}</div>
|
<div>{{ $t('user_id_prefix') }} {{ myRechargeRecode?.account }}</div>
|
||||||
|
|
||||||
<!-- 总充值 -->
|
<!-- 总充值 -->
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||||
<div>
|
<div>
|
||||||
Accumulated recharge:${{ formatRechargeAmount(myRechargeRecode?.totalAmount) }}
|
{{ t('Accumulated recharge') }}:${{
|
||||||
|
formatRechargeAmount(myRechargeRecode?.totalAmount)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
@ -643,7 +645,9 @@
|
|||||||
>
|
>
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||||
<div style="font-size: 1.2em; font-weight: 700">
|
<div style="font-size: 1.2em; font-weight: 700">
|
||||||
Total Tickets:({{ totalDraw?.usedCount || 0 }}/100)
|
{{
|
||||||
|
t('Total Tickets:({ usedCount }/100)', { usedCount: totalDraw?.usedCount || 0 })
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
@ -685,7 +689,7 @@
|
|||||||
alt=""
|
alt=""
|
||||||
style="display: block; width: 18vw"
|
style="display: block; width: 18vw"
|
||||||
/>
|
/>
|
||||||
<div>Lucky Dollars Medal*permanent</div>
|
<div>{{ t('Lucky Dollars Medal*permanent') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -739,7 +743,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div style="font-weight: 590">{{ t('task_for_tickets') }}</div>
|
<div style="font-weight: 590">{{ t('Task for tickets') }}</div>
|
||||||
<div
|
<div
|
||||||
v-for="task in taskList"
|
v-for="task in taskList"
|
||||||
style="
|
style="
|
||||||
@ -808,7 +812,7 @@
|
|||||||
|
|
||||||
<!-- 任务奖励 -->
|
<!-- 任务奖励 -->
|
||||||
<div style="display: flex; align-items: center; gap: 8px">
|
<div style="display: flex; align-items: center; gap: 8px">
|
||||||
<div style="color: #fff; font-weight: 590">Rewards:</div>
|
<div style="color: #fff; font-weight: 590">{{ t('Rewards:') }}</div>
|
||||||
<img
|
<img
|
||||||
v-smart-img
|
v-smart-img
|
||||||
:src="imageUrl('ticket')"
|
:src="imageUrl('ticket')"
|
||||||
@ -962,7 +966,9 @@
|
|||||||
{{ userInfo.userNickname || '' }}
|
{{ userInfo.userNickname || '' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||||
<div style="min-width: 0">ID:{{ userInfo.account || '' }}</div>
|
<div style="min-width: 0">
|
||||||
|
{{ $t('user_id_prefix') }} {{ userInfo.account || '' }}
|
||||||
|
</div>
|
||||||
<div style="width: auto; font-weight: 600">
|
<div style="width: auto; font-weight: 600">
|
||||||
{{ t('current_earnings', { amount: currentAmount.availableAmount }) }}
|
{{ t('current_earnings', { amount: currentAmount.availableAmount }) }}
|
||||||
</div>
|
</div>
|
||||||
@ -1074,7 +1080,7 @@
|
|||||||
{{ selectedPayee.name || '' }}
|
{{ selectedPayee.name || '' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 0; font-size: 0.9em; font-weight: 500">
|
<div style="margin: 0; font-size: 0.9em; font-weight: 500">
|
||||||
ID: {{ selectedPayee.account || '' }}
|
{{ $t('user_id_prefix') }} {{ selectedPayee.account || '' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 换人按钮 -->
|
<!-- 换人按钮 -->
|
||||||
@ -1586,7 +1592,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { viewUserInfo } from '@/utils/appBridge.js'
|
import { viewUserInfo } from '@/utils/appBridge.js'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { setDocumentDirection } from '@/locales/i18n'
|
import { setDocumentDirection } from '@/locales/i18n'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
@ -1629,6 +1635,7 @@ import maskLayer from '@/components/MaskLayer.vue'
|
|||||||
|
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const langStore = useLangStore()
|
const langStore = useLangStore()
|
||||||
// 当前语言类型
|
// 当前语言类型
|
||||||
@ -1650,7 +1657,7 @@ const getImgName = (filename) => {
|
|||||||
// 监听语言变化并设置文档方向
|
// 监听语言变化并设置文档方向
|
||||||
locale.value && setDocumentDirection(locale.value)
|
locale.value && setDocumentDirection(locale.value)
|
||||||
|
|
||||||
const reward = ref(true) //奖励标签页
|
const reward = ref(false) //奖励标签页
|
||||||
const rankShow = ref(false) //排行榜标签页
|
const rankShow = ref(false) //排行榜标签页
|
||||||
const lotteryShow = ref(false) //抽奖标签页
|
const lotteryShow = ref(false) //抽奖标签页
|
||||||
const incomeShow = ref(false) //收益标签页
|
const incomeShow = ref(false) //收益标签页
|
||||||
@ -1836,10 +1843,52 @@ const showTarget = (task) => {
|
|||||||
unit: timeUnit,
|
unit: timeUnit,
|
||||||
})
|
})
|
||||||
} else if (task.targetType == 'SEND_GIFT') {
|
} else if (task.targetType == 'SEND_GIFT') {
|
||||||
return `${task.taskName}(${task.currentValue}/${task.targetValue})`
|
if (task.taskCode == 'SPINS_SEND_GIFT_5') {
|
||||||
|
return t('Gifts: 5 gifts({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if (task.targetType == 'SPEND_COINS') {
|
} else if (task.targetType == 'SPEND_COINS') {
|
||||||
return `${task.taskName}(${task.currentValue}/${task.targetValue})`
|
if (task.taskCode == 'SPINS_SPEND_5000') {
|
||||||
|
return t('Spend 5000 coins in the game ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
} else if (task.taskCode == 'SPINS_SPEND_10000') {
|
||||||
|
return t('Spend 10000 coins in the game ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
} else if (task.taskCode == 'SPINS_SPEND_50000') {
|
||||||
|
return t('Spend 50000 coins in the game ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if (task.targetType == 'RECHARGE_AMOUNT') {
|
} else if (task.targetType == 'RECHARGE_AMOUNT') {
|
||||||
|
if (task.taskCode == 'SPINS_RECHARGE_1') {
|
||||||
|
return t('Daily total recharge amount: $1 ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
} else if (task.taskCode == 'SPINS_RECHARGE_10') {
|
||||||
|
return t('Daily total recharge amount: $10 ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
} else if (task.taskCode == 'SPINS_RECHARGE_50') {
|
||||||
|
return t('Daily total recharge amount: $50 ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
} else if (task.taskCode == 'SPINS_RECHARGE_100') {
|
||||||
|
return t('Daily total recharge amount: $100 ({currentValue}/{targetValue})', {
|
||||||
|
currentValue: task.currentValue,
|
||||||
|
targetValue: task.targetValue,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return `${task.taskName}(${task.currentValue}/${task.targetValue})`
|
return `${task.taskName}(${task.currentValue}/${task.targetValue})`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1852,7 +1901,7 @@ const initializePayee = () => {
|
|||||||
const savedPayee = getSelectedPayee()
|
const savedPayee = getSelectedPayee()
|
||||||
if (savedPayee) {
|
if (savedPayee) {
|
||||||
Object.assign(selectedPayee.value, savedPayee)
|
Object.assign(selectedPayee.value, savedPayee)
|
||||||
handleBt('Income')
|
handleBt('withdraw')
|
||||||
drawerShowBt('transfer')
|
drawerShowBt('transfer')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1893,7 +1942,10 @@ const underlineStyle = computed(() => {
|
|||||||
|
|
||||||
// 前往搜索代理页
|
// 前往搜索代理页
|
||||||
const searchPayee = () => {
|
const searchPayee = () => {
|
||||||
router.push('/search-payee')
|
router.push({
|
||||||
|
path: '/search-payee',
|
||||||
|
query: { from: '/new-year', activeAction: 'incomeShow' },
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 前往提现页
|
// 前往提现页
|
||||||
@ -2575,6 +2627,12 @@ const connectToAppHandler = async () => {
|
|||||||
|
|
||||||
// 组件挂载时检测环境
|
// 组件挂载时检测环境
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
console.log('route.query.activeAction:', route.query.activeAction)
|
||||||
|
if (route.query.activeAction == 'incomeShow') {
|
||||||
|
handleBt('withdraw')
|
||||||
|
} else {
|
||||||
|
handleBt('reward')
|
||||||
|
}
|
||||||
connectToAppHandler()
|
connectToAppHandler()
|
||||||
preloadOtherImages() // 预加载其他图片
|
preloadOtherImages() // 预加载其他图片
|
||||||
startCountdown() //开启倒计时
|
startCountdown() //开启倒计时
|
||||||
|
|||||||
@ -338,25 +338,32 @@ const Cancel = () => {
|
|||||||
maskLayerShow.value = false
|
maskLayerShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const Confirm = () => {
|
const Confirm = async () => {
|
||||||
// 将选中的用户信息保存到全局状态
|
// 将选中的用户信息保存到全局状态
|
||||||
setSelectedPayee({ ...selectedUser.value })
|
setSelectedPayee({ ...selectedUser.value })
|
||||||
router.go(-1)
|
|
||||||
|
|
||||||
// 检查是否来自 availableIncome 页面
|
// 检查是否来自 availableIncome 页面
|
||||||
if (route.query) {
|
if (route.query) {
|
||||||
console.log('route.query:', route.query)
|
console.log('route.query:', route.query)
|
||||||
|
|
||||||
// 使用 nextTick 确保上一步完成
|
try {
|
||||||
nextTick(() => {
|
// 先执行路由替换
|
||||||
// 然后使用 replace 替换为带参数的版本
|
await router.replace({
|
||||||
router.replace({
|
|
||||||
path: route.query.from,
|
path: route.query.from,
|
||||||
query: {
|
query: {
|
||||||
activeAction: route.query.activeAction,
|
activeAction: route.query.activeAction,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
console.log('路由替换成功')
|
||||||
|
} catch (error) {
|
||||||
|
console.error('路由替换失败:', error)
|
||||||
|
// 如果替换失败,仍然执行返回操作
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有 from 参数,直接返回上一页并关闭弹窗
|
||||||
|
router.go(-1)
|
||||||
|
maskLayerShow.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user