Commit 22973097f46c46e6a2764305464270ba833e1ca7
1 parent
c1f3a4b3
获取用户默认门店,这个门店不能关闭,同时这个门店的分类页不能关闭
Showing
1 changed file
with
26 additions
and
4 deletions
app.js
@@ -323,12 +323,35 @@ App({ | @@ -323,12 +323,35 @@ App({ | ||
323 | } | 323 | } |
324 | //---如果会员没有设置默认门店,同时也没有再注册的时候选择门店-- | 324 | //---如果会员没有设置默认门店,同时也没有再注册的时候选择门店-- |
325 | if(pick_id==0) return func(null); | 325 | if(pick_id==0) return func(null); |
326 | - //获取用户注册时候的门店 | 326 | + //获取用户注册时候的门店,这个门店不能关闭,同时这个门店的分类不能关闭 |
327 | th.request.get("/api/weshop/pickup/get/"+os.stoid+"/"+pick_id,{ | 327 | th.request.get("/api/weshop/pickup/get/"+os.stoid+"/"+pick_id,{ |
328 | data:{}, | 328 | data:{}, |
329 | success:function (res) { | 329 | success:function (res) { |
330 | - th.globalData.pk_store=res.data.data; | ||
331 | - func(th.globalData.pk_store); | 330 | + th.globalData.pk_store=null; |
331 | + if(res.data.code==0 && res.data.data && res.data.data.isstop==0){ | ||
332 | + if(res.data.data.category_id){ | ||
333 | + th.request.get( "/api/weshop/storagecategory/get/"+os.stoid+"/"+res.data.data.category_id, { | ||
334 | + data: {}, | ||
335 | + success: function (ee) { | ||
336 | + if(ee.data.code==0 && ee.data.data ){ | ||
337 | + if(ee.data.data.is_show==1){ | ||
338 | + th.globalData.pk_store = res.data.data; | ||
339 | + func(th.globalData.pk_store); | ||
340 | + }else{ | ||
341 | + func(null); | ||
342 | + } | ||
343 | + }else{ | ||
344 | + func(null); | ||
345 | + } | ||
346 | + } | ||
347 | + }) | ||
348 | + }else{ | ||
349 | + th.globalData.pk_store = res.data.data; | ||
350 | + func(th.globalData.pk_store); | ||
351 | + } | ||
352 | + }else{ | ||
353 | + func(null); | ||
354 | + } | ||
332 | } | 355 | } |
333 | }) | 356 | }) |
334 | }else{ | 357 | }else{ |
@@ -336,7 +359,6 @@ App({ | @@ -336,7 +359,6 @@ App({ | ||
336 | } | 359 | } |
337 | }) | 360 | }) |
338 | 361 | ||
339 | - | ||
340 | }, | 362 | }, |
341 | 363 | ||
342 | //-------获取购物车数量---------- | 364 | //-------获取购物车数量---------- |