Commit deec2f5a67711b6c9244b81ef354938825abbf87

Authored by yvan.ni
1 parent 5a491db8

测试报警。5分钟多少次的

packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -320,7 +320,7 @@ Page({
320 320 //如果有开启近距离的话,同时距离优不一样了
321 321 if (that.data.lat != null) {
322 322 //如果经纬度有变化的话
323   - if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  323 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
324 324 that.data.fir_def_store=e;
325 325 that.setData({
326 326 def_pick_store: e,
... ... @@ -884,7 +884,7 @@ Page({
884 884 data: dd,
885 885 }).then(res => {
886 886 var e = res;
887   - if (e.data.code == 0) {
  887 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
888 888 //--普通门店排版--
889 889 setTimeout(function(){
890 890 var sto_list=th.data.data.storageId;
... ... @@ -1078,12 +1078,16 @@ Page({
1078 1078 });
1079 1079 //-----如果没有默认门店,要取第一个门店作为默认店------
1080 1080 if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
1081   - th.setData({
1082   - def_pick_store:e.data.data.pageData[0],
1083   - sto_sele_name: e.data.data.pageData[0].pickup_name,
1084   - sto_sele_id: e.data.data.pageData[0].pickup_id,
1085   - sto_sele_distr: e.data.data.pageData[0].distr_type
1086   - })
  1081 +
  1082 + if(e.data.data && e.data.data.pageData && e.data.data.pageData.length>0){
  1083 + th.setData({
  1084 + def_pick_store:e.data.data.pageData[0],
  1085 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1086 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1087 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1088 + })
  1089 + }
  1090 +
1087 1091 }
1088 1092 }
1089 1093 },
... ... @@ -1857,7 +1861,8 @@ Page({
1857 1861 });
1858 1862 return false;
1859 1863 }
1860   -
  1864 +
  1865 + if(!item) return false;
1861 1866  
1862 1867 th.setData({
1863 1868 def_pick_store: item,
... ... @@ -1961,6 +1966,9 @@ Page({
1961 1966 }
1962 1967 });
1963 1968  
  1969 +
  1970 + if(!item) return false;
  1971 +
1964 1972 th.setData({
1965 1973 def_pick_store: item,
1966 1974 sto_sele_name: item.pickup_name,
... ...
packageA/pages/profile/profile.js
... ... @@ -169,6 +169,8 @@ Page({
169 169 var index = th.data.sec_pick_index;
170 170 item = th.data.sec_sto.s_arr[index];
171 171 }
  172 +
  173 + if(!item) return false;
172 174 th.setData({
173 175 def_pick_store: item,
174 176 stoname: item.pickup_name,
... ... @@ -255,7 +257,7 @@ Page({
255 257 data: dd,
256 258 success:function(res){
257 259 var e = res;
258   - if (e.data.code == 0) {
  260 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
259 261 //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --
260 262 if (th.data.def_pick_store) {
261 263 for (var k = 0; k < e.data.data.pageData.length; k++) {
... ...
packageA/pages/prom_list/prom_list.js
... ... @@ -722,7 +722,9 @@ Page({
722 722 get_sto(e) {
723 723 var th = this,that=this;
724 724 var timer_get = setInterval(function() {
725   - if (th.data.is_get_local_ok == 0) return false;
  725 + if (th.data.is_get_local_ok == 0) return false;
  726 + if(!th.data.data) return false;
  727 +
726 728 var dd = null,
727 729 c_list=th.data.collocationList,
728 730 i = getApp().request;
... ...
pages/cart/cart2/c_filter.wxs
1 1 var filters = {
2 2 toFix:function(val,count){
  3 + if(!val) return parseFloat(0).toFixed(count);
3 4 return val.toFixed(count)
4 5 },
5 6 format_time:function(ts,isFull) {
... ...
pages/cart/cart2/cart2.js
... ... @@ -583,6 +583,8 @@ Page({
583 583 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+e, {
584 584 success:async function (t) {
585 585 var gd = t.data.data;
  586 + if(!gd) return false;
  587 +
586 588 t.data.data.original_img = oo.imghost + t.data.data.original_img;
587 589 t.data.data['buynum'] = gg.goods_num;
588 590 var distr_t=0,et=0
... ...
pages/cart/cart2_inte/cart2_inte.js
... ... @@ -301,6 +301,8 @@ Page({
301 301 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+e, {
302 302 success:async function (t) {
303 303 var gd = t.data.data;
  304 + if(!gd) return false;
  305 +
304 306 t.data.data.original_img = oo.imghost + t.data.data.original_img;
305 307 t.data.data['buynum'] = gg.goods_num;
306 308 var distr_t=0,et=0
... ... @@ -1037,9 +1039,10 @@ Page({
1037 1039 if (rse.data.code==0){
1038 1040 getApp().globalData.userInfo.def_exp_code=is_shipping_code;
1039 1041 th.setData({ open_express: 0 });
1040   - //----计算此时购物车的价格----
1041   - if(th.data.is_b_now==1) th.calculatePrice2();
1042   - else th.calculatePrice();
  1042 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19--------
  1043 + //if(th.data.is_b_now==1) th.calculatePrice2();
  1044 + //else th.calculatePrice();
  1045 + th.calculatePrice2();
1043 1046 }
1044 1047 }
1045 1048 })
... ...
pages/cart/cart2_pt/cart2_pt.js
... ... @@ -169,6 +169,8 @@ Page({
169 169 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+gg.goods_id, {
170 170 success: function (t) {
171 171 var gd = t.data.data;
  172 + if(!gd) return false;
  173 +
172 174 t.data.data.original_img = oo.imghost + t.data.data.original_img;
173 175 t.data.data['buynum'] = gg.goods_num;
174 176 console.log(t.data.data);
... ... @@ -900,9 +902,10 @@ Page({
900 902 if (rse.data.code==0){
901 903 getApp().globalData.userInfo.def_exp_code=is_shipping_code;
902 904 th.setData({ open_express: 0 });
903   - //----计算此时购物车的价格----
904   - if(th.data.is_b_now==1) th.calculatePrice2();
905   - else th.calculatePrice();
  905 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19----
  906 + //if(th.data.is_b_now==1) th.calculatePrice2();
  907 + //else th.calculatePrice();
  908 + th.calculatePrice2();
906 909 }
907 910 }
908 911 })
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -243,6 +243,7 @@ Page({
243 243 tail_money = parseFloat(tail_money);
244 244 order.tail_money = tail_money;
245 245  
  246 + if(!goods) return false;
246 247 //--判断物流--
247 248 if (goods.distr_type)
248 249 distr_type = goods.distr_type;
... ... @@ -619,9 +620,10 @@ Page({
619 620 if (rse.data.code == 0) {
620 621 getApp().globalData.userInfo.def_exp_code = is_shipping_code;
621 622 th.setData({ open_express: 0 });
622   - //----计算此时购物车的价格----
623   - if (th.data.is_b_now == 1) th.calculatePrice2();
624   - else th.calculatePrice();
  623 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19----
  624 + //if (th.data.is_b_now == 1) th.calculatePrice2();
  625 + //else th.calculatePrice();
  626 + th.calculatePrice2();
625 627 }
626 628 }
627 629 })
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -449,7 +449,7 @@ Page({
449 449 //如果有开启近距离的话,同时距离优不一样了
450 450 if (that.data.lat != null) {
451 451 //如果经纬度有变化的话
452   - if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  452 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
453 453 //that.data.fir_def_store=e;
454 454 // that.setData({
455 455 // def_pick_store: e,
... ... @@ -2385,7 +2385,7 @@ Page({
2385 2385 }).then(res => {
2386 2386 var e = res;
2387 2387  
2388   - if (e.data.code == 0) {
  2388 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
2389 2389  
2390 2390 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
2391 2391 if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){
... ... @@ -4831,7 +4831,8 @@ Page({
4831 4831 var index = th.data.sec_pick_index;
4832 4832 item = th.data.sec_sto.s_arr[index];
4833 4833 }
4834   -
  4834 +
  4835 + if(!th.data.sele_g) return false;
4835 4836 //判断门店的配送方式是不是匹配
4836 4837 var g_distr_type = th.data.sele_g.distr_type;
4837 4838 if(item.distr_type!=0 && g_distr_type!=0 && item.distr_type!=g_distr_type){
... ...
pages/team/team_show/team_show.js
... ... @@ -575,6 +575,7 @@ Page({
575 575 }
576 576 //--定时器推迟一下--
577 577 setTimeout(function () {
  578 + if(!th.data.goods) return false;
578 579 var g_distr_type=th.data.goods.distr_type;
579 580 //--如果默认门店的配送方式不对,就不能被选择--
580 581 if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){
... ... @@ -1086,6 +1087,7 @@ Page({
1086 1087 var th = this,that=this;
1087 1088 var timer_get = setInterval(function() {
1088 1089 if (th.data.is_get_local_ok == 0) return false;
  1090 + if (th.data.goods) return false;
1089 1091 var dd = null,
1090 1092 i = getApp().request;
1091 1093 var g_distr_type = th.data.goods.distr_type;
... ... @@ -1120,7 +1122,7 @@ Page({
1120 1122 data: dd,
1121 1123 }).then(res => {
1122 1124 var e = res;
1123   - if (e.data.code == 0) {
  1125 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
1124 1126  
1125 1127 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
1126 1128 if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){
... ... @@ -1366,6 +1368,7 @@ Page({
1366 1368 var index = th.data.sec_pick_index;
1367 1369 item = th.data.sec_sto.s_arr[index];
1368 1370 }
  1371 + if(!item) return false;
1369 1372  
1370 1373  
1371 1374 th.setData({
... ...
pages/user/userinfo/userinfo.js
... ... @@ -215,6 +215,7 @@ Page({
215 215 var index = th.data.sec_pick_index;
216 216 item = th.data.sec_sto.s_arr[index];
217 217 }
  218 + if(!item) return false;
218 219 th.setData({
219 220 def_pick_store: item,
220 221 stoname: item.pickup_name,
... ...