国际版独立
This commit is contained in:
@@ -124,6 +124,8 @@
|
||||
const deviceInfo = ref(null)
|
||||
const passedTotalAmount = ref(null)
|
||||
const passedDepositAmount = ref(null)
|
||||
const currencyCode = ref('USD')
|
||||
const IDR_DEPOSIT_DISPLAY = 99000
|
||||
|
||||
// 支付方式相关(微信/支付宝/H5-Antom 多平台)
|
||||
const paymentMethods = ref([])
|
||||
@@ -149,6 +151,9 @@
|
||||
})
|
||||
|
||||
const totalAmount = computed(() => {
|
||||
if (currencyCode.value === 'IDR') {
|
||||
return `${IDR_DEPOSIT_DISPLAY}`
|
||||
}
|
||||
if (passedTotalAmount.value !== null) {
|
||||
return parseFloat(passedTotalAmount.value).toFixed(2);
|
||||
}
|
||||
@@ -156,7 +161,10 @@
|
||||
return deposit.toFixed(2)
|
||||
})
|
||||
|
||||
const currencySymbol = computed(() => 'USD')
|
||||
const currencySymbol = computed(() => {
|
||||
if (currencyCode.value === 'IDR') return 'Rp'
|
||||
return 'USD'
|
||||
})
|
||||
|
||||
// 加载订单信息
|
||||
const loadOrderInfo = async () => {
|
||||
@@ -244,10 +252,14 @@
|
||||
const res = await getDeviceInfo(deviceNo.value);
|
||||
if (res.code === 200 && res.data) {
|
||||
deviceInfo.value = res.data.device;
|
||||
currencyCode.value = (res.data?.position?.currency || currencyCode.value || 'USD').toUpperCase()
|
||||
|
||||
if (deviceInfo.value && deviceInfo.value.depositAmount) {
|
||||
orderInfo.value.deposit = deviceInfo.value.depositAmount;
|
||||
}
|
||||
if (currencyCode.value === 'IDR') {
|
||||
orderInfo.value.deposit = `${IDR_DEPOSIT_DISPLAY}`
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取设备信息失败:', error);
|
||||
|
||||
Reference in New Issue
Block a user