Commit c59d6a69d352ddab921216b81711f448ba2e31b8
1 parent
3eca0846
一件代发的bug优化
Showing
5 changed files
with
19 additions
and
9 deletions
pages/cart/cart2/cart2.js
@@ -1331,10 +1331,11 @@ Page({ | @@ -1331,10 +1331,11 @@ Page({ | ||
1331 | //如果有限制使用优惠券,就要减掉参与的活动商品的钱 | 1331 | //如果有限制使用优惠券,就要减掉参与的活动商品的钱 |
1332 | if (!item_map.is_xz_yh) q_conditin = o_price; | 1332 | if (!item_map.is_xz_yh) q_conditin = o_price; |
1333 | } | 1333 | } |
1334 | - | 1334 | + |
1335 | //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- | 1335 | //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- |
1336 | for (var j = 0; j < ord_goods.length; j++) { | 1336 | for (var j = 0; j < ord_goods.length; j++) { |
1337 | if (ord_goods[j].is_gift) continue; | 1337 | if (ord_goods[j].is_gift) continue; |
1338 | + if (ord_goods[j].whsle_id) continue; | ||
1338 | if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) { | 1339 | if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) { |
1339 | ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh; | 1340 | ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh; |
1340 | ord_goods[j].is_past = item_map.is_past; | 1341 | ord_goods[j].is_past = item_map.is_past; |
@@ -3096,6 +3097,7 @@ Page({ | @@ -3096,6 +3097,7 @@ Page({ | ||
3096 | //如果只有代发商品的时候 | 3097 | //如果只有代发商品的时候 |
3097 | if(df_goods.length>0 && item.order_goods.length<=0){ | 3098 | if(df_goods.length>0 && item.order_goods.length<=0){ |
3098 | item.order_goods=df_goods; | 3099 | item.order_goods=df_goods; |
3100 | + item.is_whsle=1; | ||
3099 | } | 3101 | } |
3100 | pdata.push(item); | 3102 | pdata.push(item); |
3101 | } | 3103 | } |
pages/cart/cart_wk/cart_wk.js
@@ -297,7 +297,7 @@ Page({ | @@ -297,7 +297,7 @@ Page({ | ||
297 | } else { | 297 | } else { |
298 | var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money; | 298 | var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money; |
299 | allpice = allpice.toFixed(2); | 299 | allpice = allpice.toFixed(2); |
300 | - th.setData({ exp_price: 0, allpice: allpice }) | 300 | + th.setData({ exp_price: 0, allpice: allpice,submit:0 }) |
301 | } | 301 | } |
302 | }, | 302 | }, |
303 | 303 | ||
@@ -354,7 +354,7 @@ Page({ | @@ -354,7 +354,7 @@ Page({ | ||
354 | 354 | ||
355 | 355 | ||
356 | //如果有再计算价格的过程中,不能提交订单 | 356 | //如果有再计算价格的过程中,不能提交订单 |
357 | - if(submit){ return false} | 357 | + if(this.data.submit){ return false} |
358 | 358 | ||
359 | //--物流支付时要有地址-- | 359 | //--物流支付时要有地址-- |
360 | if (this.data.exp_type == 0 && this.data.user_addr == null) { | 360 | if (this.data.exp_type == 0 && this.data.user_addr == null) { |
@@ -486,7 +486,7 @@ Page({ | @@ -486,7 +486,7 @@ Page({ | ||
486 | //----计算物流的钱---- | 486 | //----计算物流的钱---- |
487 | async calculate_wuliu() { | 487 | async calculate_wuliu() { |
488 | //让按钮变灰色 | 488 | //让按钮变灰色 |
489 | - th.setData({submit:1}); | 489 | + this.setData({submit:1}); |
490 | var to = getApp(), th = this; | 490 | var to = getApp(), th = this; |
491 | //to.getwuliuprice(async function (rs) { | 491 | //to.getwuliuprice(async function (rs) { |
492 | var o_shipping_price = 0, goods_weight = -1, goods_piece = -1, good = th.data.goods; | 492 | var o_shipping_price = 0, goods_weight = -1, goods_piece = -1, good = th.data.goods; |
pages/togoin/togoin.js
@@ -11,6 +11,7 @@ Page({ | @@ -11,6 +11,7 @@ Page({ | ||
11 | store_logo:'', | 11 | store_logo:'', |
12 | first_leader:'', //-- 邀请人 -- | 12 | first_leader:'', //-- 邀请人 -- |
13 | config2:null, | 13 | config2:null, |
14 | + sub:0 | ||
14 | }, | 15 | }, |
15 | onLoad: function (options) { | 16 | onLoad: function (options) { |
16 | if (wx.getUserProfile) { | 17 | if (wx.getUserProfile) { |
@@ -232,8 +233,13 @@ Page({ | @@ -232,8 +233,13 @@ Page({ | ||
232 | } | 233 | } |
233 | }) | 234 | }) |
234 | 235 | ||
235 | - | ||
236 | }else{ | 236 | }else{ |
237 | + | ||
238 | + this.setData({sub:1}); | ||
239 | + wx.showLoading({ | ||
240 | + title:'处理中.', | ||
241 | + mask:true | ||
242 | + }) | ||
237 | this.zu_ce(dd); //调用注册的函数 | 243 | this.zu_ce(dd); //调用注册的函数 |
238 | } | 244 | } |
239 | 245 | ||
@@ -256,9 +262,11 @@ Page({ | @@ -256,9 +262,11 @@ Page({ | ||
256 | 262 | ||
257 | }, | 263 | }, |
258 | failStatus: function (t) { | 264 | failStatus: function (t) { |
259 | - return app.my_warnning("授权登入失败,请稍后再试!", 0, that); | 265 | + th.setData({sub:0}); |
266 | + return app.my_warnning("授权登入失败,请稍后再试!", 0, th); | ||
260 | }, | 267 | }, |
261 | fail: function (t) { | 268 | fail: function (t) { |
269 | + th.setData({sub:0}); | ||
262 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | 270 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; |
263 | } | 271 | } |
264 | }); | 272 | }); |
pages/togoin/togoin.wxml
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | </view> | 68 | </view> |
69 | <view class="flex btn_view"> | 69 | <view class="flex btn_view"> |
70 | <view bindtap="close_pop_back" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">暂不授权</view> | 70 | <view bindtap="close_pop_back" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">暂不授权</view> |
71 | - <button style="height: 100%;" class="g_mobile f2 flex ali-c flex-center2 fs36 txt-red" open-type="getPhoneNumber" bindgetphonenumber="getphone">立即授权</button> | 71 | + <button disabled="{{sub}}" style="height: 100%;" class="g_mobile f2 flex ali-c flex-center2 fs36 txt-red" open-type="getPhoneNumber" bindgetphonenumber="getphone">立即授权</button> |
72 | </view> | 72 | </view> |
73 | </view> | 73 | </view> |
74 | </view> | 74 | </view> |
utils/util.js
@@ -685,8 +685,8 @@ module.exports = { | @@ -685,8 +685,8 @@ module.exports = { | ||
685 | if (e.data.code == 0 && e.data.data ) { | 685 | if (e.data.code == 0 && e.data.data ) { |
686 | // 提示框 | 686 | // 提示框 |
687 | wx.showModal({ | 687 | wx.showModal({ |
688 | - title: '注册邀请', | ||
689 | - content: e.data.data.vipname+'邀请你成为会员?', | 688 | + title: '邀请登陆', |
689 | + content: e.data.data.vipname+'邀请你登录成为会员?', | ||
690 | success: function (res) { | 690 | success: function (res) { |
691 | if (res.confirm) { | 691 | if (res.confirm) { |
692 | getApp().goto("/pages/togoin/togoin"); | 692 | getApp().goto("/pages/togoin/togoin"); |