国际版独立
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);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 验证码输入 -->
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="form-group">
|
||||
<view class="code-input-wrapper">
|
||||
<input
|
||||
@@ -38,6 +39,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 区域提示 -->
|
||||
<view class="region-notice">
|
||||
@@ -50,6 +52,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="agreement-box">
|
||||
<checkbox-group @change="onAgreementChange">
|
||||
<label class="agreement-label">
|
||||
@@ -63,6 +66,7 @@
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -170,24 +174,29 @@
|
||||
// 登录
|
||||
const handleLogin = async () => {
|
||||
if (!validatePhone()) return
|
||||
|
||||
|
||||
// #ifndef H5
|
||||
if (!verifyCode.value) {
|
||||
uni.showToast({ title: t('auth.codeRequired'), icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
if (!isAgreed.value) {
|
||||
uni.showToast({ title: t('auth.pleaseAgreeToTerms'), icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
try {
|
||||
uni.showLoading({ title: t('common.loggingIn') })
|
||||
const res = await quickLogin({
|
||||
loginType: 'SMS',
|
||||
appid,
|
||||
phonenumber: getSubmitPhoneNumber(),
|
||||
smsCode: verifyCode.value
|
||||
// H5 按产品要求不做验证码发送与校验,小程序端保持原流程
|
||||
smsCode: verifyCode.value || ''
|
||||
})
|
||||
|
||||
if (res && res.code !== 200) {
|
||||
|
||||
Reference in New Issue
Block a user