From 1db7ea9b7cb018aef07efd13ef0ca87e47545ebd Mon Sep 17 00:00:00 2001
From: sexygoat <1538832180@qq.com>
Date: Tue, 14 Apr 2026 11:58:47 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/UserInfoCard.vue | 5 +++--
pages/index/index.vue | 8 ++++++--
pages/package-order/package-order.vue | 24 ++++++++++++++++++++++++
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/components/UserInfoCard.vue b/components/UserInfoCard.vue
index d4f0109..4a03863 100644
--- a/components/UserInfoCard.vue
+++ b/components/UserInfoCard.vue
@@ -8,7 +8,7 @@
{{ currentCardNo || '-' }}
- IMEI:{{ deviceInfo.imei || '-' }}
+ IMEI:{{ deviceInfo.imei || '-' }}
手机号:{{ deviceInfo.bound_phone || '-' }}
@@ -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 }
});
diff --git a/pages/index/index.vue b/pages/index/index.vue
index d69973e..1db9c22 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -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 || '';
diff --git a/pages/package-order/package-order.vue b/pages/package-order/package-order.vue
index 1fe71a6..2f25433 100644
--- a/pages/package-order/package-order.vue
+++ b/pages/package-order/package-order.vue
@@ -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' });
}