Commit 31ea14fa0b66f8d0f9bf55275ea3f99396ee0574

Authored by yvan.ni
1 parent 91c1740c

在切换地址的时候,控制支付按钮先变灰色,不能提交

packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -616,16 +616,18 @@ Page({ @@ -616,16 +616,18 @@ Page({
616 }) 616 })
617 } else { 617 } else {
618 this.getuser_addr(function (ie) { 618 this.getuser_addr(function (ie) {
  619 +
619 //更换地址回来要重新调用计算价钱的接口 620 //更换地址回来要重新调用计算价钱的接口
620 - th.setData({  
621 - user_addr: ie  
622 - });  
623 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { 621 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) {
624 th.setData({ 622 th.setData({
625 add_back: 1,same_ok:1 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 if (!getApp().globalData.is_cart_old) { 633 if (!getApp().globalData.is_cart_old) {
packageC/pages/presell/cart/cart2.js
@@ -203,7 +203,7 @@ Page({ @@ -203,7 +203,7 @@ Page({
203 th.data.is_summit_ing = 0; 203 th.data.is_summit_ing = 0;
204 //更换地址回来要重新调用计算价钱的接口 204 //更换地址回来要重新调用计算价钱的接口
205 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { 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 if (th.data.is_b_now == 1) { 207 if (th.data.is_b_now == 1) {
208 if (th.data.bn_goods) { 208 if (th.data.bn_goods) {
209 th.setData({ add_back: 1,same_ok:1 }); 209 th.setData({ add_back: 1,same_ok:1 });
@@ -216,7 +216,7 @@ Page({ @@ -216,7 +216,7 @@ Page({
216 } 216 }
217 } 217 }
218 } else { 218 } else {
219 - th.setData({ user_addr: ie }); 219 + th.setData({ user_addr: ie,show_submit:0 });
220 } 220 }
221 var going = 0; 221 var going = 0;
222 222
packageE/pages/cart/cart2/cart2.js
@@ -240,7 +240,7 @@ Page({ @@ -240,7 +240,7 @@ Page({
240 th.data.is_summit_ing = 0; 240 th.data.is_summit_ing = 0;
241 //更换地址回来要重新调用计算价钱的接口 241 //更换地址回来要重新调用计算价钱的接口
242 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { 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 if (th.data.is_b_now == 1) { 244 if (th.data.is_b_now == 1) {
245 if (th.data.bn_goods) { 245 if (th.data.bn_goods) {
246 th.setData({ add_back: 1,same_ok:1 }); 246 th.setData({ add_back: 1,same_ok:1 });
@@ -253,7 +253,7 @@ Page({ @@ -253,7 +253,7 @@ Page({
253 } 253 }
254 } 254 }
255 } else { 255 } else {
256 - th.setData({ user_addr: ie }); 256 + th.setData({ user_addr: ie,show_submit:0 });
257 } 257 }
258 }); 258 });
259 var is_card_back = getApp().globalData.is_card_back; 259 var is_card_back = getApp().globalData.is_card_back;
packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -195,7 +195,7 @@ Page({ @@ -195,7 +195,7 @@ Page({
195 //th.data.prom_goods_map={}; 195 //th.data.prom_goods_map={};
196 //更换地址回来要重新调用计算价钱的接口 196 //更换地址回来要重新调用计算价钱的接口
197 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { 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 if (th.data.is_b_now == 1) { 199 if (th.data.is_b_now == 1) {
200 if (th.data.bn_goods) { 200 if (th.data.bn_goods) {
201 th.setData({ add_back: 1,same_ok:1 }); 201 th.setData({ add_back: 1,same_ok:1 });
@@ -203,7 +203,7 @@ Page({ @@ -203,7 +203,7 @@ Page({
203 } 203 }
204 } 204 }
205 } else { 205 } else {
206 - th.setData({ user_addr: ie }); 206 + th.setData({ user_addr: ie,show_submit:0 });
207 } 207 }
208 var going = 0; 208 var going = 0;
209 209
pages/cart/cart2_pt/cart2_pt.js
@@ -552,11 +552,12 @@ Page({ @@ -552,11 +552,12 @@ Page({
552 } else { 552 } else {
553 this.getuser_addr(function (ie) { 553 this.getuser_addr(function (ie) {
554 //更换地址回来要重新调用计算价钱的接口 554 //更换地址回来要重新调用计算价钱的接口
555 - th.setData({ user_addr: ie }); 555 +
556 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { 556 if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) {
557 th.setData({ add_back: 1,same_ok:1 }); 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 if (!getApp().globalData.is_cart_old) { 563 if (!getApp().globalData.is_cart_old) {
@@ -862,7 +863,7 @@ Page({ @@ -862,7 +863,7 @@ Page({
862 } 863 }
863 }) 864 })
864 if (!is_next){ 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 return false 867 return false
867 } 868 }
868 869