diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index 9a282a1..3c03117 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -147,7 +147,7 @@
price += n.price * n.selectNum
}
})
- return Number(price).toFixed(3)
+ return Number(price).toFixed(2)
},
},
onLoad(){
diff --git a/pages_order/mine/individualTeam.vue b/pages_order/mine/individualTeam.vue
index dfe5579..85a3d40 100644
--- a/pages_order/mine/individualTeam.vue
+++ b/pages_order/mine/individualTeam.vue
@@ -100,14 +100,9 @@
},
methods: {
//点击tab栏
- clickTabs(index) {
- if (index == 0) {
- this.state = -1;
- } else {
- this.state = index - 1;
- }
- // this.queryParams.pageSize = 10
- // this.orderPage()
+ clickTabs({index}) {
+ this.queryParams.state = index;
+ this.getData()
},
// 跳转到钱包提现
toPurse() {
diff --git a/pages_order/order/createOrder.vue b/pages_order/order/createOrder.vue
index ad99efb..81ebf5d 100644
--- a/pages_order/order/createOrder.vue
+++ b/pages_order/order/createOrder.vue
@@ -255,7 +255,7 @@
price -= this.coupon.money
}
- return Number(price).toFixed(3)
+ return Number(price).toFixed(2)
},
...mapState(['userInfo', 'payOrderProduct']),
},
diff --git a/pages_order/order/firmOrder.vue b/pages_order/order/firmOrder.vue
index 5a2df5e..66c70e7 100644
--- a/pages_order/order/firmOrder.vue
+++ b/pages_order/order/firmOrder.vue
@@ -43,6 +43,11 @@
商品信息
+
+
+ 暂无商品信息
+
+
@@ -74,6 +79,11 @@
+
+
+
+ 请选择至少一件商品
+
@@ -119,7 +129,7 @@
-
+
@@ -182,8 +192,14 @@
price += n.price * (n.selectNum || 1)
}
})
- return Number(price).toFixed(3)
+ return Number(price).toFixed(2)
},
+ // 是否有选中的商品
+ hasSelectedProducts() {
+ return this.productInfo.commonShop &&
+ this.productInfo.commonShop.length > 0 &&
+ this.checkboxValue.length > 0;
+ }
},
onLoad(options) {
// 获取订单ID
@@ -321,6 +337,24 @@
// 提交订单
submitOrder(skipAddressCheck = false) {
+ // 检查是否有选中的商品
+ if (!this.hasSelectedProducts) {
+ uni.showToast({
+ title: '请选择至少一件商品',
+ icon: 'none'
+ });
+ return;
+ }
+
+ // 检查是否有商品
+ if (!this.productInfo.commonShop || this.productInfo.commonShop.length === 0) {
+ uni.showToast({
+ title: '暂无商品信息',
+ icon: 'none'
+ });
+ return;
+ }
+
if (!this.address.id) {
const addressForm = this.$refs.addressForm;
// 验证地址表单
@@ -357,22 +391,22 @@
}
})
+ // 如果没有选中商品,不创建订单
+ if (list.length === 0) {
+ uni.hideLoading();
+ uni.showToast({
+ title: '请选择至少一件商品',
+ icon: 'none'
+ });
+ return;
+ }
+
let data = {
addressId: this.address.id,
payType: 1, // 默认微信支付
orderId: this.orderId,
list: JSON.stringify(list),
}
-
- /*
- {
- addressId: this.address.id,
- productId: this.productInfo.id,
- num : 1,
- payType: 1, // 默认微信支付
- orderId: this.orderId
- }
- */
// 创建订单
this.$api('createSumOrder', data, res => {
@@ -701,5 +735,26 @@
}
}
}
+
+ // 空状态样式
+ .empty-state {
+ padding: 60rpx 30rpx;
+ text-align: center;
+
+ .empty-icon {
+ margin-bottom: 20rpx;
+ }
+
+ .empty-text {
+ font-size: 28rpx;
+ color: #999;
+ }
+ }
+
+ // 禁用按钮样式
+ .submit-btn-disabled {
+ background-color: #cccccc !important;
+ color: #ffffff !important;
+ }
}
diff --git a/pages_order/order/voiceOrder.vue b/pages_order/order/voiceOrder.vue
index 3a97cc9..39d5519 100644
--- a/pages_order/order/voiceOrder.vue
+++ b/pages_order/order/voiceOrder.vue
@@ -462,9 +462,9 @@
if (size < 1024) {
this.audioSize = size + 'B';
} else if (size < 1024 * 1024) {
- this.audioSize = (size / 1024).toFixed(3) + 'KB';
+ this.audioSize = (size / 1024).toFixed(2) + 'KB';
} else {
- this.audioSize = (size / (1024 * 1024)).toFixed(3) + 'MB';
+ this.audioSize = (size / (1024 * 1024)).toFixed(2) + 'MB';
}
},