Commit 0d52e8501128432c2fcfcc72f906d7e3a25b8d9e

Authored by season
2 parents 3a9e7174 054d92f2

Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp

Showing 36 changed files with 563 additions and 146 deletions
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -523,7 +523,7 @@
523 523 <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
524 524 <!--如果有显示价格 -->
525 525 <view class='zs_wz2' wx:if="{{object.goodsprice}}">
526   - <block wx:if="{{item.prom_price || item.prom_integral}}">
  526 + <block wx:if="{{(item.prom_price && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10) || item.prom_integral}}">
527 527 <view class='wz_red'>
528 528 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
529 529 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ... @@ -693,7 +693,7 @@
693 693 <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
694 694 <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}">
695 695  
696   - <block wx:if="{{item.prom_price || item.prom_integral}}">
  696 + <block wx:if="{{(item.prom_price && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10) || item.prom_integral}}">
697 697 <view class='wz_red'>
698 698 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
699 699 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ... @@ -862,7 +862,7 @@
862 862  
863 863 <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
864 864 <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
865   - <block wx:if="{{item.prom_price || item.prom_integral}}">
  865 + <block wx:if="{{(item.prom_price && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10) || item.prom_integral}}">
866 866 <view class='wz_red'>
867 867 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
868 868 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ... @@ -1033,7 +1033,7 @@
1033 1033 <view class='zs_wz1_x ellipsis-2' style="width: 360rpx; margin-top: 10rpx" wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
1034 1034 <view class='zs_wz2_x' wx:if="{{object.goodsprice}}">
1035 1035  
1036   - <block wx:if="{{item.prom_price || item.prom_integral}}">
  1036 + <block wx:if="{{(item.prom_price && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10) || item.prom_integral}}">
1037 1037 <view class='wz_red'>
1038 1038 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
1039 1039 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ... @@ -1224,7 +1224,7 @@
1224 1224 <view class='sp_wz'>
1225 1225 <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view>
1226 1226 <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
1227   - <block wx:if="{{aitem.prom_price || aitem.prom_integral }}">
  1227 + <block wx:if="{{(aitem.prom_price && aitem.prom_type!=3 && aitem.prom_type!=5 && aitem.prom_type!=7 && aitem.prom_type!=10) || aitem.prom_integral }}">
1228 1228 <view class='wz_red'>
1229 1229 <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text>
1230 1230 <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>
... ...
components/goods_list/goods_list.wxml
... ... @@ -15,7 +15,7 @@
15 15 <!-- 商品名称 -->
16 16 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
17 17 <!-- 判断是否有活动价 -->
18   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
  18 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}">
19 19 <view class="pdt10">
20 20 <view class="money flex xc-wc" style="line-height:28rpx">
21 21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
... ...
components/lb_sear/lb_sear.js 0 → 100644
  1 +var t = getApp(), os = t.globalData.setting;
  2 +Component({
  3 + properties: {},
  4 + data: {
  5 + f_sear:0,
  6 + sear_key:''
  7 + },
  8 +
  9 + ready: function() {},
  10 + methods: {
  11 + show_sear_inp(){
  12 + this.setData({f_sear:1});
  13 + },
  14 +
  15 + blur_sear(){
  16 + if(!this.data.sear_key) this.setData({f_sear:0});
  17 + },
  18 +
  19 + search_lb(){
  20 + this.triggerEvent('search_lb');
  21 + },
  22 +
  23 + input_sear(e){
  24 + let value = e.detail.value;
  25 + this.setData({sear_key:value});
  26 + this.triggerEvent('input_sear',value);
  27 + },
  28 +
  29 + //-- 置空文本输入 --
  30 + close_txt(e){
  31 + setTimeout(()=>{
  32 + this.setData({sear_key:'',f_sear:1});
  33 + this.triggerEvent('input_sear','');
  34 + },50)
  35 +
  36 + },
  37 +
  38 + //-- 父组件调用 --
  39 + clear(){
  40 + this.setData({sear_key:'',f_sear:0});
  41 + }
  42 +
  43 + }
  44 +
  45 +})
0 46 \ No newline at end of file
... ...
components/lb_sear/lb_sear.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
components/lb_sear/lb_sear.wxml 0 → 100644
  1 +<view class="flex jc-center ai-center abs c-9 t_search_box">
  2 + <view bindtap="show_sear_inp" wx:if="{{f_sear==0}}"><text class="iconfont icon-search_fd"></text>搜索礼包</view>
  3 + <view class="rel inp_box0" wx:else>
  4 + <input bindinput="input_sear" bindconfirm="search_lb" value="{{sear_key}}"
  5 + bindblur="blur_sear" focus="{{f_sear==1}}" style="width: 600rpx;"/>
  6 + <view hidden="{{!sear_key}}" catchtap="close_txt" class="close_box"><text class="iconfont icon-guan fs28"></text></view>
  7 + </view>
  8 +</view>
... ...
components/lb_sear/lb_sear.wxss 0 → 100644
  1 +@import '../../app.wxss';
  2 +.t_search_box{
  3 + border-radius:20rpx;bottom: 10rpx; width: 700rpx; left: 25rpx; height: 80rpx; background-color:rgba(255, 255, 255, 0.7);
  4 +}
  5 +
  6 +.inp_box0{ display: flex; align-items: center;justify-content: flex-start; height: 80rpx;}
  7 +
  8 +.close_box{width: 50rpx; height: 80rpx; text-align: right; line-height: 80rpx }
  9 +
  10 +.iconfont.fs28{
  11 + font-size: 28rpx;
  12 +}
