Commit 6a94a0a6e6a480813c6391ca5e691c6d69e46330
1 parent
a9d87b3d
查询不到商品,就要回退
Showing
1 changed file
with
12 additions
and
3 deletions
pages/goods/goodsInfo/goodsInfo.js
@@ -426,7 +426,7 @@ Page({ | @@ -426,7 +426,7 @@ Page({ | ||
426 | 426 | ||
427 | //--定时器推迟一下-- | 427 | //--定时器推迟一下-- |
428 | setTimeout(function () { | 428 | setTimeout(function () { |
429 | - var g_distr_type=th.data.data.distr_type; | 429 | + if(th.data.data) var g_distr_type=th.data.data.distr_type; |
430 | //--如果默认门店的配送方式不对,就不能被选择-- | 430 | //--如果默认门店的配送方式不对,就不能被选择-- |
431 | if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ | 431 | if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ |
432 | th.data.fir_def_store={}; //赋值空对象 | 432 | th.data.fir_def_store={}; //赋值空对象 |
@@ -491,7 +491,7 @@ Page({ | @@ -491,7 +491,7 @@ Page({ | ||
491 | } | 491 | } |
492 | 492 | ||
493 | }, 500) | 493 | }, 500) |
494 | - },1000) | 494 | + },1500) |
495 | 495 | ||
496 | }); | 496 | }); |
497 | 497 | ||
@@ -825,7 +825,16 @@ Page({ | @@ -825,7 +825,16 @@ Page({ | ||
825 | } | 825 | } |
826 | 826 | ||
827 | } | 827 | } |
828 | - } | 828 | + else{ |
829 | + wx.showModal({ | ||
830 | + title: t.data.msg, | ||
831 | + showCancel: !1, | ||
832 | + complete: function() { | ||
833 | + wx.navigateBack(); | ||
834 | + } | ||
835 | + }); | ||
836 | + } | ||
837 | + } | ||
829 | }); | 838 | }); |
830 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); | 839 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); |
831 | 840 |