diff --git a/packageA/pages/checkin/checkin.wxml b/packageA/pages/checkin/checkin.wxml index ac082ff..82cc42f 100644 --- a/packageA/pages/checkin/checkin.wxml +++ b/packageA/pages/checkin/checkin.wxml @@ -91,41 +91,40 @@ - - - - - - - - - - - + + + + + + + + - - - - - + + + + + + + + + + - - + + + + 小积分大作为 + 积分抵用现金,积少成多 + + + 去购物 Go! + + + - - - - - + diff --git a/packageA/pages/distribution/myteam/myteam.wxml b/packageA/pages/distribution/myteam/myteam.wxml index 445c02c..23f27bb 100644 --- a/packageA/pages/distribution/myteam/myteam.wxml +++ b/packageA/pages/distribution/myteam/myteam.wxml @@ -11,7 +11,7 @@ {{item.nickname}} - 分销会员 + 分销会员 普通会员 {{filter.format_time(item.reg_time)}} diff --git a/packageB/pages/zuhegou/index/index.js b/packageB/pages/zuhegou/index/index.js index 6293095..af5ec6c 100644 --- a/packageB/pages/zuhegou/index/index.js +++ b/packageB/pages/zuhegou/index/index.js @@ -1914,7 +1914,7 @@ Page({ var need_to_buy = 0; var data = this.data.list; var all_zhqty = 0; //所有商品要求起购数之后 - var zhqty_bz=[]; //超量 + var zhqty_bz = []; //超量 var no_in_arr = []; for (var i in data) { var item = data[i]; @@ -1965,91 +1965,107 @@ Page({ //看一下剩下的数量有没有满足组合购的要求,以及要不要倍增 if (this.data.act.is_bz && no_in_arr.length >= this.data.act.zhbuyqty) { - var bz_num_ok=0; //超量倍增是否满足 - var delete_num=0; - var zhqty_len=0; //几个超量倍增 + var bz_num_ok = 0; //超量倍增是否满足 + var delete_num = 0; + var zhqty_len = 0; //几个超量倍增 var be = parseInt(no_in_arr.length / this.data.act.zhbuyqty); //看一下是几倍 - if(this.data.act.is_bzyh && zhqty_bz.length > 0 ){ - if(zhqty_bz.length>1){ - zhqty_len=1; - let min_bz_num= Math.min.apply(Math, zhqty_bz.map(function(o) {return o['num']})); - let new_arr=zhqty_bz.filter(ii=>{ - return ii['num']==min_bz_num + if (this.data.act.is_bzyh && zhqty_bz.length > 0) { + if (zhqty_bz.length > 1) { + let zhqty_bz_arr = []; + let zhqty_bz_flag = zhqty_bz.every((item1, i) => { + var bz_num = be * item1['zhqty']; //超量倍增 + var num = item1['num'] - item1['zhqty']; //购买数量减去超量 + if (bz_num > num) { + zhqty_bz_arr.push(item1); + zhqty_bz.splice(i, 1) + } + return bz_num <= num; }) - var vv=new_arr[0]; - // be=new_arr[0].zhqty; - var bz_num=be*new_arr[0].zhqty; //超量倍增 - var num=min_bz_num-new_arr[0].zhqty; //购买数量减去超量 - // if(num > 0){ - bz_num_ok=bz_num-num; - if(bz_num_ok <= 0){ + if (zhqty_bz_flag) { + for (let i = 0; i < zhqty_bz.length; i++) { + var vv = zhqty_bz[i]; + for (let j = 0; j < be * vv['zhqty']; j++) { + let index = no_in_arr.findIndex(i => { + return vv.goods_id === i.goods_id + }) + if (index > -1) { + delete_num++ + no_in_arr.splice(index, 1) + } + } + } + } else { + let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { + return o['num'] + })); + let new_arr = zhqty_bz_arr.filter(ii => { + return ii['num'] == min_bz_num + }) + var vv = new_arr[0]; + var bz_num = be * new_arr[0].zhqty; //超量倍增 + var num = min_bz_num - new_arr[0].zhqty; //购买数量减去超量 + bz_num_ok = bz_num - num; + if (bz_num_ok <= 0) { //超量倍增满足,超量倍增就等于倍数 - bz_num_ok=bz_num; - }else{ + bz_num_ok = bz_num; + } else { //超量倍增不满足,倍数要减去多出得 - // be=be-bz_num_ok; - if(num % vv.zhqty == 0){ - be=num/vv.zhqty; - // bz_num_ok=num; - }else{ - be = Math.floor(num/vv.zhqty) - // bz_num_ok=be * vv.zhqty ; - } - bz_num_ok=be * vv.zhqty ; + // be=be-bz_num_ok; + if (num % vv.zhqty == 0) { + be = num / vv.zhqty; + } else { + be = Math.floor(num / vv.zhqty) + } + bz_num_ok = be * vv.zhqty; } - for(let i=0;i{ - return vv.goods_id===i.goods_id - }) - if(index > -1){ - delete_num++ - no_in_arr.splice(index,1) - } - } + + for (let j = 0; j < bz_num_ok; j++) { + let index = no_in_arr.findIndex(i => { + return vv.goods_id === i.goods_id + }) + if (index > -1) { + delete_num++ + no_in_arr.splice(index, 1) + } } - // } - aprice += be * aprice; - }else{ - var vv=zhqty_bz[0]; - var bz_num=be*vv.zhqty; //超量倍增 - var num=vv['num']-vv.zhqty; //购买数量减去超量 - if(num > 0){ - bz_num_ok=bz_num-num; - if(bz_num_ok <= 0){ - //超量倍增满足,超量倍增就等于倍数 - bz_num_ok=bz_num; - }else{ - //超量倍增不满足,倍数要减去多出得 - // be=be-bz_num_ok; - if(num % vv.zhqty == 0){ - be=num/vv.zhqty; - // bz_num_ok=num; - }else{ - be = Math.floor(num/vv.zhqty) - // bz_num_ok=be * vv.zhqty; - } - bz_num_ok=be * vv.zhqty; + } + } else { + var vv = zhqty_bz[0]; + var bz_num = be * vv.zhqty; //超量倍增 + var num = vv['num'] - vv.zhqty; //购买数量减去超量 + if (num > 0) { + bz_num_ok = bz_num - num; + if (bz_num_ok <= 0) { + //超量倍增满足,超量倍增就等于倍数 + bz_num_ok = bz_num; + } else { + //超量倍增不满足,倍数要减去多出得 + // be=be-bz_num_ok; + if (num % vv.zhqty == 0) { + be = num / vv.zhqty; + } else { + be = Math.floor(num / vv.zhqty) } - for(let j=0;j{ - return vv.goods_id===i.goods_id - }) - if(index > -1){ - delete_num++ - no_in_arr.splice(index,1) - } + bz_num_ok = be * vv.zhqty; + } + for (let j = 0; j < bz_num_ok; j++) { + let index = no_in_arr.findIndex(i => { + return vv.goods_id === i.goods_id + }) + if (index > -1) { + delete_num++ + no_in_arr.splice(index, 1) } - }else{ - zhqty_len=1; } - } + } else { + zhqty_len = 1; + } + } } - if(!zhqty_len){ + if (!zhqty_len) { //多个超量就不用pop了 aprice += be * aprice; - let pop_num=be * this.data.act.zhbuyqty - delete_num; + let pop_num = be * this.data.act.zhbuyqty - delete_num; for (var m = 0; m < pop_num; m++) { no_in_arr.pop(); } diff --git a/packageC/pages/group_list/group_list.wxml b/packageC/pages/group_list/group_list.wxml index 55ab6c2..7d63580 100644 --- a/packageC/pages/group_list/group_list.wxml +++ b/packageC/pages/group_list/group_list.wxml @@ -21,7 +21,9 @@ - 已售{{item.buy_num+item.virtual_num}}件 + + 已售{{item.buy_num+item.virtual_num}}0 + {{goodlist[index].djs.day}}天{{goodlist[index].djs.hou}}时{{goodlist[index].djs.min}}分{{goodlist[index].djs.sec}}秒 diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index eb94f46..816801e 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -420,13 +420,14 @@ Page({ }) } }); + + //更新点击量 getApp().request.put("/api/weshop/goods/updateClick", { data: { store_id: os.stoid, goods_id: gid } }) }, - //--- 设置一下默认库存的数量 ---- set_def_storage(ee) { var that = this, th = this; @@ -799,6 +800,7 @@ Page({ } else { + console.log('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') wx.showModal({ title: t.data.msg, showCancel: !1, diff --git a/packageC/pages/presell/list/list.wxml b/packageC/pages/presell/list/list.wxml index 3deb8f2..30665c7 100644 --- a/packageC/pages/presell/list/list.wxml +++ b/packageC/pages/presell/list/list.wxml @@ -78,7 +78,8 @@ -- 没有更多 -- - + + diff --git a/pages/cart/cart/zh_calculate.js b/pages/cart/cart/zh_calculate.js index f86dd9e..04fae18 100644 --- a/pages/cart/cart/zh_calculate.js +++ b/pages/cart/cart/zh_calculate.js @@ -238,35 +238,54 @@ module.exports = { var be = parseInt(no_in_arr.length / act.zhbuyqty); //看一下是几倍 if (act.is_bzyh && zhqty_bz.length > 0) { if (zhqty_bz.length > 1) { - zhqty_len = 1; - let min_bz_num = Math.min.apply(Math, zhqty_bz.map(function (o) { - return o['num'] - })); - let new_arr = zhqty_bz.filter(ii => { - return ii['num'] == min_bz_num + let zhqty_bz_arr = []; + let zhqty_bz_flag = zhqty_bz.every((item1, i) => { + var bz_num = be * item1['zhqty']; //超量倍增 + var num = item1['num'] - item1['zhqty']; //购买数量减去超量 + if (bz_num > num) { + zhqty_bz_arr.push(item1); + zhqty_bz.splice(i, 1) + } + return bz_num <= num; }) - var vv = new_arr[0]; - // be=new_arr[0].zhqty; - var bz_num = be * new_arr[0].zhqty; //超量倍增 - var num = min_bz_num - new_arr[0].zhqty; //购买数量减去超量 - // if(num > 0){ - bz_num_ok = bz_num - num; - if (bz_num_ok <= 0) { - //超量倍增满足,超量倍增就等于倍数 - bz_num_ok = bz_num; + if (zhqty_bz_flag) { + for (let i = 0; i < zhqty_bz.length; i++) { + var vv = zhqty_bz[i]; + for (let j = 0; j < be * vv['zhqty']; j++) { + let index = no_in_arr.findIndex(i => { + return vv.goods_id === i.goods_id + }) + if (index > -1) { + delete_num++ + no_in_arr.splice(index, 1) + } + } + } } else { - //超量倍增不满足,倍数要减去多出得 - // be=be-bz_num_ok; - if (num % vv.zhqty == 0) { - be = num / vv.zhqty; - bz_num_ok = num; + let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { + return o['num'] + })); + let new_arr = zhqty_bz_arr.filter(ii => { + return ii['num'] == min_bz_num + }) + var vv = new_arr[0]; + var bz_num = be * new_arr[0].zhqty; //超量倍增 + var num = min_bz_num - new_arr[0].zhqty; //购买数量减去超量 + bz_num_ok = bz_num - num; + if (bz_num_ok <= 0) { + //超量倍增满足,超量倍增就等于倍数 + bz_num_ok = bz_num; } else { - be = Math.floor(num / vv.zhqty) - bz_num_ok = num - (be * vv.zhqty); + //超量倍增不满足,倍数要减去多出得 + // be=be-bz_num_ok; + if (num % vv.zhqty == 0) { + be = num / vv.zhqty; + } else { + be = Math.floor(num / vv.zhqty) + } + bz_num_ok = be * vv.zhqty; } - } - for (let i = 0; i < zhqty_bz.length; i++) { - var vv = zhqty_bz[i]; + for (let j = 0; j < bz_num_ok; j++) { let index = no_in_arr.findIndex(i => { return vv.goods_id === i.goods_id @@ -277,9 +296,7 @@ module.exports = { } } } - // } - aprice += be * aprice; - } else { + } else { var vv = zhqty_bz[0]; var bz_num = be * vv.zhqty; //超量倍增 var num = vv['num'] - vv.zhqty; //购买数量减去超量 @@ -293,11 +310,12 @@ module.exports = { // be=be-bz_num_ok; if (num % vv.zhqty == 0) { be = num / vv.zhqty; - bz_num_ok = num; + // bz_num_ok = num; } else { be = Math.floor(num / vv.zhqty) - bz_num_ok = num - (be * vv.zhqty); + // bz_num_ok = num - (be * vv.zhqty); } + bz_num_ok = be * vv.zhqty; } // be=vv.num; for (let j = 0; j < bz_num_ok; j++) { diff --git a/pages/cart/cart2/zh_calculate.js b/pages/cart/cart2/zh_calculate.js index d37ead5..0475ca1 100644 --- a/pages/cart/cart2/zh_calculate.js +++ b/pages/cart/cart2/zh_calculate.js @@ -151,49 +151,65 @@ module.exports = { let be = parseInt(no_in_arr.length / act.zhbuyqty); //看一下是几倍 if (act.is_bzyh && zhqty_bz.length > 0) { if (zhqty_bz.length > 1) { - zhqty_len = 1; - let min_bz_num = Math.min.apply(Math, zhqty_bz.map(function (o) { - return o['num'] - })); - let new_arr = zhqty_bz.filter(ii => { - return ii['num'] == min_bz_num + let zhqty_bz_arr = []; + let zhqty_bz_flag = zhqty_bz.every((item1, i) => { + var bz_num = be * item1['zhqty']; //超量倍增 + var num = item1['num'] - item1['zhqty']; //购买数量减去超量 + if (bz_num > num) { + zhqty_bz_arr.push(item1); + zhqty_bz.splice(i, 1) + } + return bz_num <= num; }) - var vv = new_arr[0]; - // be=new_arr[0].zhqty; - var bz_num = be * new_arr[0].zhqty; //超量倍增 - var num = min_bz_num - new_arr[0].zhqty; //购买数量减去超量 - // if(num > 0){ - bz_num_ok = bz_num - num; - if (bz_num_ok <= 0) { - //超量倍增满足,超量倍增就等于倍数 - bz_num_ok = bz_num; + if (zhqty_bz_flag) { + for (let i = 0; i < zhqty_bz.length; i++) { + var vv = zhqty_bz[i]; + for (let j = 0; j < be * vv['zhqty']; j++) { + let index = no_in_arr.findIndex(i => { + return vv.goods_id === i.goods_id + }) + if (index > -1) { + delete_num++ + no_in_arr.splice(index, 1) + } + } + } } else { - //超量倍增不满足,倍数要减去多出得 - // be=be-bz_num_ok; - if (num % vv.zhqty == 0) { - be = num / vv.zhqty; - bz_num_ok = num; + let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { + return o['num'] + })); + let new_arr = zhqty_bz_arr.filter(ii => { + return ii['num'] == min_bz_num + }) + var vv = new_arr[0]; + var bz_num = be * new_arr[0].zhqty; //超量倍增 + var num = min_bz_num - new_arr[0].zhqty; //购买数量减去超量 + bz_num_ok = bz_num - num; + if (bz_num_ok <= 0) { + //超量倍增满足,超量倍增就等于倍数 + bz_num_ok = bz_num; } else { - be = Math.floor(num / vv.zhqty) - bz_num_ok = num - (be * vv.zhqty); + //超量倍增不满足,倍数要减去多出得 + // be=be-bz_num_ok; + if (num % vv.zhqty == 0) { + be = num / vv.zhqty; + } else { + be = Math.floor(num / vv.zhqty) + } + bz_num_ok = be * vv.zhqty; } - } - for (let i = 0; i < zhqty_bz.length; i++) { - var vv = zhqty_bz[i]; + for (let j = 0; j < bz_num_ok; j++) { let index = no_in_arr.findIndex(i => { return vv.goods_id === i.goods_id }) - if(index > -1){ + if (index > -1) { delete_num++ no_in_arr.splice(index, 1) } - } } - // } - aprice += be * aprice; - } else { + } else { var vv = zhqty_bz[0]; var bz_num = be * vv.zhqty; //超量倍增 var num = vv['num'] - vv.zhqty; //购买数量减去超量 @@ -207,11 +223,12 @@ module.exports = { // be=be-bz_num_ok; if (num % vv.zhqty == 0) { be = num / vv.zhqty; - bz_num_ok = num; + // bz_num_ok = num; } else { be = Math.floor(num / vv.zhqty) - bz_num_ok = num - (be * vv.zhqty); + // bz_num_ok = num - (be * vv.zhqty); } + bz_num_ok = be * vv.zhqty; } // be=vv.num; for (let j = 0; j < bz_num_ok; j++) { diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 101635a..ed3a012 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -706,6 +706,7 @@ Page({ //---展示--- onShow: function () { var goods_list = null, th = this, that = this; + this.data.is_go_to_team_show=0; var show_prew_img = this.data.show_prew_img if (show_prew_img) { show_prew_img = 0; diff --git a/pages/goods/search/g_filter.wxs b/pages/goods/search/g_filter.wxs index 814e187..7b575ba 100644 --- a/pages/goods/search/g_filter.wxs +++ b/pages/goods/search/g_filter.wxs @@ -84,7 +84,8 @@ var g_filters = { get_goods_url:function(item){ - var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id + var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id + // 预售活动 if(item.prom_type==8){ url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id } diff --git a/pages/team/team_success/team_success.js b/pages/team/team_success/team_success.js index c784df9..0bb3b38 100644 --- a/pages/team/team_success/team_success.js +++ b/pages/team/team_success/team_success.js @@ -183,6 +183,14 @@ Page({ await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, { data: { } }).then(res => { + if(res.data.code==0){ + teamlist=res.data.data; + this.setData({ + teamlist:teamlist + }); + var nt =ut.gettimestamp(); + teamlist.status=0; + if (nt >= teamlist.start_time) teamlist.status = 1; goods_id = res.data.data.goods_id; id = res.data.data.id; @@ -200,10 +208,9 @@ Page({ }) max_num=max; min_price=pri; - } - + } //获取商品信息 getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, { }).then(res => { diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index a8a3b1e..811eae6 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -334,8 +334,11 @@ Page({ //--------立即支付---------- async jumpToCart4(e) { - - var th=this; + + if(this.data.paying) return false; + this.setData({paying:1}); + + var th=this; if(this.data.optionIsGoup) wx.navigateTo({ url: "/pages/team/team_confirm/team_confirm?orderSn=" + this.data.order.order_sn + "&orderPay=true" @@ -353,6 +356,7 @@ Page({ title: '提示', content: '线下取价功能已经关闭或者过期!' }); + th.setData({paying:0}); return false; } @@ -385,9 +389,10 @@ Page({ var buyed_mum2=goodsbuynum+good.goods_num; if (buyed_mum2 > limit && limit > 0) { - var content=gg.goods_name+'购买数量超出商品限购,请取消订单'; - th.toast(content); - return false; + var content=gg.goods_name+'购买数量超出商品限购,请取消订单'; + th.toast(content); + th.setData({paying:0}); + return false; } //当是组合优惠的时候 if(good.prom_type==7){ @@ -421,7 +426,8 @@ Page({ if (!isok){ var content=gg.goods_name+'活动已经结束,请取消订单'; th.toast(content); - return false; + th.setData({paying:0}); + return false; } var url1 = "/api/weshop/prom/zhbuyGoods/page"; @@ -450,6 +456,7 @@ Page({ var content= good['goods_name']+"超出活动限购\n"; th.toast(content); + th.setData({paying:0}); return false; } } @@ -493,6 +500,7 @@ Page({ var content = good.goods_name + '未找到活动,请取消订单重新购买' th.toast(content); + th.setData({paying:0}); p_ok = 0; } }) @@ -522,7 +530,9 @@ Page({ }) } - if (!p_ok) return false; + if (!p_ok){ + th.setData({paying:0});return false; + } } //商品的普通购买 ,不要进行判断 @@ -530,7 +540,8 @@ Page({ if(gg.prom_type!=good.prom_type && gg.prom_type>0) { var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; th.toast(content); - return false; + th.setData({paying:0}); + return false; } }else{ if((gg.prom_type==1 || gg.prom_type==3 || gg.prom_type==5 || gg.prom_type==6 || gg.prom_type==4) @@ -581,9 +592,10 @@ Page({ var t_now=ut.gettimestamp(); if(prom.is_end==0 && prom.start_timet_now){ - var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; - th.toast(content); - return false; + var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; + th.toast(content); + th.setData({paying:0}); + return false; } } }else{ @@ -602,7 +614,9 @@ Page({ } } }) - if(!t_ok) return false; + if(!t_ok) { + th.setData({paying:0});return false; + } } //-- 如果有参加线下取价 -- @@ -626,7 +640,8 @@ Page({ var content=gg.goods_name + '商品的价格发生了变化,请取消订单重新购买22'; th.toast(content); - return false; + th.setData({paying:0}); + return false; } } @@ -637,17 +652,18 @@ Page({ ob=obj; }) if(ob.code==-1){ - var content=gg.goods_name+'门店库存不足,请取消订单'; th.toast(content); - return false; + th.setData({paying:0}); + return false; } }else{ if(good.goods_num>store_count){ - var content=gg.goods_name+'商品的库存不足,请取消订单'; - th.toast(content); + var content=gg.goods_name+'商品的库存不足,请取消订单'; + th.toast(content); + th.setData({paying:0}); return false; } @@ -703,41 +719,46 @@ Page({ var content=goodsinfo.goods_name+'商品的活动已经结束,请取消订单重新购买'; th.toast(content); + th.setData({paying:0}); return false; } buyed_mum2=promgoodsbuynum+good.goods_num; if (buyed_mum2 > prom.buy_limit && prom.buy_limit > 0) { - - var content=goodsinfo.goods_name+'购买数量超出商品活动限购,请取消订单重新购买'; - th.toast(content); - return false; + var content=goodsinfo.goods_name+'购买数量超出商品活动限购,请取消订单重新购买'; + th.toast(content); + th.setData({paying:0}); + return false; } //看一下会员的秒杀价格是不是发生了变化 if(goodsinfo.prom_type==1 && goodsinfo.goods_price!=prom.price){ var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化'; th.toast(content); + th.setData({paying:0}); return false; } //看一下会员的团购价格是不是发生了变化 if(goodsinfo.prom_type==2 && goodsinfo.goods_price!=prom.price){ - var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化'; - th.toast(content); + var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化'; + th.toast(content); + th.setData({paying:0}); return false; } if(goodsinfo.prom_type==4){ if (good.goods_num > prom.limitqty-prom.buy_num) { - var content=goodsinfo.goods_name+'购买数量超出商品活动库存,请取消订单'; - th.toast(content); - return false; + var content=goodsinfo.goods_name+'购买数量超出商品活动库存,请取消订单'; + th.toast(content); + th.setData({paying:0}); + return false; } }else if(goodsinfo.prom_type == 1 || goodsinfo.prom_type == 2 || goodsinfo.prom_type == 6 ) { if(order.add_time+5*60 支付尾款 - + diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index c5058a1..5d61095 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -509,6 +509,9 @@ Page({ /*----------跳转支付-----------*/ async jumpToCart4(t) { + if(this.data.paying) return false; + this.setData({paying:1}); + var o_index = t.currentTarget.dataset.idx; var e = this.data.orderList[o_index]; var th = this; @@ -530,6 +533,7 @@ Page({ if (knum <= 0) { getApp().confirmBox("库存为0,支付失败"); + th.setData({paying:0}); return false; } @@ -544,6 +548,7 @@ Page({ title: '提示', content: '线下取价功能已经关闭或者过期!' }); + th.setData({paying:0}); return false; } @@ -577,6 +582,7 @@ Page({ if (buyed_mum2 > limit && limit > 0) { var content = gg.goods_name + '购买数量超出商品限购,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } //当是组合优惠的时候 @@ -611,6 +617,7 @@ Page({ if (!isok) { var content = gg.goods_name + '活动已经结束,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } @@ -637,6 +644,7 @@ Page({ if (good.goods_num + promgoodsbuynum > good['buyqty']) { var content = good['goods_name'] + "超出活动限购\n"; th.toast(content); + th.setData({paying:0}); return false; } } @@ -674,12 +682,14 @@ Page({ if(good.goods_num>presellList.presell_sumqty-presellList.buy_goodnum){ var content = good.goods_name + '购买数量超出商品库存,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } var buyed_mum3 = promgoodsbuynum + good.goods_num; if (buyed_mum3 > presellList.vip_butyqty && presellList.vip_butyqty > 0) { var content = good.goods_name + '购买数量超出商品限购,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } @@ -753,7 +763,10 @@ Page({ }) } - if (!p_ok) return false; + if (!p_ok){ + th.setData({paying:0}); + return false; + } } //商品的普通购买 ,不要进行判断 @@ -762,6 +775,7 @@ Page({ if (gg.prom_type != good.prom_type && gg.prom_type>0) { var content = gg.goods_name + '商品的活动发生了变化,请取消订单重新购买'; th.toast(content); + th.setData({paying:0}); return false; } @@ -814,6 +828,7 @@ Page({ var content = gg.goods_name + '商品的活动发生了变化,请取消订单重新购买'; th.toast(content); + th.setData({paying:0}); return false; } } @@ -832,7 +847,9 @@ Page({ } } }) - if (!t_ok) return false; + if (!t_ok){ + th.setData({paying:0}); return false; + } } //-- 如果有参加线下取价 -- if (good.offline_cut > 0) wlist += encodeURIComponent(gg.erpwareid) + ","; @@ -856,6 +873,7 @@ Page({ var content = gg.goods_name + '商品的价格发生了变化,请取消订单重新购买1' th.toast(content); + th.setData({paying:0}); return false; } } @@ -870,6 +888,7 @@ Page({ var content = gg.goods_name + '门店库存不足,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } @@ -878,6 +897,7 @@ Page({ var content = gg.goods_name + '商品的库存不足,请取消订单'; th.toast(content); + th.setData({paying:0}); return false; } @@ -929,6 +949,7 @@ Page({ if (prom.is_end == 1 && prom.end_time < now) { var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单' th.toast(content); + th.setData({paying:0}); return false; } @@ -937,6 +958,7 @@ Page({ var content = goodsinfo.goods_name + '购买数量超出商品活动限购,请取消订单' th.toast(content); + th.setData({paying:0}); return false; } @@ -944,6 +966,7 @@ Page({ if(goodsinfo.prom_type==1 && goodsinfo.goods_price!=prom.price){ var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化'; th.toast(content); + th.setData({paying:0}); return false; } @@ -951,6 +974,7 @@ Page({ if(goodsinfo.prom_type==2 && goodsinfo.goods_price!=prom.price){ var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化'; th.toast(content); + th.setData({paying:0}); return false; } @@ -959,12 +983,14 @@ Page({ var content = goodsinfo.goods_name + '购买数量超出商品活动库存,请取消订单' th.toast(content); + th.setData({paying:0}); return false; } } else if(goodsinfo.prom_type == 1 || goodsinfo.prom_type == 2 || goodsinfo.prom_type == 6 ) { if(order.add_time+5*60支付尾款 - 立即支付 + + 支付中 + 立即支付 +