Commit db430a0061ea0beab57bcc3e0c959d75301cf058

Authored by yvan.ni
1 parent be049639

自提购买的优化

packageC/pages/presell/cart/cart2.js
... ... @@ -1116,7 +1116,7 @@ Page({
1116 1116 //------------立即购买-------------
1117 1117 if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) {
1118 1118  
1119   - if (th.data.bn_exp_type == 0 && th.data.user_addr == null) {
  1119 + if( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) {
1120 1120 ff = false;
1121 1121 getApp().my_warnning("请选择收货地址", 0, th);
1122 1122 th.data.is_summit_ing = 0;
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -3815,7 +3815,7 @@ Page({
3815 3815 var ff = true;
3816 3816 //------------立即购买-------------
3817 3817 if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) {
3818   - if ( [0,2].indexOf(th.data.bn_exp_typ) == -1 && th.data.user_addr == null) {
  3818 + if ( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) {
3819 3819 ff = false;
3820 3820 getApp().my_warnning("请选择收货地址", 0, th);
3821 3821 th.data.is_summit_ing = 0;
... ...
packageE/pages/cart/cart2_inte/cart2_inte.js
... ... @@ -639,6 +639,7 @@ Page({
639 639 //---------计算立即购买----------
640 640 calculatePrice2:async function () {
641 641 var th = this, good = this.data.bn_goods;
  642 + if(!good) {return false }
642 643  
643 644 this.setData({submit:1})
644 645 wx.showLoading({ title: "处理中.", mask:true })
... ... @@ -1080,7 +1081,7 @@ Page({
1080 1081 //------------立即购买-------------
1081 1082 if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) {
1082 1083  
1083   - if (th.data.bn_exp_type == 0 && th.data.user_addr == null) {
  1084 + if ([0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) {
1084 1085 ff = false; getApp().my_warnning("请选择收货地址", 0, th);
1085 1086 th.data.is_summit_ing = 0;
1086 1087 }
... ...