Commit 6e2513f71481c67607ae9b66fddde2097b6c8969
1 parent
52d80ff7
在判断默认的门店有没有取消销售
Showing
1 changed file
with
26 additions
and
6 deletions
app.js
... | ... | @@ -50,8 +50,7 @@ App({ |
50 | 50 | config: null, //门店参数 |
51 | 51 | config2: null, //门店配置 |
52 | 52 | code: null, |
53 | - heigth:0, | |
54 | - user_id:null,//5682094, | |
53 | + user_id:null,//3277,// 6519901,//6453964,// 4687,// 6519870,//5682094, | |
55 | 54 | buy_now:null, |
56 | 55 | picklist:null, //门店列表 |
57 | 56 | wuliuprice: null, //物流价格表 |
... | ... | @@ -246,7 +245,7 @@ App({ |
246 | 245 | } |
247 | 246 | if(this.globalData.config==undefined) this.globalData.config=null; |
248 | 247 | this.globalData.config ? "function" == typeof t && t(this.globalData.config) : e.requestGet("/api/weshop/store/get/" + e.globalData.setting.stoid, { |
249 | - success: function(o) { | |
248 | + success: function(o) { | |
250 | 249 | console.log('getConfig'); |
251 | 250 | if(o.data.code==0){ |
252 | 251 | e.globalData.config = o.data.data, "function" == typeof t && t(e.globalData.config); |
... | ... | @@ -503,7 +502,8 @@ App({ |
503 | 502 | data:{}, |
504 | 503 | success:function (res) { |
505 | 504 | th.globalData.pk_store=null; |
506 | - if(res.data.code==0 && res.data.data && res.data.data.isstop==0){ | |
505 | + if(res.data.code==0 && res.data.data && res.data.data.isstop==0 && res.data.data.is_pos==1){ | |
506 | + | |
507 | 507 | //--门店的数量大于10个才要关心门店的分类有没有关闭-- |
508 | 508 | if(res.data.data.category_id && num>10){ |
509 | 509 | th.request.get( "/api/weshop/storagecategory/get/"+os.stoid+"/"+res.data.data.category_id, { |
... | ... | @@ -514,10 +514,30 @@ App({ |
514 | 514 | th.globalData.pk_store = res.data.data; |
515 | 515 | func(th.globalData.pk_store); |
516 | 516 | }else{ |
517 | - func(null); | |
517 | + //看一下有没有显示的门店分类 | |
518 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
519 | + data: { | |
520 | + store_id: os.stoid, | |
521 | + is_show: 1, | |
522 | + pageSize: 1, | |
523 | + }, | |
524 | + success: function (ee) { | |
525 | + if(ee.data.code==0){ | |
526 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ | |
527 | + func(null); | |
528 | + }else{ | |
529 | + th.globalData.pk_store = res.data.data; | |
530 | + func(th.globalData.pk_store); | |
531 | + } | |
532 | + }else{ | |
533 | + th.globalData.pk_store = res.data.data; | |
534 | + func(th.globalData.pk_store); | |
535 | + } | |
536 | + } | |
537 | + }) | |
518 | 538 | } |
519 | 539 | }else{ |
520 | - func(null); | |
540 | + func(null); | |
521 | 541 | } |
522 | 542 | } |
523 | 543 | }) | ... | ... |