0 13 \ No newline at end of file
... ...
packageA/pages/myGift/myGift.js
... ... @@ -20,7 +20,8 @@ Page({
20 20 noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
21 21 pageNum: 1, // 当前页数
22 22 iurl: os.imghost, //图片前缀网址
23   - is_summit_ing:0 //是不是提交申请
  23 + is_summit_ing:0, //是不是提交申请
  24 + sear_key:'' //顶部搜索关键子
24 25 },
25 26  
26 27 clickTab(e) {
... ... @@ -30,7 +31,16 @@ Page({
30 31 store_id: app.globalData.setting.stoid,
31 32 user_id: app.globalData.user_id,
32 33 };
33   -
  34 +
  35 + if(index!=this.data.currentIndex){
  36 + this.data.sear_key='';
  37 + let lb_sear= this.selectComponent("#lb_sear"); //组件的id
  38 + if(lb_sear){
  39 + lb_sear.clear();
  40 + }
  41 +
  42 + }
  43 +
34 44 this.setData({
35 45 list: null,
36 46 pageNum: 1,
... ... @@ -44,6 +54,12 @@ Page({
44 54 } else if(index == 1) {
45 55 url = '/api/weshop/libao/libaoFormvip/page';
46 56 };
  57 +
  58 +
  59 +
  60 + if(this.data.sear_key){
  61 + data.key_str=this.data.sear_key;
  62 + }
47 63  
48 64 this.getData(true, url, data);
49 65  
... ... @@ -161,7 +177,7 @@ Page({
161 177  
162 178 if(index == 0) {
163 179 url = '/api/weshop/libao/libaoForm/page';
164   - data.timetype=2;
  180 + data.timetype=1;
165 181 } else if(index == 1) {
166 182 url = '/api/weshop/libao/libaoFormvip/page';
167 183 };
... ... @@ -205,6 +221,10 @@ Page({
205 221 user_id: app.globalData.user_id,
206 222 }
207 223  
  224 + if(this.data.sear_key){
  225 + req_data.key_str=this.data.sear_key;
  226 + }
  227 +
208 228 if(index == 0) {
209 229 url = '/api/weshop/libao/libaoForm/page';
210 230 req_data.timetype=1;
... ... @@ -431,6 +451,38 @@ Page({
431 451  
432 452 close_remark:function(){
433 453 this.setData({show_rem_pop:0,})
  454 + },
  455 +
  456 + search_lb(){
  457 +
  458 + let index=this.data.currentIndex;
  459 + let url = '';
  460 + let data = {
  461 + store_id: app.globalData.setting.stoid,
  462 + user_id: app.globalData.user_id,
  463 + };
  464 + this.setData({
  465 + list: null,
  466 + pageNum: 1,
  467 + noMore: false,
  468 + });
  469 +
  470 + if(index == 0) {
  471 + url = '/api/weshop/libao/libaoForm/page';
  472 + data.timetype=1;
  473 + } else if(index == 1) {
  474 + url = '/api/weshop/libao/libaoFormvip/page';
  475 + };
  476 +
  477 + if(this.data.sear_key){
  478 + data.key_str=this.data.sear_key;
  479 + }
  480 + this.getData(true, url, data);
  481 + },
  482 +
  483 + input_sear(e){
  484 + let value = e.detail;
  485 + this.data.sear_key=value;
434 486 }
435 487  
436 488 })
437 489 \ No newline at end of file
... ...
packageA/pages/myGift/myGift.json
... ... @@ -5,6 +5,7 @@
5 5 "warn": "/components/long_warn/long_warn",
6 6 "nav_b": "/components/nav_b/nav_b",
7 7 "my_confirm": "/components/my_confirm/my_confirm",
8   - "nodata": "/components/nodata/nodata"
  8 + "nodata": "/components/nodata/nodata",
  9 + "lb_sear": "/components/lb_sear/lb_sear"
9 10 }
10 11 }
11 12 \ No newline at end of file
... ...
packageA/pages/myGift/myGift.wxml
... ... @@ -2,15 +2,16 @@
2 2 <view>
3 3  
4 4 <block wx:if="{{ad_data}}">
5   - <view class="top_img">
  5 + <view class="top_img rel">
6 6 <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true"
7 7 binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  8 + <lb_sear id="lb_sear" bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
8 9 </view>
9 10 </block>
10 11 <block wx:else>
11   - <view class="top_img">
12   - <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
13   - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>
  12 + <view class="top_img rel">
  13 + <image mode="widthFix" src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>
  14 + <lb_sear id="lb_sear" bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
14 15 </view>
15 16 </block>
16 17  
... ...
packageA/pages/myGift/myGift.wxss
1 1 @charset "utf-8";
2 2 .top_img image {
3   - width: 100%;
  3 + width: 100%;
  4 + display: block;
4 5 }
5 6  
6 7 .c-a4 {
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -9,6 +9,8 @@ var t = require(&quot;../../../../utils/util.js&quot;),
9 9 oo = s.globalData,
10 10 o = s.globalData.setting,
11 11 os = o;
  12 +
  13 +var wxlog = require("../../../../utils/wxlog.js");
12 14 let self = null;
13 15  
14 16 //评价加载更多
... ... @@ -305,6 +307,11 @@ Page({
305 307 getApp().globalData.groupchat_id=t.groupchat_id
306 308 }
307 309  
  310 + if(t){
  311 + wxlog.info(getApp().globalData.user_id+'-分享的内容:'+JSON.stringify(t));
  312 + }
  313 +
  314 +
308 315 var ee = this,
309 316 that = ee,
310 317 th = ee,
... ... @@ -406,6 +413,9 @@ Page({
406 413 if (res.data.code == 0) {
407 414 getApp().globalData.guide_id = res.data.data.id;
408 415 getApp().globalData.guide_pick_id= res.data.data.pickup_id
  416 +
  417 + wxlog.info(getApp().globalData.user_id+'-分享的导购:'+getApp().globalData.guide_id);
  418 +
409 419 }
410 420 })
411 421 }
... ... @@ -574,6 +584,8 @@ Page({
574 584 if (res.data.code == 0) {
575 585 getApp().globalData.guide_id = res.data.data.id;
576 586 getApp().globalData.guide_pick_id= res.data.data.pickup_id
  587 +
  588 + wxlog.info(getApp().globalData.user_id+'-分享的导购,从直播房间分享:'+getApp().globalData.guide_id);
577 589 }
578 590 })
579 591  
... ... @@ -4812,6 +4824,8 @@ Page({
4812 4824 newd['pick_dis'] = th.data.sto_sele_distr;
4813 4825 newd['is_normal'] = th.data.is_normal;
4814 4826  
  4827 + wxlog.info(getApp().globalData.user_id+'-立即购买:'+JSON.stringify(newd));
  4828 +
4815 4829 if (newd['is_normal']) {
4816 4830 newd['is_pd_normal'] = 1;
4817 4831 //判断一下有没有全局优惠活动
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -18,6 +18,7 @@ var more = function (e) {
18 18 var utils = require('../../../../utils/util.js');
19 19 var regeneratorRuntime = require('../../../../utils/runtime.js');
20 20  
  21 +var wxlog = require("../../../../utils/wxlog.js");
21 22 let self = null;
22 23  
23 24 Page({
... ... @@ -278,6 +279,10 @@ Page({
278 279  
279 280 var share_openid = t.share_openid;
280 281  
  282 + if(t){
  283 + wxlog.info(getApp().globalData.user_id+'-分享的内容:'+JSON.stringify(t));
  284 + }
  285 +
281 286 //检查测肤
282 287 getApp().check_skin_face(t, 0, gid);
283 288 //群id
... ... @@ -497,7 +502,9 @@ Page({
497 502 await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
498 503 if (res.data.code == 0) {
499 504 getApp().globalData.guide_id = res.data.data.id;
500   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
  505 + getApp().globalData.guide_pick_id= res.data.data.pickup_id;
  506 +
  507 + wxlog.info(getApp().globalData.user_id+'-分享的导购,从直播房间分享:'+getApp().globalData.guide_id);
501 508 }
502 509 })
503 510  
... ... @@ -1315,6 +1322,8 @@ Page({
1315 1322 openSpecModal_pt: 0,
1316 1323 })
1317 1324  
  1325 + wxlog.info(getApp().globalData.user_id+'-立即购买:'+JSON.stringify(e)); //购买的日志
  1326 +
1318 1327 app.set_b_now(e);
1319 1328  
1320 1329 //如果是全额付款的话
... ...
packageD/pages/user/member/bring/bring.wxss
... ... @@ -140,7 +140,7 @@ margin-top:28rpx;
140 140 }
141 141 /* 提现方式 */
142 142 .txfs{
143   - width:100rpx;
  143 + width:120rpx;
144 144 display: inline-block;
145 145 font-size: 25rpx;
146 146 color: #000000;
... ... @@ -174,8 +174,8 @@ margin-top:28rpx;
174 174  
175 175 width:21rpx;
176 176 height:21rpx;
177   -margin-left:4rpx;
178   -margin-top: 4rpx;
  177 +margin-left:3rpx;
  178 +margin-top: 3rpx;
179 179 background-color:#C4182E;
180 180 border-radius:25rpx; /* 图形的半径 */
181 181 display: none;
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -8254,13 +8254,13 @@ Page({
8254 8254 buyed=zbuy.data.data.userbuynum;
8255 8255 }
8256 8256 if (zh['zh_num'] > 0 && zh['zh_buy_num'] + num0 > zh['zh_num']) {
8257   - func({'code': -1, 'msg': '超出组合购活动总数量'});
8258   - return false;
  8257 + //func({'code': -1, 'msg': '超出组合购活动总数量'});
  8258 + //return false;
8259 8259 }
8260 8260  
8261 8261 if (zh && zh['buy_limit'] > 0 && num0+buyed > zh['buy_limit']) {
8262   - func({'code': -1, 'msg': '超出超出组合购活动的限购'});
8263   - return false;
  8262 + //func({'code': -1, 'msg': '超出超出组合购活动的限购'});
  8263 + //return false;
8264 8264 }
8265 8265  
8266 8266 }
... ... @@ -8292,8 +8292,8 @@ Page({
8292 8292 return e.goods_id == gid;
8293 8293 })
8294 8294 if (gdlist['buyqty'] > 0 && num1 + promgoodsbuynum > gdlist['buyqty']) {
8295   - func({'code': -1, 'msg': '超出组合购商品的限购'});
8296   - return false;
  8295 + //func({'code': -1, 'msg': '超出组合购商品的限购'});
  8296 + //return false;
8297 8297 }
8298 8298 }
8299 8299 }
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
... ... @@ -439,10 +439,17 @@ Page({
439 439 },
440 440  
441 441 getList: function (e) {
  442 +
  443 + if(this.data.ismore) return false;
  444 + if(this.data.searching) return false;
  445 + this.data.searching=1;
  446 +
  447 + wx.showLoading({
  448 + title: '加载中.',
  449 + })
  450 +
442 451 var th = this;
443   - getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', {
444   - isShowLoading: true,
445   - data: {
  452 + var r_q={
446 453 store_id: th.data.getStorageID, //商家ID
447 454 user_id: th.data.getUserID, //用户ID
448 455 page: th.data.curpage,
... ... @@ -450,8 +457,18 @@ Page({
450 457 is_end:0,
451 458 timetype:1,
452 459 is_act:0
453   - },
  460 + }
  461 +
  462 + if(this.data.sear_key){
  463 + r_q.key_str=this.data.sear_key;
  464 + }
  465 +
  466 + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', {
  467 + isShowLoading: true,
  468 + data:r_q,
454 469 success: function (res) {
  470 +
  471 + th.data.searching=0;
455 472 if (res.data.code == 0) {
456 473 th.data.curpage++;
457 474 var arr1 = th.data.wareCard;
... ... @@ -488,6 +505,9 @@ Page({
488 505 is_get:1
489 506 })
490 507 }
  508 +
  509 + wx.hideLoading();
  510 +
491 511 }
492 512 })
493 513  
... ... @@ -852,5 +872,17 @@ Page({
852 872  
853 873 buy_libao:function () {
854 874 com.buy_libao(this)
  875 + },
  876 +
  877 + search_lb(){
  878 + this.data.curpage=0;
  879 + this.searching=0;
  880 + this.setData({ismore:0,is_get:0,wareCard:[]});
  881 + this.getList();
  882 + },
  883 +
  884 + input_sear(e){
  885 + let value = e.detail;
  886 + this.data.sear_key=value;
855 887 }
856 888 })
857 889 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.json
... ... @@ -2,6 +2,7 @@
2 2 "navigationBarTitleText": "礼包列表",
3 3 "usingComponents": {
4 4 "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
  5 + "my_confirm": "/components/my_confirm/my_confirm",
  6 + "lb_sear": "/components/lb_sear/lb_sear"
6 7 }
7 8 }
8 9 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
1 1 <wxs module="filter" src="../../../../../utils/filter.wxs"></wxs>
2 2 <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;">
3 3 <block wx:if="{{ad_data}}">
4   - <view class="top_img">
  4 + <view class="top_img rel">
5 5 <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  6 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
6 7 </view>
7 8 </block>
8 9 <block wx:else>
9   - <view class="top_img">
  10 + <view class="top_img rel">
10 11 <image src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  12 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
11 13 </view>
12 14 </block>
13 15  
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.js
... ... @@ -27,6 +27,8 @@ Page({
27 27 total: 0, //总数量
28 28 ad_data: null,
29 29 first_leader: e.globalData.first_leader || 0, // 推荐人ID
  30 +
  31 + sear_key:''
30 32 },
31 33 onLoad: function (options) {
32 34 this.setData({
... ... @@ -98,19 +100,38 @@ Page({
98 100  
99 101  
100 102 },
  103 +
101 104 getList: function () {
  105 +
  106 + if(this.data.ismore) return false;
  107 + if(this.data.searching) return false;
  108 + this.data.searching=1;
  109 +
  110 + wx.showLoading({
  111 + title: '加载中.',
  112 + })
  113 +
102 114 var th = this;
  115 + let r_q={
  116 + store_id: th.data.getStorageID, //商家ID
  117 + user_id: th.data.getUserID, //用户ID
  118 + page: th.data.curpage,
  119 + pageSize: th.data.pageSize,
  120 + pay_state:1
  121 + };
  122 +
  123 + if(this.data.sear_key){
  124 + r_q.key_str=this.data.sear_key;
  125 + }
  126 +
103 127  
104 128 getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagRecord/page', {
105 129 isShowLoading: true,
106   - data: {
107   - store_id: th.data.getStorageID, //商家ID
108   - user_id: th.data.getUserID, //用户ID
109   - page: th.data.curpage,
110   - pageSize: th.data.pageSize,
111   - pay_state:1
112   - },
  130 + data:r_q ,
113 131 success: function (res) {
  132 +
  133 + th.data.searching=0;
  134 +
114 135 if (res.data.code == 0) {
115 136  
116 137 var arr1 = th.data.wareCard;
... ... @@ -156,6 +177,8 @@ Page({
156 177 })
157 178 }
158 179  
  180 + wx.hideLoading();
  181 +
159 182 }
160 183  
161 184 });
... ... @@ -226,5 +249,17 @@ Page({
226 249 }
227 250 },
228 251  
  252 + search_lb(){
  253 + this.data.curpage=0;
  254 + this.searching=0;
  255 + this.setData({ismore:0,is_get:0,wareCard:[]});
  256 + this.getList();
  257 + },
  258 +
  259 + input_sear(e){
  260 + let value = e.detail;
  261 + this.data.sear_key=value;
  262 + }
  263 +
229 264  
230 265 });
231 266 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.json
... ... @@ -3,6 +3,7 @@
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5 5 "warn": "/components/long_warn/long_warn",
6   - "my_confirm": "/components/my_confirm/my_confirm"
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "lb_sear": "/components/lb_sear/lb_sear"
7 8 }
8 9 }
9 10 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.wxml
1 1 <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;">
2 2 <block wx:if="{{ad_data}}">
3   - <view class="top_img">
  3 + <view class="top_img rel">
4 4 <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
5 6 </view>
6 7 </block>
7 8 <block wx:else>
8   - <view class="top_img">
9   - <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
10   - <image mode="widthFix" src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true"></image>
  9 + <view class="top_img rel">
  10 + <image mode="widthFix" src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true"></image>
  11 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
11 12 </view>
12 13 </block>
13 14  
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -187,6 +187,8 @@ Page({
187 187  
188 188 wx.hideLoading();
189 189 if(th.data.b_plist){
  190 + //让秒杀跳转后能下拉加载
  191 + th.data.ismore = 1;
190 192 //组件的id
191 193 var auto_go = th.selectComponent("#auto_go");
192 194 auto_go.show();
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -203,6 +203,8 @@ Page({
203 203  
204 204 wx.hideLoading();
205 205 if(th.data.b_plist){
  206 + //让秒杀跳转后能下拉加载
  207 + th.data.ismore = 1;
206 208 //组件的id
207 209 var auto_go = th.selectComponent("#auto_go");
208 210 auto_go.show();
... ...
pages/cart/cart/cart.js
... ... @@ -3488,7 +3488,7 @@ Page({
3488 3488  
3489 3489 console.log('活动次数:' + userbuynum);
3490 3490  
3491   - if(userbuynum >= i_arr[j].act.zh_num && i_arr[j].act.zh_num>0){
  3491 + if(0 >= i_arr[j].act.zh_num-i_arr[j].act.zh_buy_num && i_arr[j].act.zh_num>0){
3492 3492 i_arr[j].out_all_num=1;
3493 3493 checkArr7.push(i_arr[j])
3494 3494 }else if (userbuynum >= i_arr[j].act.buy_limit && i_arr[j].act.buy_limit>0) {
... ... @@ -4034,11 +4034,13 @@ Page({
4034 4034 prom_type: g_arr[i].prom_type,
4035 4035 prom_id: g_arr[i].prom_id,
4036 4036 };
4037   - let gitem = checkArr7.find(item => item.goods_id == g_arr[i].goods_id)
4038   - if (gitem) {
4039   - data.prom_type = 0
4040   - data.prom_id = 0
4041   - }
  4037 +
  4038 + // let gitem = checkArr7.find(item => item.goods_id == g_arr[i].goods_id)
  4039 + // if (gitem) {
  4040 + // data.prom_type = 0
  4041 + // data.prom_id = 0
  4042 + // }
  4043 +
4042 4044 //-- 如果有线下取价的时候 --
4043 4045 if (g_arr[i].is_offline) {
4044 4046 data.pricing_type = g_arr[i].pricing_type;
... ... @@ -5065,6 +5067,7 @@ Page({
5065 5067 else cx_prom_group[dx].sele = 1;
5066 5068 }
5067 5069  
  5070 + let the_rs={code:0};
5068 5071 // -- 判断 --
5069 5072 this.cx_check_ok2(async function (the_rs) {
5070 5073 if (the_rs.code == 0) {
... ... @@ -5204,11 +5207,11 @@ Page({
5204 5207 buyed = zbuy.data.data.userbuynum;
5205 5208 }
5206 5209 if (zh['zh_num'] > 0 && zh['zh_buy_num'] + num0 > zh['zh_num']) {
5207   - func({
5208   - 'code': -1,
5209   - 'msg': '超出组合购活动总数量'
5210   - });
5211   - return false;
  5210 + // func({
  5211 + // 'code': -1,
  5212 + // 'msg': '超出组合购活动总数量'
  5213 + // });
  5214 + // return false;
5212 5215 }
5213 5216 }
5214 5217 }
... ... @@ -5244,11 +5247,11 @@ Page({
5244 5247 return e.goods_id == gid;
5245 5248 })
5246 5249 if (gdlist['buyqty'] > 0 && num1 + promgoodsbuynum > gdlist['buyqty']) {
5247   - func({
5248   - 'code': -1,
5249   - 'msg': '超出组合购商品的限购'
5250   - });
5251   - return false;
  5250 + // func({
  5251 + // 'code': -1,
  5252 + // 'msg': '超出组合购商品的限购'
  5253 + // });
  5254 + // return false;
5252 5255 }
5253 5256 }
5254 5257 }
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -71,6 +71,8 @@ Page({
71 71 keyword:'', //门店搜索
72 72 sec_i:-1,//选中分类门店 下标
73 73  
  74 + sear_key:''
  75 +
74 76 },
75 77 onLoad: function (options) {
76 78 var th=this;
... ... @@ -431,17 +433,35 @@ Page({
431 433 },
432 434  
433 435 getList: function (e) {
  436 +
  437 + if(this.data.ismore) return false;
  438 + if(this.data.searching) return false;
  439 + this.data.searching=1;
  440 +
  441 + wx.showLoading({
  442 + title: '加载中.',
  443 + })
  444 +
434 445 var th = this;
  446 + let r_q={
  447 + storeId: th.data.getStorageID, //商家ID
  448 + userId: th.data.getUserID, //用户ID
  449 + page: th.data.curpage,
  450 + pageSize: th.data.pageSize,
  451 + is_share:0
  452 + };
  453 +
  454 + if(this.data.sear_key){
  455 + r_q.key_str=this.data.sear_key;
  456 + }
  457 +
435 458 getApp().request.get('/api/weshop/marketing/giftbag/page', {
436 459 isShowLoading: true,
437   - data: {
438   - storeId: th.data.getStorageID, //商家ID
439   - userId: th.data.getUserID, //用户ID
440   - page: th.data.curpage,
441   - pageSize: th.data.pageSize,
442   - is_share:0
443   - },
  460 + data: r_q,
444 461 success: function (res) {
  462 +
  463 + th.data.searching=0;
  464 +
445 465 if (res.data.code == 0) {
446 466 th.data.curpage++;
447 467 var arr1 = th.data.wareCard;
... ... @@ -460,6 +480,7 @@ Page({
460 480 is_read: 1,
461 481 is_get:1
462 482 }), wx.stopPullDownRefresh(); //停止下拉刷新
  483 +
463 484 } else {
464 485 th.setData({
465 486 is_read: 1,
... ... @@ -467,6 +488,9 @@ Page({
467 488 is_get:1
468 489 })
469 490 }
  491 +
  492 + wx.hideLoading();
  493 +
470 494 }
471 495 })
472 496  
... ... @@ -825,5 +849,18 @@ Page({
825 849  
826 850 buy_libao:function () {
827 851 com.buy_libao(this)
  852 + },
  853 +
  854 + search_lb(){
  855 + this.data.curpage=0;
  856 + this.searching=0;
  857 + this.setData({ismore:0,is_get:0,wareCard:[]});
  858 + this.getList();
  859 + },
  860 +
  861 + input_sear(e){
  862 + let value = e.detail;
  863 + this.data.sear_key=value;
828 864 }
  865 +
829 866 })
830 867 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.json
... ... @@ -2,6 +2,7 @@
2 2 "navigationBarTitleText": "礼包列表",
3 3 "usingComponents": {
4 4 "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
  5 + "my_confirm": "/components/my_confirm/my_confirm",
  6 + "lb_sear": "/components/lb_sear/lb_sear"
6 7 }
7 8 }
8 9 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxml
1 1 <wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2 2 <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;padding-bottom: 10rpx;">
3 3 <block wx:if="{{ad_data}}">
4   - <view class="top_img">
  4 + <view class="top_img rel">
5 5 <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  6 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
6 7 </view>
7 8 </block>
8 9 <block wx:else>
9   - <view class="top_img">
10   - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  10 + <view class="top_img rel">
  11 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  12 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
11 13 </view>
12 14 </block>
13 15  
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxss
... ... @@ -254,4 +254,4 @@ page {
254 254 border-radius: 30rpx;
255 255 border: 2rpx solid rgb(238, 238, 238);
256 256 padding-left: 30rpx;
257   -}
258 257 \ No newline at end of file
  258 +}
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -28,6 +28,8 @@ Page({
28 28 total: 0, //总数量
29 29 ad_data: null,
30 30 first_leader: e.globalData.first_leader || 0, // 推荐人ID
  31 +
  32 + sear_key:'' //顶部搜索关键子
31 33 },
32 34 onLoad: function (options) {
33 35 this.setData({
... ... @@ -94,17 +96,34 @@ Page({
94 96  
95 97 },
96 98 getList: function () {
  99 +
  100 + if(this.data.ismore) return false;
  101 + if(this.data.searching) return false;
  102 + this.data.searching=1;
  103 +
  104 + wx.showLoading({
  105 + title: '加载中.',
  106 + })
  107 +
97 108 var th = this;
  109 + let r_q={
  110 + storeId: th.data.getStorageID, //商家ID
  111 + userId: th.data.getUserID, //用户ID
  112 + page: th.data.curpage,
  113 + pageSize: th.data.pageSize
  114 + }
  115 +
  116 + if(this.data.sear_key){
  117 + r_q.key_str=this.data.sear_key;
  118 + }
98 119  
99 120 getApp().request.get('/api/weshop/marketing/my/giftbag/page', {
100 121 isShowLoading: true,
101   - data: {
102   - storeId: th.data.getStorageID, //商家ID
103   - userId: th.data.getUserID, //用户ID
104   - page: th.data.curpage,
105   - pageSize: th.data.pageSize
106   - },
  122 + data: r_q,
107 123 success: function (res) {
  124 +
  125 + th.data.searching=0;
  126 +
108 127 if (res.data.code == 0) {
109 128 th.data.curpage++;
110 129 var arr1 = th.data.wareCard;
... ... @@ -155,6 +174,8 @@ Page({
155 174 })
156 175 }
157 176  
  177 + wx.hideLoading();
  178 +
158 179 }
159 180  
160 181 });
... ... @@ -203,7 +224,7 @@ Page({
203 224  
204 225 //--- 分享设置 --
205 226 onShareAppMessage: function (e) {
206   - getApp().globalData.no_clear=1;
  227 + getApp().globalData.no_clear=1;
207 228 var curPage = this;
208 229 var pagePath = curPage.route; //当前页面url
209 230 if (pagePath.indexOf('/') != 0) {
... ... @@ -216,14 +237,25 @@ Page({
216 237 }
217 238 },
218 239  
219   - onShareTimeline() {
  240 + onShareTimeline() {
220 241 getApp().globalData.no_clear=1;
221 242 return {
222 243 title: '专享礼包',
223 244 imageUrl: this.data.ad_data.ad_code,
224 245 query: "first_leader=" + this.data.getUserID
225 246 }
226   - },
  247 + },
  248 +
  249 + search_lb(){
  250 + this.data.curpage=0;
  251 + this.searching=0;
  252 + this.setData({ismore:0,is_get:0,wareCard:[]});
  253 + this.getList();
  254 + },
227 255  
  256 + input_sear(e){
  257 + let value = e.detail;
  258 + this.data.sear_key=value;
  259 + }
228 260  
229 261 });
230 262 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.json
... ... @@ -3,6 +3,7 @@
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5 5 "warn": "/components/long_warn/long_warn",
6   - "my_confirm": "/components/my_confirm/my_confirm"
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "lb_sear": "/components/lb_sear/lb_sear"
7 8 }
8 9 }
9 10 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.wxml
1 1 <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;padding-bottom: 10rpx;">
2 2 <block wx:if="{{ad_data}}">
3   - <view class="top_img">
4   - <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  3 + <view class="top_img rel">
  4 + <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
5 6 </view>
6 7 </block>
7 8 <block wx:else>
8   - <view class="top_img">
9   - <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
10   - <image mode="widthFix" src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>
  9 + <view class="top_img rel">
  10 + <image mode="widthFix" src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>
  11 + <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
11 12 </view>
12 13 </block>
13 14  
... ...
pages/giftpack/mygiftpack/mygiftpack.wxss
... ... @@ -261,7 +261,6 @@ button{
261 261 background-color: rgb(153,153,153) !important;
262 262 }
263 263  
264   -
265 264 button::after{
266 265 border: none;
267 266 }
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -10,6 +10,7 @@ var t = require(&quot;../../../utils/util.js&quot;),
10 10 o = s.globalData.setting,
11 11 os = o;
12 12  
  13 +var wxlog = require("../../../utils/wxlog.js");
13 14 let self = null;
14 15  
15 16 //评价加载更多
... ... @@ -297,6 +298,10 @@ Page({
297 298 console.log("gd onload-- 3 --");
298 299 console.log(t);
299 300  
  301 + if(t){
  302 + wxlog.info(getApp().globalData.user_id+'-分享的内容:'+JSON.stringify(t));
  303 + }
  304 +
300 305 //群id
301 306 if (t && t.groupchat_id && !t.groupchat_id != 'undefined' && !t.groupchat_id != 'null') {
302 307 getApp().globalData.groupchat_id = t.groupchat_id
... ... @@ -403,6 +408,9 @@ Page({
403 408 getApp().globalData.guide_id = res.data.data.id;
404 409 getApp().globalData.guide_pick_id = res.data.data.pickup_id;
405 410  
  411 +
  412 + wxlog.info(getApp().globalData.user_id+'-分享的导购:'+getApp().globalData.guide_id);
  413 +
406 414 }
407 415 })
408 416  
... ... @@ -563,6 +571,8 @@ Page({
563 571 if (res.data.code == 0) {
564 572 getApp().globalData.guide_id = res.data.data.id;
565 573 getApp().globalData.guide_pick_id = res.data.data.pickup_id
  574 +
  575 + wxlog.info(getApp().globalData.user_id+'-分享的导购,从直播房间分享:'+getApp().globalData.guide_id);
566 576 }
567 577 })
568 578  
... ... @@ -1441,8 +1451,6 @@ Page({
1441 1451  
1442 1452  
1443 1453  
1444   -
1445   -
1446 1454 //如果是秒杀的话,要看redis够不够
1447 1455 if (this.data.prom_type == 1 || this.data.prom_type == 2) {
1448 1456  
... ... @@ -1598,7 +1606,7 @@ Page({
1598 1606  
1599 1607 })
1600 1608 },
1601   - async getUserBuyPromNum(prom_id) {
  1609 + async getUserBuyPromNum(prom_id,is_zh) {
1602 1610 var userInfo = getApp().globalData.userInfo;
1603 1611 var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=7&prom_id=${prom_id}`;
1604 1612 let res = await getApp().request.promiseGet(url, {
... ... @@ -1611,6 +1619,7 @@ Page({
1611 1619 this.setData({
1612 1620 userbuynum
1613 1621 })
  1622 + if(is_zh) this.data.user_zh_buy_num=userbuynum;
1614 1623 // return userbuynum
1615 1624 },
1616 1625  
... ... @@ -2034,6 +2043,8 @@ Page({
2034 2043 newd.prom_type=0;
2035 2044 newd.prom_id=0;
2036 2045 }
  2046 +
  2047 + wxlog.info(getApp().globalData.user_id+'-加入购物车:'+JSON.stringify(newd));
2037 2048 //
2038 2049 // //如果有搭配购的时候的时候
2039 2050 // if(th.data.collocationGoods && newd.prom_type==0){
... ... @@ -2183,6 +2194,7 @@ Page({
2183 2194 newd['pick_name'] = th.data.sto_sele_name;
2184 2195 newd['pick_dis'] = th.data.sto_sele_distr;
2185 2196 th.buyNow(newd);
  2197 +
2186 2198 }
2187 2199 },
2188 2200  
... ... @@ -2224,6 +2236,9 @@ Page({
2224 2236 // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, {
2225 2237 // action: "buy_now"
2226 2238 // }),
  2239 +
  2240 + wxlog.info(getApp().globalData.user_id+'-立即购买:'+JSON.stringify(e));
  2241 +
2227 2242 let th = this
2228 2243 this.setData({
2229 2244 openSpecModal: 0,
... ... @@ -2249,46 +2264,82 @@ Page({
2249 2264 s.set_b_now(e);
2250 2265 getApp().goto("/packageE/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id)
2251 2266 } else {
2252   -
2253   - //----其他就按照公众号的购物车立即购买形式来修改,先看会员在购物车中是否加入了该商品,立即购买的-----
2254   - getApp().request.get("/api/weshop/cart/page", {
2255   - data: {
2256   - store_id: os.stoid,
2257   - user_id: oo.user_id,
2258   - state: 1
2259   - },
2260   - success: function (res) {
2261   - //-------如果购物车中有相关的数据---------
2262   - if (res.data.code == 0 && res.data.data.total > 0) {
2263   - for (let j in res.data.data.pageData) {
2264   - let item_j = res.data.data.pageData[j];
2265   - var url = '/api/weshop/cart/del/' + os.stoid + '/' + item_j.id;
2266   - getApp().request.delete(url, {});
2267   - }
  2267 + //-- 如果是第一顺序是组合购的时候 --
  2268 + if(th.data.cx_prom_group && th.data.cx_prom_group.length && th.data.cx_prom_group[0].prom_type==7){
  2269 + if(!th.data.is_has_zh_num){
  2270 + th.data.adding=0;
  2271 + wx.hideLoading();
  2272 + wx.showModal({
  2273 + title: '提示',
  2274 + content: '超出组合购总数,将以普通商品购买',
  2275 + success (res) {
  2276 + if (res.confirm) {
  2277 + th.cart_next_next(e);
  2278 + }
  2279 + }
  2280 + })
  2281 + }else if(th.data.user_zh_buy_num>=th.data.zh_act.buy_limit && th.data.zh_act.buy_limit>0){
  2282 + th.data.adding=0;
  2283 + wx.hideLoading();
  2284 + wx.showModal({
  2285 + title: '提示',
  2286 + content: '超出组合购限购次数,将以普通商品购买',
  2287 + success (res) {
  2288 + if (res.confirm) {
  2289 + th.cart_next_next(e);
  2290 + }
  2291 + }
  2292 + })
  2293 + }else{
  2294 + th.cart_next_next(e);
2268 2295 }
  2296 + }
  2297 + else{
  2298 + th.cart_next_next(e);
  2299 + }
  2300 + }
2269 2301  
2270   - //-- 推迟一下,因为删除没有那么快 --
2271   - setTimeout(() => {
2272   - e.state = 1;
2273   - e.prom_type = 0;
2274   - e.prom_id = 0
2275   - getApp().request.post("/api/weshop/cart/save", {
2276   - data: e,
2277   - success: function (t) {
2278   - th.closeSpecModal();
2279   - getApp().goto("/packageE/pages/cart/cart2/cart2?state=1");
2280   - }
2281   - });
2282   - }, 500)
2283 2302  
2284   - }
2285   - })
2286   - }
  2303 + }
  2304 + },
2287 2305  
2288 2306  
2289 2307  
  2308 + cart_next_next(e){
  2309 + var th=this;
  2310 + //----其他就按照公众号的购物车立即购买形式来修改,先看会员在购物车中是否加入了该商品,立即购买的-----
  2311 + getApp().request.get("/api/weshop/cart/page", {
  2312 + data: {
  2313 + store_id: os.stoid,
  2314 + user_id: oo.user_id,
  2315 + state: 1
  2316 + },
  2317 + success: function (res) {
  2318 + //-------如果购物车中有相关的数据---------
  2319 + if (res.data.code == 0 && res.data.data.total > 0) {
  2320 + for (let j in res.data.data.pageData) {
  2321 + let item_j = res.data.data.pageData[j];
  2322 + var url = '/api/weshop/cart/del/' + os.stoid + '/' + item_j.id;
  2323 + getApp().request.delete(url, {});
  2324 + }
  2325 + }
2290 2326  
2291   - }
  2327 + //-- 推迟一下,因为删除没有那么快 --
  2328 + setTimeout(() => {
  2329 + e.state = 1;
  2330 + e.prom_type = 0;
  2331 + e.prom_id = 0
  2332 + getApp().request.post("/api/weshop/cart/save", {
  2333 + data: e,
  2334 + success: function (t) {
  2335 + th.closeSpecModal();
  2336 + getApp().goto("/packageE/pages/cart/cart2/cart2?state=1");
  2337 + }
  2338 + });
  2339 + }, 500)
  2340 +
  2341 + }
  2342 + })
2292 2343 },
2293 2344  
2294 2345 //----------增加购买数量-----------
... ... @@ -3401,7 +3452,7 @@ Page({
3401 3452 }
3402 3453 else that.get_sto(null,()=>{
3403 3454 that.sele_spec_next(that,item,gid,nor);
3404   - });
  3455 + },item);
3405 3456  
3406 3457 },
3407 3458  
... ... @@ -3633,7 +3684,7 @@ Page({
3633 3684  
3634 3685  
3635 3686 //---------拿出门店分类和门店------------
3636   - get_sto(e,func) {
  3687 + get_sto(e,func,item) {
3637 3688 console.log('get_sto')
3638 3689 var th = this,
3639 3690 that = this;
... ... @@ -3706,9 +3757,15 @@ Page({
3706 3757 if(!is_normal && py>0 && [3,5,7,10].indexOf(py)<0 ){
3707 3758 pickup_ids=null;
3708 3759 }
  3760 + //-- 把秒杀的指定对象带入 --
  3761 + if(item){
  3762 + if(item.is_pickup && item.pick_up_lists){
  3763 + pickup_ids=item.pick_up_lists
  3764 + }else{
  3765 + pickup_ids=null;
  3766 + }
3709 3767  
3710   - //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店
3711   - if(!is_normal && [1,2,6].indexOf(py)>-1 && th.data.prom_act.pick_up_lists){
  3768 + }else if(!is_normal && [1,2,6].indexOf(py)>-1 && th.data.prom_act.pick_up_lists){ //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店
3712 3769 pickup_ids=th.data.prom_act.pick_up_lists
3713 3770 }
3714 3771  
... ... @@ -3829,18 +3886,26 @@ Page({
3829 3886 }
3830 3887 if(func) func();
3831 3888 }else{
  3889 +
  3890 + if(func) func();
  3891 + th.setData({sp_seleing:0})
3832 3892 wx.hideLoading();
3833 3893 }
3834 3894 } else {
  3895 + if(func) func();
  3896 + th.setData({sp_seleing:0})
3835 3897 wx.hideLoading();
3836 3898 }
3837 3899 },err=>{
3838 3900 ut.m_toast('网络繁忙,请稍后重试');
  3901 + if(func) func();
  3902 + th.setData({sp_seleing:0})
3839 3903 wx.hideLoading();
3840 3904 })
3841 3905 }, 200)
3842 3906  
3843 3907 },
  3908 +
3844 3909 //获取搜索门店输入的值
3845 3910 input_store: function (e) {
3846 3911 this.setData({
... ... @@ -3951,7 +4016,32 @@ Page({
3951 4016 }
3952 4017  
3953 4018 var g_distr_type = th.data.sele_g.distr_type;
3954   - wx.hideLoading();
  4019 + wx.hideLoading()
  4020 +
  4021 +
  4022 + /*--- 判断初始的用户的默认门店要不要弄进去 ---*/
  4023 + var fid=-1;
  4024 + if(th.data.fir_def_store){
  4025 + var fid=e.data.data.pageData.findIndex((e)=>{
  4026 + return e.pickup_id==th.data.fir_def_store.pickup_id;
  4027 + })
  4028 + }
  4029 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  4030 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid<0 &&
  4031 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  4032 + th.data.fir_def_store.CanOutQty = 0;
  4033 + //--当选择的门店是客户默认的门店的时候--
  4034 + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) {
  4035 + th.setData({
  4036 + def_pick_store: th.data.fir_def_store
  4037 + });
  4038 + e.data.data.pageData.unshift(th.data.def_pick_store);
  4039 + } else {
  4040 + e.data.data.pageData.splice(1, 0, th.data.fir_def_store);
  4041 + }
  4042 + }
  4043 +
  4044 +
3955 4045  
3956 4046 //单总量超出10个的时候,同时门店有分类
3957 4047 if (e.data.data.total > 10 && e.his_cate_num) {
... ... @@ -4302,6 +4392,8 @@ Page({
4302 4392  
4303 4393 }
4304 4394  
  4395 +
  4396 +
4305 4397 //数据组装下
4306 4398 var em = {};
4307 4399 em.data = {};
... ... @@ -4311,8 +4403,14 @@ Page({
4311 4403 em.his_cate_num=e.his_cate_num;
4312 4404  
4313 4405  
  4406 + var fid=-1;
  4407 + if(th.data.fir_def_store){
  4408 + var fid=em.data.data.pageData.findIndex((e)=>{
  4409 + return e.pickup_id==th.data.fir_def_store.pickup_id;
  4410 + })
  4411 + }
4314 4412 //--如果找到默认门店,同时也应该判断配送方式对不对--
4315   - if (th.data.fir_def_store && !is_find_def_store && th.data.fir_def_store.pickup_id &&
  4413 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid<0 &&
4316 4414 (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
4317 4415 th.data.fir_def_store.CanOutQty = 0;
4318 4416 //--当选择的门店是客户默认的门店的时候--
... ... @@ -4336,6 +4434,7 @@ Page({
4336 4434 th.deal_pickup(em);
4337 4435  
4338 4436 } else {
  4437 +
4339 4438 th.setData({
4340 4439 all_sto: null,
4341 4440 only_pk: null,
... ... @@ -4344,6 +4443,7 @@ Page({
4344 4443 }
4345 4444  
4346 4445 } else {
  4446 +
4347 4447 th.setData({
4348 4448 all_sto: null,
4349 4449 only_pk: null,
... ... @@ -5601,8 +5701,6 @@ Page({
5601 5701 newd['guide_type'] = 2;
5602 5702  
5603 5703  
5604   -
5605   -
5606 5704 } else {
5607 5705 if (getApp().globalData.guide_id) {
5608 5706 newd['guide_id'] = getApp().globalData.guide_id;
... ... @@ -5728,6 +5826,9 @@ Page({
5728 5826  
5729 5827 //----------立即购买_pt-----------
5730 5828 buyNow_pt: function (e) {
  5829 +
  5830 + wxlog.info(getApp().globalData.user_id+'-拼团立即购买:'+JSON.stringify(e));
  5831 +
5731 5832 s.set_b_now(e);
5732 5833 wx.navigateTo({
5733 5834 url: "/packageE/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id,
... ... @@ -7267,6 +7368,7 @@ Page({
7267 7368 })
7268 7369 }
7269 7370 },
  7371 +
7270 7372 //关闭选择门店
7271 7373 close_popup: function (e) {
7272 7374 var th = this;
... ... @@ -7472,12 +7574,22 @@ Page({
7472 7574  
7473 7575 if (!item) return false;
7474 7576  
  7577 + if (item.is_no_dis_nor || (item.is_no_dis_act && !th.data.is_normal)){
  7578 + wx.showToast({
  7579 + title: "该门店不可售,请选择其他门店",
  7580 + icon: 'none',
  7581 + duration: 2000
  7582 + });
  7583 + return false;
  7584 + }
  7585 +
  7586 +
7475 7587 if (!th.data.sele_g) return false;
7476 7588 //判断门店的配送方式是不是匹配
7477 7589 var g_distr_type = th.data.sele_g.distr_type;
7478 7590 if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
7479 7591 wx.showToast({
7480   - title: "门店配送方式不匹配",
  7592 + title: "门店配送方式不匹配,请选择其他门店",
7481 7593 icon: 'none',
7482 7594 duration: 2000
7483 7595 });
... ... @@ -8485,14 +8597,13 @@ Page({
8485 8597 let item = f_more[i];
8486 8598 f_more[i].prom_id = item.act_id;
8487 8599 f_more[i].prom_type = 1;
8488   - if (item.goods_id == this.data.data.goods_id) {
8489   - continue;
8490   - }
  8600 +
8491 8601 var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
8492 8602 await getApp().request.promiseGet(url, {}).then(rs => {
8493 8603 if (rs.data.code == 0 && rs.data.data) {
8494 8604 f_more[i].price = rs.data.data.user_price;
8495   -
  8605 + f_more[i].is_pickup = rs.data.data.is_pickup;
  8606 + f_more[i].pick_up_lists = rs.data.data.pick_up_lists;
8496 8607 }
8497 8608 })
8498 8609 }
... ... @@ -8724,12 +8835,13 @@ Page({
8724 8835  
8725 8836 //判断组合购总数够不够
8726 8837 var is_has_zh_num = (!e.data.data.zh_num || e.data.data.zh_buy_num < e.data.data.zh_num);
8727   - if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time && is_has_zh_num) {
  8838 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time ) {
8728 8839 //-- 获取商品列表 --
8729 8840 th.setData({
8730 8841 zh_act: e.data.data
8731 8842 });
8732   - th.getUserBuyPromNum(e.data.data.id)
  8843 + th.data.is_has_zh_num= is_has_zh_num;
  8844 + th.getUserBuyPromNum(e.data.data.id,1)
8733 8845 }
8734 8846 }
8735 8847  
... ...
pages/goods/goodsList/goodsList.wxml
... ... @@ -88,7 +88,7 @@
88 88 <view class="item-cont">
89 89 <view class="title ellipsis-2">{{item.goods_name}}</view>
90 90 <!-- 判断是否有活动价 -->
91   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}">
  91 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}">
92 92 <view class="flex on">
93 93 <!-- 活动价 -->
94 94 <view class="price">
... ...
pages/goods/search/search.wxml
... ... @@ -87,7 +87,7 @@
87 87 <view class="item-cont">
88 88 <view class="title ellipsis-2">{{item.goods_name}}</view>
89 89 <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
90   - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
  90 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10}}">
91 91 <!-- 活动价 -->
92 92 <view class="price">
93 93 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
... ...
pages/user/userinfo/userinfo.js
... ... @@ -81,6 +81,7 @@ Page({
81 81 },
82 82 //通过路径跳转到其他页面
83 83 goto: function(e) {
  84 + this.data.is_zy=1; //避免页面重新加载
84 85 var url = e.currentTarget.dataset.url;
85 86 getApp().goto(url);
86 87 },
... ... @@ -772,9 +773,12 @@ Page({
772 773 },
773 774  
774 775 onShow: function() {
775   - getApp().check_can_share();
  776 + getApp().check_can_share();
776 777 var e = this;
777   - if (this.data.is_zy) return false;
  778 + if (this.data.is_zy){
  779 + this.data.is_zy=0;
  780 + return false;
  781 + }
778 782 this.wait_for_store_config();
779 783  
780 784 //如果有传值进行跳转的话
... ... @@ -1061,10 +1065,12 @@ Page({
1061 1065  
1062 1066 //-- 跳转到获取导购的列表 --
1063 1067 go_get_guide:function () {
  1068 + let th=this;
1064 1069  
1065   - if(this.data.sele_ing) return false;
1066   - this.data.sele_ing=1;
  1070 + if(this.data.sele_ing) return false;
  1071 + this.data.sele_ing=1;
1067 1072 this.check_click_ok(function(){
  1073 + th.data.is_zy=1;
1068 1074 getApp().goto("/packageB/pages/user/choice_guide/choice_guide");
1069 1075  
1070 1076 },1)
... ...
pages/user/userinfo/userinfo.wxml
... ... @@ -275,7 +275,7 @@
275 275 </view>
276 276 </view>
277 277  
278   - <navigator bindtap="goto-address" class="user-name mt flex-vertical-between" url="/packageF/pages/user/address_list/address_list">
  278 + <navigator bindtap="goto" class="user-name mt flex-vertical-between" data-url="/packageF/pages/user/address_list/address_list">
279 279 <view class="user-name-txt">收货地址</view>
280 280 <view class="flex-center user-txt-right">
281 281 <view class="angle">∟</view>
... ...