2
0

feat:余额充值中英适配

This commit is contained in:
zhongzm
2025-01-23 19:38:03 +08:00
parent 34cdce8a87
commit 35173135c5
3 changed files with 15 additions and 11 deletions

View File

@@ -28,12 +28,12 @@ const selectedAmount = ref<number | null>(null);
const isCustomMode = ref<boolean>(false);
const rechargeOptions: Ref<RechargeOption[]> = ref([
{ amount: 10, displayAmount: '10元', price: 10.00 },
{ amount: 20, displayAmount: '20元', price: 20.00 },
{ amount: 30, displayAmount: '30元', price: 30.00 },
{ amount: 50, displayAmount: '50元', price: 50.00 },
{ amount: 100, displayAmount: '100元', price: 100.00 },
{ amount: 200, displayAmount: '200元', price: 200.00 },
{ amount: 10, displayAmount: `10${t('page.carddata.money')}`, price: 10.00 },
{ amount: 20, displayAmount: `20${t('page.carddata.money')}`, price: 20.00 },
{ amount: 30, displayAmount: `30${t('page.carddata.money')}`, price: 30.00 },
{ amount: 50, displayAmount: `50${t('page.carddata.money')}`, price: 50.00 },
{ amount: 100, displayAmount: `100${t('page.carddata.money')}`, price: 100.00 },
{ amount: 200, displayAmount: `200${t('page.carddata.money')}`, price: 200.00 },
]);
const paymentAmount = computed(() => {
@@ -95,7 +95,7 @@ const currentOrderInfo = ref({
const handleRecharge = async () => {
// 验证金额
if (!paymentAmount.value || paymentAmount.value <= 0) {
message.error('请选择或输入正确的充值金额');
message.error(t('page.carddata.truemoney'));
return;
}
@@ -113,7 +113,7 @@ const handleRecharge = async () => {
};
showOrderModal.value = true;
} catch (error) {
message.error('创建订单失败,请重试!');
message.error(t('page.carddata.falseorder'));
console.error('Failed to create order:', error);
}
};