diff --git a/colorui/main.css b/colorui/main.css
index 786d9ef..756344a 100644
--- a/colorui/main.css
+++ b/colorui/main.css
@@ -639,7 +639,7 @@ radio.white.checked .uni-radio-input {
box-sizing: border-box;
padding: 0 30upx;
font-size: 28upx;
- height: 64upx;
+ height: 60upx;
line-height: 1;
text-align: center;
text-decoration: none;
diff --git a/pages/order/confirm-order.vue b/pages/order/confirm-order.vue
index daf5fac..a1f555b 100644
--- a/pages/order/confirm-order.vue
+++ b/pages/order/confirm-order.vue
@@ -15,7 +15,7 @@
数量
-
+
@@ -98,15 +98,16 @@
type: 0,
order_id: 0,
ifDo: 1,
- ifPay: true
+ ifPay: true,
+ limit: 1
}
},
computed: {
total(){
return function(num, price){
- let big_num = new bigc(Number(num));
- big_num = big_num.times(Number(price));
- return big_num.round(2, 0).toString();
+ let big_price = new bigc(Number(price));
+ big_price = big_price.times(Number(num));
+ return big_price.round(2, 0).toString();
}
},
isRight(){
@@ -125,9 +126,20 @@
}
},
methods: {
+ changeNum(num) {
+ if(num > this.limit) {
+ this.$msg('该商品限购数量'+this.limit)
+ this.num = this.limit
+ return
+ }else if(num < 1) {
+ this.num = 1
+ }
+ },
getConfirmOrder() {
this.$http(this.API.API_COFIRMORDER_DETAILS, {goods_id: this.goods_id,goods_specs_id: this.goods_specs_id}).then(res => {
this.orderDetails = res.data
+ this.limit = res.data.goods.specs[0].limit
+ // this.limit = 10
this.skeletonLoading = false
})
},
@@ -136,7 +148,14 @@
this.num--
},
add() {
- this.num++
+ if(this.num < this.limit) {
+ this.num++
+ }else {
+ this.$msg('该商品限购数量'+this.limit)
+ this.num = this.limit
+ return
+ }
+
},
CheckboxChange(e) {
if(e.detail.value != '') {
diff --git a/pages/order/index.vue b/pages/order/index.vue
index 77b6c7f..eba7b54 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -19,9 +19,9 @@
-
-
-
+
+
+
@@ -226,6 +226,21 @@