Commit 31ea14fa0b66f8d0f9bf55275ea3f99396ee0574
1 parent
91c1740c
在切换地址的时候,控制支付按钮先变灰色,不能提交
Showing
5 changed files
with
16 additions
and
13 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| ... | ... | @@ -616,16 +616,18 @@ Page({ |
| 616 | 616 | }) |
| 617 | 617 | } else { |
| 618 | 618 | this.getuser_addr(function (ie) { |
| 619 | + | |
| 619 | 620 | //更换地址回来要重新调用计算价钱的接口 |
| 620 | - th.setData({ | |
| 621 | - user_addr: ie | |
| 622 | - }); | |
| 623 | 621 | if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { |
| 624 | 622 | th.setData({ |
| 625 | 623 | add_back: 1,same_ok:1 |
| 626 | 624 | }); |
| 627 | - if (this.data.bn_goods) th.calculatePrice2(); | |
| 625 | + //if(th.data.bn_goods) th.calculatePrice2(); | |
| 628 | 626 | } |
| 627 | + th.setData({ | |
| 628 | + user_addr: ie,is_show_sub:0 | |
| 629 | + }); | |
| 630 | + | |
| 629 | 631 | }) |
| 630 | 632 | //--更新默认地址--,看一下是不是跳到地址页面 |
| 631 | 633 | if (!getApp().globalData.is_cart_old) { | ... | ... |
packageC/pages/presell/cart/cart2.js
| ... | ... | @@ -203,7 +203,7 @@ Page({ |
| 203 | 203 | th.data.is_summit_ing = 0; |
| 204 | 204 | //更换地址回来要重新调用计算价钱的接口 |
| 205 | 205 | if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { |
| 206 | - th.setData({ user_addr: ie }); | |
| 206 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 207 | 207 | if (th.data.is_b_now == 1) { |
| 208 | 208 | if (th.data.bn_goods) { |
| 209 | 209 | th.setData({ add_back: 1,same_ok:1 }); |
| ... | ... | @@ -216,7 +216,7 @@ Page({ |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | } else { |
| 219 | - th.setData({ user_addr: ie }); | |
| 219 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 220 | 220 | } |
| 221 | 221 | var going = 0; |
| 222 | 222 | ... | ... |
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -240,7 +240,7 @@ Page({ |
| 240 | 240 | th.data.is_summit_ing = 0; |
| 241 | 241 | //更换地址回来要重新调用计算价钱的接口 |
| 242 | 242 | if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { |
| 243 | - th.setData({ user_addr: ie }); | |
| 243 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 244 | 244 | if (th.data.is_b_now == 1) { |
| 245 | 245 | if (th.data.bn_goods) { |
| 246 | 246 | th.setData({ add_back: 1,same_ok:1 }); |
| ... | ... | @@ -253,7 +253,7 @@ Page({ |
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | } else { |
| 256 | - th.setData({ user_addr: ie }); | |
| 256 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 257 | 257 | } |
| 258 | 258 | }); |
| 259 | 259 | var is_card_back = getApp().globalData.is_card_back; | ... | ... |
packageE/pages/cart/cart2_inte/cart2_inte.js
| ... | ... | @@ -195,7 +195,7 @@ Page({ |
| 195 | 195 | //th.data.prom_goods_map={}; |
| 196 | 196 | //更换地址回来要重新调用计算价钱的接口 |
| 197 | 197 | if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { |
| 198 | - th.setData({ user_addr: ie }); | |
| 198 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 199 | 199 | if (th.data.is_b_now == 1) { |
| 200 | 200 | if (th.data.bn_goods) { |
| 201 | 201 | th.setData({ add_back: 1,same_ok:1 }); |
| ... | ... | @@ -203,7 +203,7 @@ Page({ |
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | } else { |
| 206 | - th.setData({ user_addr: ie }); | |
| 206 | + th.setData({ user_addr: ie,show_submit:0 }); | |
| 207 | 207 | } |
| 208 | 208 | var going = 0; |
| 209 | 209 | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -552,11 +552,12 @@ Page({ |
| 552 | 552 | } else { |
| 553 | 553 | this.getuser_addr(function (ie) { |
| 554 | 554 | //更换地址回来要重新调用计算价钱的接口 |
| 555 | - th.setData({ user_addr: ie }); | |
| 555 | + | |
| 556 | 556 | if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { |
| 557 | 557 | th.setData({ add_back: 1,same_ok:1 }); |
| 558 | - if (th.data.bn_goods) th.calculatePrice2(); | |
| 558 | + //if (th.data.bn_goods) th.calculatePrice2(); | |
| 559 | 559 | } |
| 560 | + th.setData({ user_addr: ie,show_btn:0 }); | |
| 560 | 561 | }) |
| 561 | 562 | //--更新默认地址--,看一下是不是跳到地址页面 |
| 562 | 563 | if (!getApp().globalData.is_cart_old) { |
| ... | ... | @@ -862,7 +863,7 @@ Page({ |
| 862 | 863 | } |
| 863 | 864 | }) |
| 864 | 865 | if (!is_next){ |
| 865 | - th.setData({show_submit:1, submit: 0,same_ok:0,show_btn:1 }) | |
| 866 | + th.setData({show_submit:1, submit: 0,same_ok:0,show_btn:1}) | |
| 866 | 867 | return false |
| 867 | 868 | } |
| 868 | 869 | ... | ... |