Commit 6aca38b7d6b959a97fb341ccd84ab701eedfa8e2

Authored by yvan.ni
1 parent 136f912a

读取物流失败的bug优化

packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
... ... @@ -2608,18 +2608,21 @@ Page({
2608 2608 if (th.data.is_all_zt == 1) addr = null;
2609 2609 var val_arr = t.detail.value;
2610 2610  
2611   - if (th.data.is_all_zt != 1 && t_item.exp_type==0)
2612   - if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
2613   - th.data.is_summit_ing = 0;
2614   - getApp().confirmBox("读取物流失败");
2615   - return false;
2616   - }
2617   -
2618 2611 var order_prom_list_cart = th.data.order_prom_list_cart;
2619 2612  
2620 2613 //--组装推送数据--
2621 2614 for (var i = 0; i < order_prom_list_cart.length; i++) {
2622 2615 var t_item = order_prom_list_cart[i];
  2616 +
  2617 + if(t_item.exp_type==0) {
  2618 + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
  2619 + th.data.is_summit_ing = 0;
  2620 + getApp().confirmBox("读取物流失败");
  2621 + return false;
  2622 + }
  2623 + }
  2624 +
  2625 +
2623 2626 var item = {
2624 2627 'user_id': to.globalData.user_id,
2625 2628 'consignee': addr == null ? th.data.userinfo.mobile : addr.consignee,
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
... ... @@ -977,6 +977,7 @@ Page({
977 977 wx.showToast({
978 978 title: "计算物流错误", icon: 'none', duration: 2000
979 979 })
  980 + th.setData({show_submit:1, submit: 0,same_ok:0 })
980 981 return false;
981 982 }
982 983  
... ...
packageC/pages/payForAnother/payForAnother.js
... ... @@ -2283,18 +2283,24 @@ Page({
2283 2283 var val_arr = t.detail.value;
2284 2284  
2285 2285  
2286   - if (th.data.is_all_zt != 1 && t_item.exp_type==0)
2287   - if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
2288   - th.data.is_summit_ing = 0;
2289   - getApp().confirmBox("读取物流失败");
2290   - return false;
2291   - }
  2286 +
  2287 +
2292 2288  
2293 2289 var order_prom_list_cart = th.data.order_prom_list_cart;
2294 2290  
2295 2291 //--组装推送数据--
2296 2292 for (var i = 0; i < order_prom_list_cart.length; i++) {
2297 2293 var t_item = order_prom_list_cart[i];
  2294 +
  2295 + if (t_item.exp_type==0){
  2296 + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
  2297 + th.data.is_summit_ing = 0;
  2298 + getApp().confirmBox("读取物流失败");
  2299 + return false;
  2300 + }
  2301 + }
  2302 +
  2303 +
2298 2304 var item = {
2299 2305 'user_id': to.globalData.user_id,
2300 2306 'consignee': addr == null ? th.data.userinfo.mobile : addr.consignee,
... ...
packageC/pages/presell/cart/cart.js
... ... @@ -2107,6 +2107,7 @@ Page({
2107 2107 title: "计算物流错误", icon: 'none',duration: 2000
2108 2108 })
2109 2109 //th.setData({ show_submit:0 });
  2110 + th.setData({show_submit:1, submit: 0,same_ok:0 })
2110 2111 return false;
2111 2112 }
2112 2113  
... ...
packageC/pages/presell/cart/cart2.js
... ... @@ -967,6 +967,7 @@ Page({
967 967 title: "计算物流错误", icon: 'none', duration: 2000
968 968 })
969 969 //th.setData({ show_submit:0 });
  970 + th.setData({show_submit:1, submit: 0,same_ok:0 })
970 971  
971 972 return false;
972 973 }
... ... @@ -1442,18 +1443,20 @@ Page({
1442 1443 if (th.data.is_all_zt == 1) addr = null;
1443 1444 var val_arr = t.detail.value;
1444 1445  
1445   - if (th.data.is_all_zt != 1 && t_item.exp_type==0)
1446   - if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
1447   - th.data.is_summit_ing = 0;
1448   - getApp().confirmBox("读取物流失败");
1449   - return false;
1450   - }
1451   -
1452 1446 var order_prom_list_cart = th.data.order_prom_list_cart;
1453 1447  
1454 1448 //--组装推送数据--
1455 1449 for (var i = 0; i < order_prom_list_cart.length; i++) {
1456 1450 var t_item = order_prom_list_cart[i];
  1451 +
  1452 + if (t_item.exp_type==0){
  1453 + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
  1454 + th.data.is_summit_ing = 0;
  1455 + getApp().confirmBox("读取物流失败");
  1456 + return false;
  1457 + }
  1458 + }
  1459 +
1457 1460 var item = {
1458 1461 'user_id': to.globalData.user_id,
1459 1462 'consignee': addr == null ? th.data.userinfo.mobile : addr.consignee,
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -3216,6 +3216,7 @@ Page({
3216 3216 title: "计算物流错误", icon: 'none', duration: 2000
3217 3217 })
3218 3218 //th.setData({ show_submit:0, });
  3219 + th.setData({show_submit:1, submit: 0,same_ok:0 })
3219 3220  
3220 3221 return false;
3221 3222 }
... ... @@ -3911,6 +3912,7 @@ Page({
3911 3912 title: "计算物流错误", icon: 'none', duration: 2000
3912 3913 })
3913 3914 //th.setData({ show_submit:0 });
  3915 + th.setData({show_submit:1, submit: 0,same_ok:0 })
3914 3916  
3915 3917 return false;
3916 3918 }
... ... @@ -4760,17 +4762,6 @@ Page({
4760 4762 if (th.data.is_all_zt == 1) addr = null;
4761 4763 var val_arr = th.data.user_note;
4762 4764  
4763   - if (th.data.is_all_zt != 1 && t_item.exp_type==0)
4764   - {
4765   -
4766   - if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
4767   - th.data.is_summit_ing = 0;
4768   - getApp().confirmBox("读取物流失败");
4769   - return false;
4770   - }
4771   - }
4772   -
4773   -
4774 4765 var order_prom_list_cart = th.data.order_prom_list_cart;
4775 4766  
4776 4767 //优惠商品限购的优化
... ... @@ -4778,6 +4769,15 @@ Page({
4778 4769 //--组装推送数据--
4779 4770 for (var i = 0; i < order_prom_list_cart.length; i++) {
4780 4771 var t_item = order_prom_list_cart[i];
  4772 +
  4773 + if (t_item.exp_type==0){
  4774 + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
  4775 + th.data.is_summit_ing = 0;
  4776 + getApp().confirmBox("读取物流失败");
  4777 + return false;
  4778 + }
  4779 + }
  4780 +
4781 4781 var item = {
4782 4782 "keyid": t_item.sto ? t_item.sto.keyid : '',
4783 4783 'user_id': to.globalData.user_id,
... ...
packageE/pages/cart/cart2_inte/cart2_inte.js
... ... @@ -855,6 +855,7 @@ Page({
855 855 wx.showToast({
856 856 title: "计算物流错误", icon: 'none',duration: 2000
857 857 })
  858 + th.setData({show_submit:1, submit: 0,same_ok:0 })
858 859  
859 860 return false;
860 861 }
... ...
packageE/pages/cart/cart2_pt/cart2_pt.js
... ... @@ -878,6 +878,7 @@ Page({
878 878 title: "计算物流错误", icon: 'none', duration: 2000
879 879 })
880 880 //th.setData({ show_submit:0 });
  881 + th.setData({show_submit:1, submit: 0,same_ok:0 })
881 882  
882 883 return false;
883 884 }
... ...
packageE/pages/cart/cart_wk/cart_wk.js
... ... @@ -892,7 +892,7 @@ Page({
892 892 }
893 893 })
894 894 if (!is_ok) {
895   - th.setData({show_submit: 1});
  895 + th.setData({show_submit:1, submit: 0,same_ok:0 })
896 896 wx.hideLoading();
897 897 return false;
898 898 }
... ...