Commit 88de374eee5dab219a0fbac7b797181106397539

Authored by 后端研发-苏明海
2 parents dfd2f311 a44c102a

Merge branch 'test' into 'qa'

Test

See merge request !374
... ... @@ -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/cart/cart/cart.js
... ... @@ -122,16 +122,27 @@ Page({
122 122 store_id: oo.stoid,
123 123 pageSize: 600
124 124 },
125   - success: function(su) {
  125 + success:async function(su) {
126 126 //按门店分类的数组
127 127 var arr = new Array(),
128 128 carr = su.data.data.pageData;
129 129 var all_num = 0;
130 130  
131 131 for (var i = 0; i < carr.length; i++) {
132   -
133   -
134 132 var item = carr[i];
  133 + var good=null;
  134 + await getApp().request.promiseGet("/api/weshop/goods/get/"+os.stoid+"/"+item.goods_id,{}).then(res=>{
  135 + good=res.data.data;
  136 + })
  137 + var tt=ut.gettimestamp();
  138 + if((good.down_time>0 && good.down_time<tt) || good.is_on_sale==0 ){
  139 + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  140 + a.delete(url, {
  141 + success: function(t) { }
  142 + });
  143 + //商品已经下架
  144 + continue;
  145 + }
135 146 all_num += item.goods_num;
136 147 item.original_img = oo.imghost + item.original_img;
137 148 item.selected = 0;
... ...
pages/giftpack/birthdaygift/birthdaygift.js
... ... @@ -140,7 +140,8 @@ Page({
140 140 "actType": 4, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
141 141 "giftBagId": th.data.giftID, //礼包Id
142 142 "storeId": a.stoid, //商家Id
143   - "userId": d.user_id //用户ID
  143 + "userId": d.user_id, //用户ID
  144 + "buyFrom": 2
144 145 };
145 146 var data = JSON.stringify(json);
146 147 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
... ...
pages/giftpack/evaluategift/evaluategift.js
... ... @@ -157,7 +157,8 @@ Page({
157 157 "orderNumber": th.data.orderNumber,
158 158 "orderType": th.data.orderType,
159 159 "orderGoodsId": th.data.orderGoodsId,
160   - "giftBagId": th.data.giftBagId
  160 + "giftBagId": th.data.giftBagId,
  161 + "buyFrom": 2
161 162 };
162 163 var data = JSON.stringify(json);
163 164 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
... ...
pages/giftpack/festival/festival.js
... ... @@ -147,7 +147,8 @@ Page({
147 147 "actType": 3, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
148 148 "giftBagId": th.data.giftID, //礼包Id
149 149 "storeId": a.stoid, //商家Id
150   - "userId": d.user_id //用户ID
  150 + "userId": d.user_id, //用户ID
  151 + "buyFrom": 2
151 152 }
152 153 var data = JSON.stringify(json);
153 154 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
... ...
pages/giftpack/newvipgift/newvipgift.js
... ... @@ -139,7 +139,8 @@ Page({
139 139 "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
140 140 "giftBagId": th.data.giftID, //礼包Id
141 141 "storeId": a.stoid, //商家Id
142   - "userId": d.user_id //用户ID
  142 + "userId": d.user_id, //用户ID
  143 + "buyFrom": 2
143 144 };
144 145 var data = JSON.stringify(json);
145 146 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
... ...
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>
... ...