feat(新年活动): 完善页面

This commit is contained in:
hzj 2025-12-31 20:20:07 +08:00
parent 2c066bde74
commit 4221c9d7f3
5 changed files with 149 additions and 24 deletions

View File

@ -421,5 +421,25 @@
"recharge_reward": "مكافأة إعادة الشحن",
"ranking": "الترتيب",
"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} عملة، يرجى المحاولة لاحقاً."
}

View File

@ -421,5 +421,25 @@
"recharge_reward": "Recharge Reward",
"ranking": "Ranking",
"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."
}

View File

@ -421,5 +421,25 @@
"recharge_reward": "充值奖励",
"ranking": "排行榜",
"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} 金币失败,请稍后重试。"
}

View File

@ -216,12 +216,14 @@
</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>
Accumulated recharge:${{ formatRechargeAmount(myRechargeRecode?.totalAmount) }}
{{ t('Accumulated recharge') }}:${{
formatRechargeAmount(myRechargeRecode?.totalAmount)
}}
</div>
<img
@ -643,7 +645,9 @@
>
<div style="display: flex; justify-content: space-between; align-items: center">
<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>
<!-- 按钮 -->
@ -685,7 +689,7 @@
alt=""
style="display: block; width: 18vw"
/>
<div>Lucky Dollars Medal*permanent</div>
<div>{{ t('Lucky Dollars Medal*permanent') }}</div>
</div>
</div>
@ -739,7 +743,7 @@
gap: 12px;
"
>
<div style="font-weight: 590">{{ t('task_for_tickets') }}</div>
<div style="font-weight: 590">{{ t('Task for tickets') }}</div>
<div
v-for="task in taskList"
style="
@ -808,7 +812,7 @@
<!-- 任务奖励 -->
<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
v-smart-img
:src="imageUrl('ticket')"
@ -962,7 +966,9 @@
{{ userInfo.userNickname || '' }}
</div>
<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">
{{ t('current_earnings', { amount: currentAmount.availableAmount }) }}
</div>
@ -1074,7 +1080,7 @@
{{ selectedPayee.name || '' }}
</div>
<div style="margin: 0; font-size: 0.9em; font-weight: 500">
ID: {{ selectedPayee.account || '' }}
{{ $t('user_id_prefix') }} {{ selectedPayee.account || '' }}
</div>
</div>
<!-- 换人按钮 -->
@ -1586,7 +1592,7 @@
<script setup>
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { viewUserInfo } from '@/utils/appBridge.js'
import { useRouter } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { setDocumentDirection } from '@/locales/i18n'
import { useLangStore } from '@/stores/lang'
@ -1629,6 +1635,7 @@ import maskLayer from '@/components/MaskLayer.vue'
const { t, locale } = useI18n()
const router = useRouter()
const route = useRoute()
const langStore = useLangStore()
//
@ -1650,7 +1657,7 @@ const getImgName = (filename) => {
//
locale.value && setDocumentDirection(locale.value)
const reward = ref(true) //
const reward = ref(false) //
const rankShow = ref(false) //
const lotteryShow = ref(false) //
const incomeShow = ref(false) //
@ -1836,10 +1843,52 @@ const showTarget = (task) => {
unit: timeUnit,
})
} 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') {
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') {
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})`
}
}
@ -1852,7 +1901,7 @@ const initializePayee = () => {
const savedPayee = getSelectedPayee()
if (savedPayee) {
Object.assign(selectedPayee.value, savedPayee)
handleBt('Income')
handleBt('withdraw')
drawerShowBt('transfer')
}
}
@ -1893,7 +1942,10 @@ const underlineStyle = computed(() => {
//
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(() => {
console.log('route.query.activeAction:', route.query.activeAction)
if (route.query.activeAction == 'incomeShow') {
handleBt('withdraw')
} else {
handleBt('reward')
}
connectToAppHandler()
preloadOtherImages() //
startCountdown() //

View File

@ -338,25 +338,32 @@ const Cancel = () => {
maskLayerShow.value = false
}
const Confirm = () => {
const Confirm = async () => {
//
setSelectedPayee({ ...selectedUser.value })
router.go(-1)
// availableIncome
if (route.query) {
console.log('route.query:', route.query)
// 使 nextTick
nextTick(() => {
// 使 replace
router.replace({
try {
//
await router.replace({
path: route.query.from,
query: {
activeAction: route.query.activeAction,
},
})
})
console.log('路由替换成功')
} catch (error) {
console.error('路由替换失败:', error)
//
router.go(-1)
}
} else {
// from
router.go(-1)
maskLayerShow.value = false
}
}