This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<view class="flex-row-g20">
|
||||
<view class="title">{{ currentCardNo || '-' }}</view>
|
||||
</view>
|
||||
<view class="caption" v-if="deviceInfo.asset_type === 'device'">IMEI:{{ deviceInfo.imei || '-' }}</view>
|
||||
<view class="caption" v-if="isDevice">IMEI:{{ deviceInfo.imei || '-' }}</view>
|
||||
<view class="caption" v-else>手机号:{{ deviceInfo.bound_phone || '-' }}</view>
|
||||
</view>
|
||||
<view class="tag-apple" :class="onlineStatus === '在线' ? 'tag-success' : 'tag-warning'">
|
||||
@@ -22,7 +22,8 @@
|
||||
defineProps({
|
||||
currentCardNo: { type: String, default: '' },
|
||||
deviceInfo: { type: Object, default: () => ({}) },
|
||||
onlineStatus: { type: String, default: '离线' }
|
||||
onlineStatus: { type: String, default: '离线' },
|
||||
isDevice: { type: Boolean, default: true }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<UserInfoCard :currentCardNo="currentCardNo" :deviceInfo="deviceInfo" :onlineStatus="onlineStatus" />
|
||||
<UserInfoCard :currentCardNo="currentCardNo" :deviceInfo="deviceInfo" :onlineStatus="onlineStatus" :isDevice="userInfo.isDevice" />
|
||||
|
||||
<DeviceStatusCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" :isRealName="isRealName"
|
||||
@authentication="enterDetail('authentication')" />
|
||||
@@ -162,7 +162,9 @@
|
||||
kf_url: '-',
|
||||
mchList: [],
|
||||
imei: '-',
|
||||
max_clients: 1
|
||||
max_clients: 1,
|
||||
asset_type: 'device',
|
||||
bound_phone: ''
|
||||
});
|
||||
|
||||
let isRealName = ref(false);
|
||||
@@ -214,6 +216,8 @@
|
||||
currentCardNo.value = data.identifier || '-';
|
||||
deviceInfo.status = data.status || 1;
|
||||
deviceInfo.imei = data.imei || '-';
|
||||
deviceInfo.asset_type = data.asset_type || 'device';
|
||||
deviceInfo.bound_phone = data.bound_phone || '';
|
||||
isRealName.value = data.real_name_status === 1;
|
||||
realNameStatus.value = data.real_name_status === 1 ? '已实名' : '未实名';
|
||||
boundPhone.value = data.bound_phone || '';
|
||||
|
||||
@@ -141,6 +141,14 @@
|
||||
[currentPackage.value.package_id]
|
||||
);
|
||||
|
||||
// 检查是否有订单信息
|
||||
if (!orderResult || !orderResult.order) {
|
||||
uni.hideLoading();
|
||||
showModal.value = false;
|
||||
uni.showToast({ title: '订单创建失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const orderId = orderResult.order.order_id;
|
||||
|
||||
// 判断是否为强充订单
|
||||
@@ -189,6 +197,22 @@
|
||||
showModal.value = false;
|
||||
console.error('创建订单或支付失败', e);
|
||||
|
||||
// 特殊错误处理:订单正在创建中
|
||||
if (e.code === 1008) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '订单正在创建中,是否跳转到我的订单页面进行支付?',
|
||||
confirmText: '去支付',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({ url: '/pages/order-list/order-list' });
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 其他错误提示
|
||||
const errorMsg = e.msg || e.message || '操作失败,请稍后重试';
|
||||
uni.showToast({ title: errorMsg, icon: 'none' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user