|
|
@@ -17,7 +17,7 @@
|
|
|
<div class="card">
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>购买数量</span>
|
|
|
- <numbox v-model="count" :min="1" @change="countchange" />
|
|
|
+ <numbox v-model="count" :min="1" :max.sync="stock_num" @change="countchange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="money card">
|
|
|
@@ -66,6 +66,7 @@ export default {
|
|
|
deduction: 0,
|
|
|
actuallypaid: 0,
|
|
|
chabao: 0,
|
|
|
+ stock_num: 1,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -96,6 +97,7 @@ export default {
|
|
|
da[key].checked = true;
|
|
|
this.selectitem = da[key];
|
|
|
this.egralf();
|
|
|
+ this.getproductInfo(da[key].product_no);
|
|
|
},
|
|
|
egralf() {
|
|
|
let i1 = this.egral.integral,
|
|
|
@@ -130,6 +132,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 获取产品详情
|
|
|
+ getproductInfo(va){
|
|
|
+ post("local/coupon/productInfo", { product_no: va, type: 0 }).then(res => {
|
|
|
+ if (res.code == 0 && res.data.code == 200) {
|
|
|
+ this.stock_num = res.data.data.stock_num;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.getIntegral();
|
|
|
@@ -145,6 +155,9 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped lang='scss'>
|
|
|
+.discountCoupon{
|
|
|
+ padding-bottom: 130rpx;
|
|
|
+}
|
|
|
.products {
|
|
|
background-color: #fff;
|
|
|
padding: 0 30rpx 28rpx;
|