Commit 6aca38b7d6b959a97fb341ccd84ab701eedfa8e2

Authored by yvan.ni
1 parent 136f912a

读取物流失败的bug优化

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