|
@@ -1692,8 +1692,9 @@ Page({
|
|
|
//绑定加数量事件
|
|
|
addCount(e) {
|
|
|
var that = this;
|
|
|
- var showNum = that.data.showNum;
|
|
|
+ var showNum = that.data.showNum * 1;
|
|
|
let num = this.data.minNumber;
|
|
|
+ console.log(showNum, num,"showNum")
|
|
|
if (num >= showNum){
|
|
|
that.setData({
|
|
|
hiddenmodal: false,
|
|
@@ -1707,6 +1708,7 @@ Page({
|
|
|
}, 1000)
|
|
|
return false;
|
|
|
}else{
|
|
|
+ console.log(num, showNum)
|
|
|
num++;
|
|
|
if (num == showNum){
|
|
|
this.setData({
|
|
@@ -1722,13 +1724,13 @@ Page({
|
|
|
|
|
|
//绑定减数量事件
|
|
|
minusCount(e) {
|
|
|
- let num = this.data.minNumber;
|
|
|
- let minnum = this.data.num;
|
|
|
+ let that = this;
|
|
|
+ let num = that.data.minNumber;
|
|
|
+ let minnum = that.data.num;
|
|
|
if (num <= minnum) {
|
|
|
that.setData({
|
|
|
hiddenmodal: false,
|
|
|
modalCont: '起订量为' + minnum + '件',
|
|
|
- minNumber: showNum
|
|
|
})
|
|
|
setTimeout(function () {
|
|
|
that.setData({
|
|
@@ -1738,7 +1740,7 @@ Page({
|
|
|
return false;
|
|
|
}
|
|
|
num--;
|
|
|
- this.setData({
|
|
|
+ that.setData({
|
|
|
"minNumber": num
|
|
|
})
|
|
|
},
|
|
@@ -1995,7 +1997,7 @@ Page({
|
|
|
var specifications = this.data.title;
|
|
|
|
|
|
var comGroupId = [];
|
|
|
-
|
|
|
+ console.log(number,"点击购买时获取的数量")
|
|
|
var styleName1 = '', styleName2 = '', styleName3 = '', styleName4 = '', styleName5 = '';
|
|
|
var styleId1 = '', styleId2 = '', styleId3 = '', styleId4 = '', styleId5 = '';
|
|
|
|
|
@@ -2198,7 +2200,7 @@ Page({
|
|
|
var cyc = that.data.cycle;
|
|
|
var minNumber = that.data.minNumber;
|
|
|
var limitNum = that.data.num;//起订量
|
|
|
-
|
|
|
+ console.log("第二次获取", that.data.minNumber)
|
|
|
var allPrice = parseFloat(that.data.showPrice);//商品总价格【价格 + 礼盒价格】
|
|
|
var goodPrice = parseFloat(that.data.showPrice) - parseFloat(that.data.clickBoxPrice);//商品单独的价格
|
|
|
|
|
@@ -2206,6 +2208,7 @@ Page({
|
|
|
if (id == 0) {//加入购物车
|
|
|
|
|
|
let num = parseInt(that.data.minNumber);
|
|
|
+ consolle.log("商品数量",num)
|
|
|
let oldNum = parseInt(that.data.cartNum);
|
|
|
let newNum = oldNum + num;
|
|
|
if (newNum > 99) {
|