Commit 26e186815d49246fa54dcd0a88dd664c8b23e53b
1 parent
a7d0f63e
1. 已拼多少份, 要改成已拼多少件
2. 当会员没有默认门店的情况下调用,要判读对象是不是存在,是不是有门店pickup_id
Showing
4 changed files
with
13 additions
and
7 deletions
app.js
... | ... | @@ -13,7 +13,7 @@ App({ |
13 | 13 | config2: null, //门店配置 |
14 | 14 | code: null, |
15 | 15 | heigth:0, |
16 | - user_id: null,// 4379287,// null,// 5682068, | |
16 | + user_id:null,// 3674923,// 4379287,// null,// 5682068, | |
17 | 17 | buy_now:null, |
18 | 18 | picklist:null, //门店列表 |
19 | 19 | wuliuprice: null, //物流价格表 |
... | ... | @@ -408,7 +408,10 @@ App({ |
408 | 408 | clearInterval(page.data[key]); |
409 | 409 | func(); |
410 | 410 | } |
411 | - if(n>15) clearInterval(page.data[key]); | |
411 | + if(n>15){ | |
412 | + clearInterval(page.data[key]); | |
413 | + func(); | |
414 | + } | |
412 | 415 | },1000); |
413 | 416 | } |
414 | 417 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -341,7 +341,10 @@ Page({ |
341 | 341 | |
342 | 342 | //获取用户的默认门店 |
343 | 343 | getApp().get_user_store(function(ee) { |
344 | - if(!ee) return false; | |
344 | + if(!ee) { | |
345 | + th.data.fir_def_store={}; | |
346 | + return false; | |
347 | + } | |
345 | 348 | var appd=getApp().globalData; |
346 | 349 | var w_time = setInterval(function() { |
347 | 350 | if (that.data.is_get_local_ok == 0) return false; |
... | ... | @@ -631,7 +634,7 @@ Page({ |
631 | 634 | if(that.data.sales_rules==2 && that.data.is_newsales_rules){ |
632 | 635 | //--等待某个值只运行---,这里有可能因为导航的时间太久,而不能计算门店库存 |
633 | 636 | getApp().waitfor2(that,"wait_for_user_store","fir_def_store",function(){ |
634 | - if(th.data.fir_def_store){ | |
637 | + if(th.data.fir_def_store && th.data.fir_def_store.pickup_id ){ | |
635 | 638 | var lock=0,plist=null; |
636 | 639 | //先读取门店的lock,采用链式写法,少用await |
637 | 640 | getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ |
... | ... | @@ -1851,7 +1854,7 @@ Page({ |
1851 | 1854 | o_plist[kk].CanOutQty=n_item.CanOutQty-lock_num; |
1852 | 1855 | new_list.push(o_plist[kk]); |
1853 | 1856 | //如果找到默认门店 |
1854 | - if(n_item.StorageNo==th.data.fir_def_store.pickup_no){ | |
1857 | + if(th.data.fir_def_store && n_item.StorageNo==th.data.fir_def_store.pickup_no){ | |
1855 | 1858 | th.data.fir_def_store.CanOutQty=n_item.CanOutQty-lock_num; |
1856 | 1859 | if(def_pick_store.pickup_id==th.data.fir_def_store.pickup_id) |
1857 | 1860 | th.setData({def_pick_store:th.data.fir_def_store}) | ... | ... |
pages/team/team_show/team_show.wxml
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | </view> |
25 | 25 | <view class="xc-wc fs24"> |
26 | 26 | <view> |
27 | - <view class="">已拼{{teamlist.buy_num}}份</view> | |
27 | + <view class="">已拼{{teamlist.buy_num}}件</view> | |
28 | 28 | <view class="flex xc-valframe t-c"> |
29 | 29 | <view class="xc-frame-img"> |
30 | 30 | <image class="picture"src="{{imageurl}}/miniapp/images/bai-ren.png"></image> | ... | ... |
pages/team/team_success/team_success.wxml
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </view> |
24 | 24 | <view class="xc-wc fs24"> |
25 | 25 | <view> |
26 | - <view class="">已拼{{teamlist.buy_num}}份</view> | |
26 | + <view class="">已拼{{teamlist.buy_num}}件</view> | |
27 | 27 | <view class="flex xc-valframe t-c"> |
28 | 28 | <view class="xc-frame-img"> |
29 | 29 | <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image> | ... | ... |