Merged
Merge Request #538 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants



app.js
... ... @@ -251,7 +251,7 @@ App({
251 251 title: t,
252 252 mask: e,
253 253 duration: a,
254   - image:"/packageA/images/gt.png",
  254 + image:"/images/gt.png",
255 255 complete: function() {
256 256 "function" == typeof o && setTimeout(o, a);
257 257 }
... ...
app.json
... ... @@ -103,11 +103,11 @@
103 103 "pages/quan_pro/quan_pro",
104 104 "pages/liveStream/liveStream",
105 105 "pages/liveStreamDetails/liveStreamDetails",
106   - "pages/shop_details/shop_details",
  106 +
107 107 "pages/goods_share/goods_share",
108 108 "pages/activity_share/activity_share",
109   - "pages/live_share/live_share",
110   - "pages/addCustomer/addCustomer"
  109 + "pages/live_share/live_share",
  110 + "pages/quan/quan"
111 111 ]
112 112  
113 113 }],
... ...
packageA/images/gt.png renamed to images/gt.png

1.72 KB

packageA/pages/activity_share/activity_share.js
... ... @@ -142,7 +142,7 @@ Page({
142 142 //礼包的转发
143 143 if(th.data.currentIndex==3){
144 144 var lbid=th.data.hui_active.lbId;
145   - var url="pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
  145 + var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
146 146 if(getApp().globalData.user_id){
147 147 url+="&first_leader="+getApp().globalData.user_id;
148 148 }
... ... @@ -161,10 +161,13 @@ Page({
161 161 //---秒杀,拼团,促销---
162 162 var item=this.data.share_good;
163 163 if(item){
164   - var price = item.shop_price;
  164 + var price = item.price;
  165 + if(!price) price=item.shop_price;
  166 +
  167 +
165 168 var title= item.goods_name;
166 169 var img=this.data.url+item.original_img;
167   - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + th.data.gid;
  170 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
168 171 if(getApp().globalData.user_id){
169 172 url+="&first_leader="+getApp().globalData.user_id;
170 173 }
... ... @@ -494,7 +497,7 @@ Page({
494 497  
495 498 var app = getApp();
496 499 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
497   - var scene = th.data.gid+"";
  500 + var scene = th.data.share_good.goods_id+"";
498 501 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
499 502 if(user_id>0){
500 503 scene+="_"+user_id;
... ... @@ -1057,6 +1060,28 @@ Page({
1057 1060 this.data.is_load=0;
1058 1061 this.data.currentPage=1;
1059 1062 this.requestGoodsList();
  1063 + },
  1064 +
  1065 +
  1066 + go_goods:function(e){
  1067 + var index=e.currentTarget.dataset.index;
  1068 + var item=this.data.list[index];
  1069 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
  1070 + getApp().goto(url);
  1071 + },
  1072 +
  1073 + go_coll_good:function(e){
  1074 + var gid=e.currentTarget.dataset.gid;
  1075 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid;
  1076 + getApp().goto(url);
  1077 + },
  1078 +
  1079 + go_libao:function(e){
  1080 + var index=e.currentTarget.dataset.index;
  1081 + var item=this.data.list[index];
  1082 + var lbid=item.lbId;
  1083 + var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
  1084 + getApp().goto(url);
1060 1085 }
1061 1086  
1062 1087  
... ...
packageA/pages/activity_share/activity_share.wxml
... ... @@ -26,13 +26,13 @@
26 26 scroll-y="true"
27 27 bindscrolltolower="refresh"
28 28 scroll-anchoring
29   - refresher-enabled>
  29 + >
30 30  
31 31 <block wx:for="{{list}}">
32 32  
33 33 <!-- 拼单和秒杀 -->
34 34 <block wx:if="{{currentIndex == 0 || currentIndex == 1}}">
35   - <view class class="list-item">
  35 + <view class class="list-item" bindtap="go_goods" data-index="{{index}}">
36 36 <view class="img-container">
37 37 <image src="{{url+item.original_img}}" style="width: 100%; height: 100%;"
38 38 binderror="bind_bnerr2" lazy-load="true"
... ... @@ -67,7 +67,7 @@
67 67 <view>¥{{item.price}}</view>
68 68 <view class="retail">零售价:¥{{item.market_price}}</view>
69 69 </view>
70   - <view bindtap="share_good" data-index="{{index}}" class="t-r fs28"><text class="btn-share">分享</text></view>
  70 + <view catchtap="share_good" data-index="{{index}}" class="t-r fs28"><text class="btn-share">分享</text></view>
71 71 </view>
72 72 </view>
73 73 </block>
... ... @@ -107,7 +107,7 @@
107 107  
108 108 <!-- 专享礼包 -->
109 109 <block wx:if="{{currentIndex == 3}}">
110   - <view class class="list-item">
  110 + <view class class="list-item" bindtap="go_libao" data-index="{{index}}">
111 111 <view class="img-container">
112 112 <image src="{{url+item.lbUrl}}" style="width: 100%; height: 100%;"
113 113 binderror="bind_bnerr2" lazy-load="true"
... ... @@ -122,7 +122,7 @@
122 122 </view>
123 123 <view class="fs22 line-through gray">零售价:¥{{item.giftPosPrice}}</view>
124 124 <!-- <view class="fs22">已售:<text class="red">3</text></view> -->
125   - <view bindtap="share_index" data-index="{{index}}" class="t-r fs28"><view class="btn-share">分享</view></view>
  125 + <view catchtap="share_index" data-index="{{index}}" class="t-r fs28"><view class="btn-share">分享</view></view>
126 126 </view>
127 127 </view>
128 128 </block>
... ... @@ -151,7 +151,7 @@
151 151 <view class="popup-title dash-b">活动详情</view>
152 152 <!-- 搭配促销 -->
153 153 <block wx:if="{{currentIndex2 == 1}}">
154   - <view class="pdv20 dash-b fs28">
  154 + <view class="pdv20 dash-b fs28" bindtap="go_coll_good" data-gid="{{hui_active.main_goods_id}}">
155 155 <view class="popup-title2">必买商品</view>
156 156 <view class="popup-title3">商品编号:{{hui_active.goods_sn}}</view>
157 157 <view class="popup-title3">{{hui_active.main_goods_name}}</view>
... ... @@ -168,7 +168,7 @@
168 168 </view>
169 169 <view class="popup-list t-c">
170 170 <block wx:for="{{list2}}">
171   - <view class="flex ai-center pdb10">
  171 + <view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}">
172 172 <view class="w25">{{index+1}}</view>
173 173 <view class="w25 ellipsis-2">{{item.goods_name}}</view>
174 174 <view class="w25">¥{{g_filter.toFix(item.shop_price,2)}}</view>
... ... @@ -206,11 +206,11 @@
206 206 </view>
207 207 <view class="t-c">
208 208 <block wx:for="{{list2}}">
209   - <view class="flex ai-center pdb10">
  209 + <view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}">
210 210 <view class="w25">{{index+1}}</view>
211 211 <view class="w25 ellipsis-2">{{item.goods_name}}</view>
212 212 <view class="w25">¥{{item.shop_price}}</view>
213   - <view bindtap="share_good2" data-index="{{index}}" class="w25"><text class="btn-share">分享</text></view>
  213 + <view catchtap="share_good2" data-index="{{index}}" class="w25"><text class="btn-share">分享</text></view>
214 214 </view>
215 215 </block>
216 216 </view>
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -136,7 +136,7 @@ Page({
136 136 var title= item.goods_name;
137 137 var img=this.data.url+item.original_img;
138 138  
139   - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + th.data.gid;
  139 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
140 140 if(getApp().globalData.user_id){
141 141 url+="&first_leader="+getApp().globalData.user_id;
142 142 }
... ... @@ -325,7 +325,7 @@ Page({
325 325  
326 326 var app = getApp();
327 327 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
328   - var scene = th.data.gid+"";
  328 + var scene = th.data.share_good.goods_id+"";
329 329 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
330 330 if(user_id>0){
331 331 scene+="_"+user_id;
... ... @@ -792,6 +792,13 @@ Page({
792 792 this.data.is_load=0;
793 793 this.data.currentPage=1;
794 794 this.requestGoodsList();
  795 + },
  796 +
  797 + go_goods:function(e){
  798 + var index=e.currentTarget.dataset.index;
  799 + var item=this.data.list[index];
  800 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
  801 + getApp().goto(url);
795 802 }
796 803  
797 804  
... ...
packageA/pages/goods_share/goods_share.wxml
... ... @@ -10,8 +10,21 @@
10 10 <!-- 标题 -->
11 11 <view class="title">
12 12 <view class="title-item" bindtap="sale_sort">销量</view>
13   - <view class="title-item" bindtap="sort1">价格<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view>
14   - <view class="title-item" bindtap="sort2">佣金<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view>
  13 +
  14 + <block wx:if="{{orderField=='shop_price'}}">
  15 + <view class="title-item" bindtap="sort1">价格<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view>
  16 + </block>
  17 + <block wx:else>
  18 + <view class="title-item" bindtap="sort1">价格<text class="iconfont icon-shang"></text></view>
  19 + </block>
  20 +
  21 + <block wx:if="{{orderField=='commission'}}">
  22 + <view class="title-item" bindtap="sort2">佣金<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view>
  23 + </block>
  24 + <block wx:else>
  25 + <view class="title-item" bindtap="sort2">佣金<text class="iconfont icon-xia"></text></view>
  26 + </block>
  27 +
15 28 <view class="title-item" bindtap='new_sort'>最新</view>
16 29 </view>
17 30 <!-- 列表项 -->
... ... @@ -20,9 +33,9 @@
20 33 scroll-y="true"
21 34 bindscrolltolower="refresh"
22 35 scroll-anchoring
23   - refresher-enabled>
  36 + >
24 37 <block wx:for="{{list}}">
25   - <view class class="list-item">
  38 + <view class class="list-item" bindtap="go_goods" data-index="{{index}}">
26 39 <view class="img-container">
27 40 <image src="{{url+item.original_img}}" style="width: 100%; height: 100%;"
28 41 binderror="bind_bnerr2" lazy-load="true"
... ... @@ -51,7 +64,7 @@
51 64 <text wx:else class="red">¥{{item.fir_rate+item.sec_rate+item.thi_rate}}</text>
52 65 </view>
53 66 </view>
54   - <view bindtap="share_good" data-index="{{index}}" class="t-r fs28 pdt14">
  67 + <view catchtap="share_good" data-index="{{index}}" class="t-r fs28 pdt14">
55 68 <view class="btn-share">分享</view>
56 69 </view>
57 70 </view>
... ...
packageA/pages/liveStreamDetails/liveStreamDetails.js
... ... @@ -401,8 +401,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
401 401 var first_leader=options.first_leader;
402 402 if(first_leader){
403 403 //-- user_id代过来免登陆 --
404   - getApp().globalData.user_id=first_leader;
405   - getApp().getUserFir();
  404 + getApp().globalData.first_leader=first_leader;
406 405 //调用接口判断是不是会员
407 406 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{
408 407 if(res.data.code==0){
... ...
packageA/pages/live_share/live_share.js
... ... @@ -179,6 +179,16 @@ Page({
179 179 this.requestGoodsList();
180 180 },
181 181  
  182 + cancel:function(){
  183 + this.setData({share_hidden:1});
  184 + },
  185 + go_live:function(e){
  186 + var index=e.currentTarget.dataset.index;
  187 + var item=this.data.list[index];
  188 + var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + item.id + '&live=ing';
  189 + getApp().goto(url);
  190 + }
  191 +
182 192  
183 193  
184 194 })
185 195 \ No newline at end of file
... ...
packageA/pages/live_share/live_share.wxml
... ... @@ -14,10 +14,10 @@
14 14 scroll-y="true"
15 15 bindscrolltolower="refresh"
16 16 scroll-anchoring
17   - refresher-enabled>
  17 + >
18 18 <!-- 专享礼包 -->
19 19 <block wx:for="{{list}}">
20   - <view class class="list-item">
  20 + <view class class="list-item" bindtap="go_live" data-index="{{index}}">
21 21 <view class="img-container {{currentIndex2 == 0?'live':currentIndex2 == 1?'coming':'playback'}}">
22 22 <image src="{{item.cover_img}}" style="width: 100%; height: 100%;"
23 23 binderror="bind_bnerr2" lazy-load="true"
... ... @@ -27,7 +27,7 @@
27 27 <view class="ellipsis-2 fs28 name">{{item.name}}</view>
28 28 <view class="pdt20 fs26 red">直播时间:{{filter.format_time(item.start_time, 2)}} </view>
29 29 <view class="fs26 red pdv10">主播:{{item['anchor_name']}}</view>
30   - <view bindtap="share_index" data-index="{{index}}" class="t-r fs28 pdt10"><view class="btn-share">分享</view></view>
  30 + <view catchtap="share_index" data-index="{{index}}" class="t-r fs28 pdt10"><view class="btn-share">分享</view></view>
31 31 </view>
32 32 </view>
33 33 </block>
... ...
packageA/pages/quan/quan.js
... ... @@ -156,6 +156,20 @@ Page({
156 156 com.set_type(1);
157 157 },
158 158  
  159 + cancel:function(){
  160 + this.setData({share_hidden:1});
  161 + },
  162 +
  163 + go_quan:function(e){
  164 + var index=e.currentTarget.dataset.index;
  165 + var item=this.data.list[index];
  166 + var url="/packageA/pages/quan_pro/quan_pro?id="+item.id;
  167 + getApp().goto(url);
  168 + }
  169 +
  170 +
  171 +
  172 +
159 173  
160 174  
161 175  
... ...
packageA/pages/quan/quan.wxml
... ... @@ -17,10 +17,10 @@
17 17 refresher-enabled>
18 18  
19 19 <block wx:for="{{list}}">
20   - <view class="coupons bg-red">
  20 + <view class="coupons bg-red" bindtap="go_quan" data-index="{{index}}">
21 21 <view class="flex">
22 22 <view>
23   - <view class="coupon-hd ellipsis-2 fs36">{{item.name}}</view>
  23 + <view class="coupon-hd ellipsis-2 fs32">{{item.name}}</view>
24 24 <view class="deadline fs28 pdt10" wx:if="{{item.endtype==0}}">限时使用:
25 25 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
26 26 <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至
... ... @@ -30,7 +30,7 @@
30 30 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}至</text> <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text><text wx:else>不限</text>
31 31 </view>
32 32 </view>
33   - <view class="price">¥<text class="fs80">{{filters.toFix(item.money,2)}}</text></view>
  33 + <view class="price">¥<text class="fs40">{{filters.toFix(item.money,2)}}</text></view>
34 34 </view>
35 35 <view class="flex ai-center jc_sb pdt20">
36 36 <view wx:if="{{item.useobjecttype==0}}" class="coupon-ft ellipsis-2 fs28">全场任意产品通用</view>
... ... @@ -40,7 +40,7 @@
40 40 <view wx:if="{{item.useobjecttype==12}}" class="coupon-ft ellipsis-2 fs28">分类一({{item.useobjectname}})</view>
41 41 <view wx:if="{{item.useobjecttype==20}}" class="coupon-ft ellipsis-2 fs28">单品({{item.useobjectname}})</view>
42 42  
43   - <view bindtap="share_index" data-index="{{index}}" class="btn-share" >分享</view>
  43 + <view catchtap="share_index" data-index="{{index}}" class="btn-share" >分享</view>
44 44 </view>
45 45 </view>
46 46 </block>
... ...
packageA/pages/quan_pro/quan_pro.js
... ... @@ -19,6 +19,20 @@ Page({
19 19 },
20 20 //------初始化加载----------
21 21 onLoad: function(t) {
  22 +
  23 + var th = this;
  24 + var first_leader=t.first_leader;
  25 + if(first_leader){
  26 + //-- user_id代过来免登陆 --
  27 + getApp().globalData.first_leader=first_leader;
  28 + //调用接口判断是不是会员
  29 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
  30 + if(res.data.code==0){
  31 + getApp().globalData.guide_id=res.data.data.id;
  32 + }
  33 + })
  34 + }
  35 +
22 36 var id=t.id;
23 37 this.data.id=id;
24 38 var goods_list = this.selectComponent("#goods_list"); //组件的id
... ...
pages/cart/cart2/cart2.js
... ... @@ -112,6 +112,8 @@ Page({
112 112 show_card:null, //显示的等级卡
113 113 card_name:'', //显示的卡的名称
114 114 card_cut_price:null,//减价多少钱
  115 +
  116 + show_submit:0, //提交按钮变正常显示
115 117  
116 118 },
117 119 onLoad: function(t) {
... ... @@ -140,8 +142,9 @@ Page({
140 142 //----------子页返回父页触发----------
141 143 onShow: function() {
142 144 var th=this;
  145 + th.setData({show_submit:0});
  146 +
143 147 if (th.data.isclose==0){
144   -
145 148 wx.navigateTo({
146 149 url: "/pages/index/index/index"
147 150 })
... ... @@ -153,7 +156,7 @@ Page({
153 156 console.log(ie)
154 157  
155 158 //地址切换要把包邮券清空
156   - if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
  159 + if( !th.data.user_addr || !ie || th.data.user_addr.address_id!=ie.address_id){
157 160 var using_quan=th.data.using_quan;
158 161 for(var i in using_quan){
159 162 var item=using_quan[i];
... ... @@ -164,19 +167,22 @@ Page({
164 167 }
165 168 th.data.isget_by_quan={};
166 169 }
167   -
  170 +
  171 +
  172 + th.data.prom_goods_map={};
  173 + th.data.is_summit_ing=0;
168 174 //更换地址回来要重新调用计算价钱的接口
169 175 if(!th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
170 176 th.setData({user_addr: ie });
171 177 if (th.data.is_b_now == 1) {
172 178 if(th.data.bn_goods) {
173 179 th.setData({add_back:1});
174   - th.calculatePrice2();
  180 + //th.calculatePrice2();
175 181 }
176 182 }else{
177 183 if (th.data.cartlist){
178 184 th.setData({add_back:1});
179   - th.calculatePrice();
  185 + //th.calculatePrice();
180 186 }
181 187 }
182 188 }else{
... ... @@ -277,26 +283,31 @@ Page({
277 283  
278 284 //------获取会员收货地址-----
279 285 getuser_addr:function(func){
  286 + var th=this;
280 287 a.get("/api/weshop/useraddress/page", {
281   - data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600 },
  288 + data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600,t:Math.random()},
282 289 success: function (su) {
283 290 /*---
284 291 var user_addr=[
285 292 { 'address_id': 882, 'user_id': 2661, 'consignee': '测试测试测', 'province': 3102, 'city': 3431, 'district': 3466,
286 293 'address': 'ed', 'more_address': '山西-长治市-襄垣县-虎(音si)亭镇', 'mobile': 13012345678,'is_default':1},
287   - ];---*/
288   - var user_addr = su.data.data.pageData;
289   - var item = null;
290   - var def_item=null;
291   - for (var i = 0; i < user_addr.length; i++) {
292   - if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i];}
293   - if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; }
294   - }
295   -
296   - if (item == null) item = def_item;
297   - if (item == null) item = user_addr[0];
  294 + ];---*/
  295 + var item = null;
  296 + if(su.data.code==0 && su.data.data && su.data.data.pageData){
  297 + var user_addr = su.data.data.pageData;
  298 + var def_item=null;
  299 + for (var i = 0; i < user_addr.length; i++) {
  300 + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i];}
  301 + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; }
  302 + }
  303 +
  304 + if (item == null) item = def_item;
  305 + if (item == null) item = user_addr[0];
  306 + }
298 307  
299 308 if(item==undefined) item=null;
  309 + if(!item) th.setData({user_addr:null}); //地址为空的时候,要清空,因为返回的时候,有缓存
  310 +
300 311 func(item);
301 312 }
302 313 });
... ... @@ -341,7 +352,8 @@ Page({
341 352 }
342 353 });
343 354 },
344   -
  355 +
  356 +
345 357 //-----真的获取购物车,入口--------
346 358 get_cart: function () {
347 359 var th = this,app=getApp();
... ... @@ -360,11 +372,7 @@ Page({
360 372  
361 373 for (var i = 0; i < carr.length; i++) {
362 374 var item = carr[i];
363   - //要把优惠活动加入,prom_goods_map中,赠品不要运算
364   - if(item.prom_type==3 && item.is_gift!=1){
365   - await th.add_prom_goods_map(item);
366   - }
367   -
  375 +
368 376 //-- 如果是等级会员注册返回 --
369 377 if(is_card_back){
370 378 th.data.card_name=th.data.userinfo.card_field;
... ... @@ -383,12 +391,17 @@ Page({
383 391 // 拼团,搭配购不计算,赠品也不计算,同时会员还未购买等级会员
384 392 if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field
385 393 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
386   - item.cut_price= item.goods_price-item[th.data.card_name];
387   - carr[i].cut_price=(item.goods_price-item[th.data.card_name])*item.goods_num;
  394 + item.cut_price1= item.goods_price-item[th.data.card_name];
  395 + carr[i].cut_price1=(item.goods_price-item[th.data.card_name])*item.goods_num;
388 396 }
389 397  
390 398 }
391 399  
  400 + //要把优惠活动加入,prom_goods_map中,赠品不要运算
  401 + if(item.prom_type==3 && item.is_gift!=1){
  402 + await th.add_prom_goods_map(item);
  403 + }
  404 +
392 405  
393 406 item.original_img = oo.imghost + item.original_img;
394 407 /*----接口要弄出来的,先顶着-----*/
... ... @@ -399,7 +412,22 @@ Page({
399 412 if (arr.length > 0) {
400 413 for (var j = 0; j < arr.length; j++) {
401 414 if (arr[j].pickup_id == pcid) {
402   - arr[j].goods.push(item);
  415 + arr[j].goods.push(item);
  416 + if(item.is_gift!=1){
  417 + //确定配送方式
  418 + if(arr[j].distr_t==0){
  419 + arr[j].distr_t=item.distr_type;
  420 + }
  421 + var e_t=0
  422 + switch (arr[j].distr_t) {
  423 + case 0: e_t = 1; break;
  424 + case 1: e_t = 1; break;
  425 + case 2: e_t = 0; break;
  426 + }
  427 + arr[j].exp_type=e_t;
  428 + if (e_t == 0) th.setData({ is_all_zt:0});
  429 + }
  430 +
403 431 //-- 把等级卡会优惠多少钱装进去 --
404 432 if(item.cut_price) arr[j].card_cut_price+=item.cut_price;
405 433 find = 1;break;
... ... @@ -426,7 +454,6 @@ Page({
426 454 case 1: e_t = 1; break;
427 455 case 2: e_t = 0; break;
428 456 }
429   -
430 457 //如果是物流的话,全部自提的控制要弄成0
431 458 if (e_t == 0) th.setData({ is_all_zt:0});
432 459  
... ... @@ -441,14 +468,21 @@ Page({
441 468 }
442 469  
443 470 var ie = {
444   - pickup_id: pcid, pname: pikname, goods: narr, wind: m_wind, distr_t: dis_t,card_cut_price:0,
  471 + pickup_id: pcid, pname: pikname, goods: narr, wind: m_wind, distr_t: dis_t,card_cut_price:0,exp_type:e_t,
445 472 goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0};
446   -
447   - if(!th.data.add_back){
448   - ie.exp_type= e_t
449   - }
  473 +
  474 + //-- 如果是回退回来的情况 --
  475 + if(th.data.cartlist && th.data.cartlist.length>0) {
  476 + for(var kj in th.data.cartlist){
  477 + if(ie.pickup_id==th.data.cartlist[kj].pickup_id){
  478 + ie.exp_type=th.data.cartlist[kj].exp_type;
  479 + break;
  480 + }
  481 + }
  482 + }
  483 +
450 484 //-- 把等级卡会优惠多少钱装进去 --
451   - if(item.cut_price) ie.card_cut_price+=item.cut_price;
  485 + if(item.cut_price1) ie.card_cut_price+=item.cut_price1;
452 486 arr.push(ie);
453 487  
454 488 }
... ... @@ -496,7 +530,9 @@ Page({
496 530 case 1: et = 1; break;
497 531 case 2: et = 0; break;
498 532 }
499   -
  533 +
  534 + if(th.data.bn_goods) et=th.data.bn_exp_type
  535 +
500 536 var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
501 537 if(et==0 && def_exp_code){
502 538 for(var k=0;k<th.data.wu_arr.length;k++){
... ... @@ -579,12 +615,9 @@ Page({
579 615  
580 616 th.setData({
581 617 bn_goods: data, bn_pickname: gg.pick_name,index:m_wind,
582   - bn_pick: gg.pick_id, bn_t_exp_t: distr_t
  618 + bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type: et
583 619 });
584   -
585   - if(!th.data.add_back){
586   - th.setData({ bn_exp_type: et })
587   - }
  620 +
588 621 //计算价格
589 622 th.calculatePrice2();
590 623 //获取优惠券
... ... @@ -615,13 +648,10 @@ Page({
615 648 }
616 649 th.setData({
617 650 bn_goods: t.data.data, bn_pickname: gg.pick_name,index:m_wind,
618   - bn_pick: gg.pick_id, bn_t_exp_t: distr_t
  651 + bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type: et
619 652 });
620 653  
621   - if(!th.data.add_back){
622   - th.setData({ bn_exp_type: et })
623   - }
624   -
  654 +
625 655 //--搭配促销也是按照购物车的方式来计算优惠券--
626 656 if(gg.prom_type==5){
627 657 var frozenQuan=null;
... ... @@ -658,13 +688,9 @@ Page({
658 688  
659 689 th.setData({
660 690 bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et,index:m_wind,
661   - bn_pick: gg.pick_id, bn_t_exp_t: distr_t
  691 + bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type: et
662 692 });
663   -
664   - if(!th.data.add_back){
665   - th.setData({ bn_exp_type: et })
666   - }
667   -
  693 +
668 694 //计算价格
669 695 th.calculatePrice2();
670 696 //获取优惠券
... ... @@ -822,7 +848,8 @@ Page({
822 848  
823 849 //有活动,且优惠活动并没有限制使用优惠券,且有减价
824 850 //--看有没有减价--
825   - if(item_map.prom_price>=0 && item_map.price-item_map.prom_price){
  851 + //if(item_map.prom_price>=0 && item_map.price-item_map.prom_price){
  852 + if(item_map.price-item_map.prom_price && item_map.prom_price!==null){
826 853 if(cart_item.prom_pt_json){
827 854 cart_item.prom_pt_json.push({"prom_id":item_map.prom_id,"dis":(item_map.price-item_map.prom_price).toFixed(2),"ispt":0})
828 855 }else{
... ... @@ -892,6 +919,7 @@ Page({
892 919 cart_item.g_coupon_num.push({'c_id':item_map.s_coupon_id,"num": item_map.s_coupon_num})
893 920 }
894 921 }
  922 +
895 923 //-- 如果有送优包邮券的情况 --
896 924 if(item_map.s_libao){
897 925 if(!cart_item.s_libao) {
... ... @@ -1004,15 +1032,18 @@ Page({
1004 1032 if(no_ex_good){
1005 1033 is_good_no_by=th.check_by_goods(no_ex_good,item[j].goods_id);
1006 1034 }
  1035 +
1007 1036 //如果达到全场包邮的条件,同时,没有地区不包邮,或者商品不包邮
1008 1037 if(o_price>=freight_free && freight_free>0 && !is_good_no_by && th.data.is_no_by[pickid]!=1){
1009 1038 continue;
1010 1039 }
  1040 +
1011 1041 //--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算--
1012 1042 if(th.data.using_quan[pickid] && th.data.using_quan[pickid].isby==1 && !is_good_no_by){
1013 1043 continue;
1014 1044 }
1015 1045  
  1046 +
1016 1047 //----------------如果是选择了物流---------------------
1017 1048 if(cart_item.exp_type == 0 && item[j].is_free_shipping==0){
1018 1049 //如果地址不为空
... ... @@ -1197,7 +1228,7 @@ Page({
1197 1228 th.setData({ [atxt]: all_total_m, [atxt1]: all_order_m,
1198 1229 [atxt2]: all_price, [atxt3]: all_user_m, [atxt4]: all_shipping_m,
1199 1230 [atxt5]: all_coupon_price_m,[atxt6]: all_cutprice,
1200   - [atxt7]: all_order_prom,
  1231 + [atxt7]: all_order_prom, show_submit:1
1201 1232 })
1202 1233 th.data.order_prom_list_cart=c_arr;
1203 1234 th.set_can_num();
... ... @@ -1247,7 +1278,7 @@ Page({
1247 1278 //-----------计算商品总价--------------
1248 1279 var allpice = good.shop_price * good.buynum;
1249 1280 var cut_price=0;
1250   - if(good.prom_type==3 && good.prom_price){
  1281 + if(good.prom_type==3 && good.prom_price!==null){
1251 1282 cut_price=allpice-good.prom_price;
1252 1283 }
1253 1284 allpice=parseFloat(allpice).toFixed(2);
... ... @@ -1429,14 +1460,14 @@ Page({
1429 1460 if (th.data.bn_use_money == 1) {
1430 1461 if (amoney> order_m) {
1431 1462 order_m = order_m.toFixed(2);
1432   - th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price })
  1463 + th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1433 1464 }else{
1434 1465 order_m =parseFloat(order_m - amoney);
1435 1466 order_m = order_m.toFixed(2);
1436   - th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price })
  1467 + th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1437 1468 }
1438 1469 }else{
1439   - th.setData({ [txt]: 0, [txt2]: order_m,[txt3]:coupon_price })
  1470 + th.setData({ [txt]: 0, [txt2]: order_m,[txt3]:coupon_price,show_submit:1})
1440 1471 }
1441 1472 //优惠活动送积分
1442 1473 if(good.s_intValue){
... ... @@ -1476,14 +1507,14 @@ Page({
1476 1507 if (th.data.bn_use_money == 1) {
1477 1508 if (amoney> order_m) {
1478 1509 order_m = order_m.toFixed(2);
1479   - th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price })
  1510 + th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1480 1511 }else{
1481 1512 order_m =parseFloat(order_m - amoney);
1482 1513 order_m = order_m.toFixed(2);
1483   - th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price })
  1514 + th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1484 1515 }
1485 1516 }else{
1486   - th.setData({ [txt]: 0, [txt2]: order_m,[txt3]:coupon_price })
  1517 + th.setData({ [txt]: 0, [txt2]: order_m,[txt3]:coupon_price, show_submit:1 })
1487 1518 }
1488 1519 //优惠活动送积分
1489 1520 if(good.s_intValue){
... ... @@ -1527,7 +1558,7 @@ Page({
1527 1558  
1528 1559 if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){
1529 1560 ff = false; getApp().my_warnning("请选择收货地址",0,th);
1530   - this.data.is_summit_ing = 0;
  1561 + th.data.is_summit_ing = 0;
1531 1562 }
1532 1563 if (!ff) return false;
1533 1564 var addr = th.data.user_addr;
... ... @@ -1536,6 +1567,7 @@ Page({
1536 1567 if(th.data.bn_exp_type==0)
1537 1568 if(th.data.wu_arr==null || th.data.wu_arr.length<=0){
1538 1569 getApp().my_warnning("读取物流失败",0,th);
  1570 + th.data.is_summit_ing = 0;
1539 1571 return false;
1540 1572 }
1541 1573  
... ... @@ -1716,7 +1748,9 @@ Page({
1716 1748 console.log(pdata);
1717 1749 }else{
1718 1750 //---------购物车的结算---------
1719   - if (th.data.is_all_zt == 0 && th.data.user_addr == null) { ff = false; getApp().confirmBox("请新建收货地址");}
  1751 + if (th.data.is_all_zt == 0 && th.data.user_addr == null) {
  1752 + th.data.is_summit_ing = 0;
  1753 + ff = false; getApp().confirmBox("请新建收货地址");}
1720 1754 if (!ff) return false;
1721 1755  
1722 1756 var addr = th.data.user_addr;
... ... @@ -1726,6 +1760,7 @@ Page({
1726 1760  
1727 1761 if(th.data.is_all_zt !=1)
1728 1762 if(th.data.wu_arr==null || th.data.wu_arr.length<=0 ){
  1763 + th.data.is_summit_ing = 0;
1729 1764 getApp().confirmBox("读取物流失败");
1730 1765 return false;
1731 1766 }
... ... @@ -1939,7 +1974,7 @@ Page({
1939 1974 util_pay.pay(data.data, function() {
1940 1975 //app.my_warnning("支付成功",1,th);
1941 1976 //setTimeout(function () {
1942   - wx.navigateTo({
  1977 + wx.redirectTo({
1943 1978 url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data
1944 1979 })
1945 1980 //},1000)
... ... @@ -1965,7 +2000,7 @@ Page({
1965 2000 //app.my_warnning("支付成功",1,th);
1966 2001 //setTimeout(function () {
1967 2002 th.setData({ isclose: 0 });
1968   - wx.navigateTo({
  2003 + wx.redirectTo({
1969 2004 url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data,
1970 2005 })
1971 2006 //}, 1000)
... ... @@ -2084,6 +2119,7 @@ Page({
2084 2119  
2085 2120 //--------购物车购买时,选择自提和物流-----------
2086 2121 setexptype_w:function(t){
  2122 +
2087 2123 var def_exp_code= getApp().globalData.userInfo.def_exp_code,th=this;
2088 2124 var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt,
2089 2125 wl_txt = t.currentTarget.dataset.wl_txt,
... ...
pages/cart/cart2/cart2.wxml
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <form bindsubmit="submitForm">
6 6 <view class="container">
7   - <!--要进行判断地址是否显示---->
  7 + <!--要进行判断地址是否显示---->
8 8 <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>
9 9 <!---默认地址显示------>
10 10 <block wx:if="{{user_addr!=null}}">
... ... @@ -371,12 +371,12 @@
371 371 </view>
372 372 </view>
373 373  
374   - <view class="btn-wrap shadow-1">
  374 + <view class="btn-wrap shadow-1" wx:if="{{show_submit}}">
375 375 <view class="pay-amount">
376 376 <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view>
377 377 <!-- <view class="co-red big"></view> -->
378 378 </view>
379   - <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
  379 + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
380 380 </view>
381 381 </form>
382 382  
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -42,10 +42,9 @@ Page({
42 42 var first_leader=options.first_leader;
43 43 if(first_leader){
44 44 //-- user_id代过来免登陆 --
45   - getApp().globalData.user_id=first_leader;
46   - getApp().getUserFir();
  45 + getApp().globalData.first_leader=first_leader;
47 46 //调用接口判断是不是会员
48   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{
  47 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
49 48 if(res.data.code==0){
50 49 getApp().globalData.guide_id=res.data.data.id;
51 50 }
... ...
pages/index/index/index.js
... ... @@ -82,10 +82,9 @@ Page({
82 82 var first_leader=tt.first_leader;
83 83 if(first_leader){
84 84 //-- user_id代过来免登陆 --
85   - getApp().globalData.user_id=first_leader;
86   - getApp().getUserFir();
  85 + getApp().globalData.first_leader=first_leader;
87 86 //调用接口判断是不是会员
88   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{
  87 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
89 88 if(res.data.code==0){
90 89 getApp().globalData.guide_id=res.data.data.id;
91 90 }
... ...
pages/user/assistance/assistance.wxml
... ... @@ -7,7 +7,9 @@
7 7 <view class="zindex" style="color:#{{font_color ? font_color:'black'}};background-color:#{{bg_color ? bg_color:'d01119'}};">
8 8 <view class="top">
9 9 <!-- 上传主图的情况 -->
10   - <view class="bg-img" wx:if="{{imageUrl}}"></view>
  10 + <view wx:if="{{imageUrl}}" style="height: 100%;">
  11 + <image src="https://mshopimg.yolipai.net{{imageUrl}}" lazy-load="true" class="bg-img"></image>
  12 + </view>
11 13 <!-- 没有上传主图的情况 -->
12 14 <block wx:else>
13 15 <view class="flex-center">
... ... @@ -97,6 +99,7 @@
97 99  
98 100 </view>
99 101 </view>
  102 +
100 103  
101 104 </view>
102 105 <!-- 活动说明 -->
... ... @@ -113,6 +116,7 @@
113 116 </view>
114 117 </view>
115 118  
  119 +
116 120 </view>
117 121  
118 122 </view>
... ...
pages/user/assistance/assistance.wxss
... ... @@ -6,13 +6,14 @@ page {
6 6 }
7 7  
8 8 .page {
9   - height: 100vh;
  9 + /* height: 100vh; */
10 10 }
11 11  
12 12  
13 13 .bg-img {
14   - background: url("https://mshopimg.yolipai.net/public/upload/newpeoplegift/temp/2020/09-26/75640123e5ae953e416527134a6fc477.jpg") no-repeat center center;
15   - background-size: 100% 100%;
  14 + display: block;
  15 + width: 100%;
  16 + height: 100%;
16 17 }
17 18  
18 19 .lumi {
... ...
pages/user/assistance/task_assistance.wxml
1 1 <wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2   -<view class="top-back" style="background-color:#{{bg_color ? bg_color:'d01119'}};padding-bottom:80rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close">
3   -<!-- <view class="top-back" style="padding-bottom:{{is_user_task!=null&&is_user_task.status==0?50:0}}rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> -->
4   - <!-- 助力活动头部 -->
5   - <view class="top-frame">
6   - <view class="flex-center">
7   - <view class="top-title white fs36 t-c ellipsis-1" style="color:{{font_color ? ('#'+font_color):'white'}};">
8   - {{aitem[sw_index].helpTaskName}}
9   - </view>
10   - </view>
11   - <view class="activity-data t-c fs28" style="color:{{font_color ? ('#'+font_color):'white'}};">
12   - 活动剩余时间:
13   - <block wx:if="{{aitem[0].djs.day}}"><text class='tui-conutdown-box'> {{aitem[0].djs.day}}天 </text></block>
14   - <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>:
15   - <text class='tui-conutdown-box'>{{aitem[0].djs.min}}</text>:
16   - <text class='tui-conutdown-box tui-countdown-bg'>{{aitem[0].djs.sec}}</text>
17   - </view>
18   - </view>
19   - <!-- 图片的轮播图 -->
20   - <view class="xc-specific-more-frame flex-center" style="height:{{max_sw_height}}px;">
21   - <view bindtap="click_pre">
22   - <view class="bg_left xc-left bcolor"></view>
23   - </view>
24   - <!-- <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}"> -->
25   - <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}" style='width:80%;height:100%;'>
26   - <swiper-item class="rel" wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx">
27   -
28   - <image class="xc-center-img" bindtap="libao_details" data-taskid="{{aitem.id}}" src="{{aitem.giftBagUrl!=null&&aitem.giftBagUrl!=''?iurl+aitem.giftBagUrl:swpie_img}}" mode="widthFix" bindload='imageLoad' style="width: 100%;display: block;"></image>
29   - <view bindtap="libao_details" data-taskid="{{aitem.id}}" class="abs select_details fs26 white">礼包详情</view>
30   -
31   - </swiper-item>
32   -
33   - </swiper>
34   -
35   - <view bindtap="click_next">
36   - <view class="bg_right xc-right bcolor mt"></view>
37   - </view>
38   - </view>
39   - <view class="plan-frame flex ai-center" wx:if="{{is_user_task}}">
40   - <view class="plan_num rel">
41   - <view class="is_plam abs" style="width:{{(is_user_task.zlHelpNum/is_user_task.helpNum)*100}}%"></view>
42   - </view>
43   -
44   -
45   - <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text>
46   -
47   - </view>
48   - <view class="task-number fs28 t-c" style="color:{{font_color ? ('#'+font_color):'white'}};">
49   - <text wx:if="{{giftQty}}">今天剩余可领{{task_number}}个任务</text>
50   - <text wx:else>不限任务数量</text>
51   - </view>
52   -
53   - <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center" data-taskid="{{taskid}}" bindtap="add_onlicke"
54   - style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
55   - 就选它了
56   - </view>
57   - <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share"
58   - style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
59   - 好友拆一拆
60   - </view>
61   - <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now"
62   - style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
63   - 立即兑换
64   - </view>
65   -
66   - <!--
67   - <view class="task_clike fs40 t-c flex-center" bindtap="test">
68   - 测试专用帮被人拆
69   - </view>-->
70   -
  2 +<view class="container" style="background-color:#{{bg_color ? bg_color:'d01119'}}">
  3 + <view class="top-back" style="background-color:#{{bg_color ? bg_color:'d01119'}};padding-bottom:80rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close">
  4 + <!-- <view class="top-back" style="padding-bottom:{{is_user_task!=null&&is_user_task.status==0?50:0}}rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> -->
  5 + <!-- 助力活动头部 -->
  6 + <view class="top-frame">
  7 + <view class="flex-center">
  8 + <view class="top-title white fs36 t-c ellipsis-1" style="color:{{font_color ? ('#'+font_color):'white'}};">
  9 + {{aitem[sw_index].helpTaskName}}
  10 + </view>
  11 + </view>
  12 + <view class="activity-data t-c fs28" style="color:{{font_color ? ('#'+font_color):'white'}};">
  13 + 活动剩余时间:
  14 + <block wx:if="{{aitem[0].djs.day}}"><text class='tui-conutdown-box'> {{aitem[0].djs.day}}天 </text></block>
  15 + <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>:
  16 + <text class='tui-conutdown-box'>{{aitem[0].djs.min}}</text>:
  17 + <text class='tui-conutdown-box tui-countdown-bg'>{{aitem[0].djs.sec}}</text>
  18 + </view>
  19 + </view>
  20 + <!-- 图片的轮播图 -->
  21 + <view class="xc-specific-more-frame flex-center" style="height:{{max_sw_height}}px;">
  22 + <view bindtap="click_pre">
  23 + <view class="bg_left xc-left bcolor"></view>
  24 + </view>
  25 + <!-- <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}"> -->
  26 + <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}" style='width:80%;height:100%;'>
  27 + <swiper-item class="rel" wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx">
  28 +
  29 + <image class="xc-center-img" bindtap="libao_details" data-taskid="{{aitem.id}}" src="{{aitem.giftBagUrl!=null&&aitem.giftBagUrl!=''?iurl+aitem.giftBagUrl:swpie_img}}" mode="widthFix" bindload='imageLoad' style="width: 100%;display: block;"></image>
  30 + <view bindtap="libao_details" data-taskid="{{aitem.id}}" class="abs select_details fs26 white">礼包详情</view>
  31 +
  32 + </swiper-item>
  33 +
  34 + </swiper>
  35 +
  36 + <view bindtap="click_next">
  37 + <view class="bg_right xc-right bcolor mt"></view>
  38 + </view>
  39 + </view>
  40 + <view class="plan-frame flex ai-center" wx:if="{{is_user_task}}">
  41 + <view class="plan_num rel">
  42 + <view class="is_plam abs" style="width:{{(is_user_task.zlHelpNum/is_user_task.helpNum)*100}}%"></view>
  43 + </view>
  44 +
  45 +
  46 + <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text>
  47 +
  48 + </view>
  49 + <view class="task-number fs28 t-c" style="color:{{font_color ? ('#'+font_color):'white'}};">
  50 + <text wx:if="{{giftQty}}">今天剩余可领{{task_number}}个任务</text>
  51 + <text wx:else>不限任务数量</text>
  52 + </view>
  53 +
  54 + <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center" data-taskid="{{taskid}}" bindtap="add_onlicke"
  55 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
  56 + 就选它了
  57 + </view>
  58 + <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share"
  59 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
  60 + 好友拆一拆
  61 + </view>
  62 + <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now"
  63 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
  64 + 立即兑换
  65 + </view>
  66 +
  67 + <!--
  68 + <view class="task_clike fs40 t-c flex-center" bindtap="test">
  69 + 测试专用帮被人拆
  70 + </view>-->
  71 +
  72 + </view>
  73 + <!-- 底部列表 -->
  74 + <view style="background-color:#{{bg_color ? bg_color:'d01119'}}">
  75 + <!-- <view style="margin-top:{{is_user_task!=null?52:0}}rpx"> -->
  76 + <!-- 标题 -->
  77 +
  78 + <view class="flex-vertical-between fs28 padding head" style="color:#{{font_color ? font_color:'white'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
  79 + <view class="flex-center lhead" bindtap="user_task_list_click" data-index="0"
  80 + style="background-color:{{switch_head==0?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
  81 + <image class="unfinished" src="{{iurl}}miniapp/images/friendhelp/task.png" lazy-load="true"></image>
  82 + <view>我的任务</view>
  83 + </view>
  84 + <view class="flex-center lhead" bindtap="dismantle_record_click" data-index='1'
  85 + style="background-color:{{switch_head==1?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
  86 + <image class="unfinished" style="margin-top: 5rpx;" src="{{iurl}}miniapp/images/friendhelp/edit.png" lazy-load="true"></image>
  87 + <view>帮拆记录</view>
  88 + </view>
  89 + </view>
  90 +
  91 + <view style="color:{{font_color ? ('#'+font_color):'white'}}">
  92 +
  93 + <view class="items" wx:if="{{is_task==0}}">
  94 + <view class="tesk_list">
  95 + <view class="item fs26 flex-vertical-between padding" wx:for="{{user_task_list}}" wx:key="*this">
  96 + <view class="flex-center width">
  97 + <view class="ellipsis-1">{{item.helpTaskName}}
  98 + </view>
  99 + </view>
  100 + <view class="flex-center width state">
  101 + <view class="ellipsis-1">
  102 + <text wx:if="{{item.status==0}}" bindtap="go_task" data-taskid="{{item.helpTaskId}}">{{item.zlHelpNum}}/{{item.helpNum}}</text>
  103 + <text wx:if="{{item.status==2}}" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</text>
  104 + <text wx:if="{{item.status==1}}" bindtap="get_libao" data-libaoid="{{item.helpListGiftBagId}}"data-taskingid="{{item.id}}" data-taskid="{{item.helpTaskId}}">领取礼包 </text>
  105 + </view>
  106 + </view>
  107 + </view>
  108 + </view>
  109 +
  110 + <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}">
  111 + <view class="flex-center nothing">
  112 + <view>暂无任务记录</view>
  113 + </view>
  114 + </view>
  115 + </view>
  116 +
  117 +
  118 + </view>
  119 +
  120 +
  121 + <view class="items" wx:if="{{is_task==1}}" style="color:{{font_color ? ('#'+font_color):'white'}};">
  122 + <block wx:if="{{ dismantle!=null|| dismantle!=''}}">
  123 +
  124 + <view class="tesk_list">
  125 + <view class="item fs26 flex flex-vertical-between padding" wx:for="{{dismantle}}" wx:for-index="idx">
  126 + <view class="flex white is_dismantle_frame" style="justify-content: space-around; width: 90%;margin:auto">
  127 + <image class="circle user_img" src="{{item.headPic==null?defaultAvatar:item.headPic}}"></image>
  128 + <view class="ellipsis-1 width">{{item.nickName}}
  129 + </view>
  130 + <view class="ellipsis-1">{{filter.format_time(item.zltime)}}
  131 + </view>
  132 + </view>
  133 + </view>
  134 + </view>
  135 + <view class="flex-center fs32" wx:if="{{is_bc_show==1&&dismantle!=null&&is_dis_list==1}}">
  136 + <view class="line"></view>
  137 + <view class="load white" bindtap="dismantle_record_list">点击加载更多</view>
  138 + <view class="line"></view>
  139 + </view>
  140 + </block>
  141 +
  142 + <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}">
  143 + <view class="flex-center nothing">
  144 + <view>暂无任务记录</view>
  145 + </view>
  146 + </view>
  147 +
  148 + </view>
  149 +
  150 +
  151 + </view>
  152 + <!-- 加载更多 -->
  153 + <view class="fs32" style="background-color:#{{bg_color ? bg_color:'d01119'}};color:{{font_color ? ('#'+font_color):'white'}};">
  154 + <view class="flex-center" wx:if="{{is_show==1&&is_user_list==0}}">
  155 + <view class="line"></view>
  156 + <view class="load" bindtap="task_list">点击加载更多</view>
  157 + <view class="line"></view>
  158 + </view>
  159 + <view class="flex-center bottom" wx:if="{{usercount>0}}">
  160 + <view>该任务已被领取了{{usercount}}次</view>
  161 + </view>
  162 + <view class="flex-center bottom" wx:else>
  163 + <view>暂无领取记录</view>
  164 + </view>
  165 + </view>
  166 +
  167 +
  168 + <!--********** 钱巧玲 -->
  169 + <view wx:if="{{is_share}}">
  170 + <view class="dust"></view>
  171 + <view class="canvas" style="width:100%;">
  172 + <view class="flex-center">
  173 + <canvas canvas-id="share_id" style="width:600rpx;height:1000rpx;" bindtap="preview"></canvas>
  174 + </view>
  175 + <view class="closes flex-center">
  176 + <image class="close" src="{{iurl}}/miniapp/images/plus/Close.png" bindtap="close_share"></image>
  177 + </view>
  178 + </view>
  179 + </view>
  180 + <!-- 引入提示组件 -->
  181 + <warn id="warn"></warn>
  182 + <!-- 制作一个圆球导航 -->
  183 + <nav_b id="nav_b"></nav_b>
71 184 </view>
72   -<!-- 底部列表 -->
73   -<view style="background-color:#{{bg_color ? bg_color:'d01119'}}">
74   -<!-- <view style="margin-top:{{is_user_task!=null?52:0}}rpx"> -->
75   - <!-- 标题 -->
76   -
77   - <view class="flex-vertical-between fs28 padding head" style="color:#{{font_color ? font_color:'white'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
78   - <view class="flex-center lhead" bindtap="user_task_list_click" data-index="0"
79   - style="background-color:{{switch_head==0?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
80   - <image class="unfinished" src="{{iurl}}miniapp/images/friendhelp/task.png" lazy-load="true"></image>
81   - <view>我的任务</view>
82   - </view>
83   - <view class="flex-center lhead" bindtap="dismantle_record_click" data-index='1'
84   - style="background-color:{{switch_head==1?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
85   - <image class="unfinished" style="margin-top: 5rpx;" src="{{iurl}}miniapp/images/friendhelp/edit.png" lazy-load="true"></image>
86   - <view>帮拆记录</view>
87   - </view>
88   - </view>
89   -
90   - <view style="color:{{font_color ? ('#'+font_color):'white'}}">
91   -
92   - <view class="items" wx:if="{{is_task==0}}">
93   - <view class="tesk_list">
94   - <view class="item fs26 flex-vertical-between padding" wx:for="{{user_task_list}}" wx:key="*this">
95   - <view class="flex-center width">
96   - <view class="ellipsis-1">{{item.helpTaskName}}
97   - </view>
98   - </view>
99   - <view class="flex-center width state">
100   - <view class="ellipsis-1">
101   - <text wx:if="{{item.status==0}}" bindtap="go_task" data-taskid="{{item.helpTaskId}}">{{item.zlHelpNum}}/{{item.helpNum}}</text>
102   - <text wx:if="{{item.status==2}}" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</text>
103   - <text wx:if="{{item.status==1}}" bindtap="get_libao" data-libaoid="{{item.helpListGiftBagId}}"data-taskingid="{{item.id}}" data-taskid="{{item.helpTaskId}}">领取礼包 </text>
104   - </view>
105   - </view>
106   - </view>
107   - </view>
108   -
109   - <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}">
110   - <view class="flex-center nothing">
111   - <view>暂无任务记录</view>
112   - </view>
113   - </view>
114   - </view>
115 185  
116   -
117   - </view>
118   -
119   -
120   - <view class="items" wx:if="{{is_task==1}}" style="color:{{font_color ? ('#'+font_color):'white'}};">
121   - <block wx:if="{{ dismantle!=null|| dismantle!=''}}">
122   -
123   - <view class="tesk_list">
124   - <view class="item fs26 flex flex-vertical-between padding" wx:for="{{dismantle}}" wx:for-index="idx">
125   - <view class="flex white is_dismantle_frame" style="justify-content: space-around; width: 90%;margin:auto">
126   - <image class="circle user_img" src="{{item.headPic==null?defaultAvatar:item.headPic}}"></image>
127   - <view class="ellipsis-1 width">{{item.nickName}}
128   - </view>
129   - <view class="ellipsis-1">{{filter.format_time(item.zltime)}}
130   - </view>
131   - </view>
132   - </view>
133   - </view>
134   - <view class="flex-center fs32" wx:if="{{is_bc_show==1&&dismantle!=null&&is_dis_list==1}}">
135   - <view class="line"></view>
136   - <view class="load white" bindtap="dismantle_record_list">点击加载更多</view>
137   - <view class="line"></view>
138   - </view>
139   - </block>
140   -
141   - <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}">
142   - <view class="flex-center nothing">
143   - <view>暂无任务记录</view>
144   - </view>
145   - </view>
146   -
147   - </view>
148   -
149   -
150   -</view>
151   -<!-- 加载更多 -->
152   -<view class="fs32" style="background-color:#{{bg_color ? bg_color:'d01119'}};color:{{font_color ? ('#'+font_color):'white'}};">
153   - <view class="flex-center" wx:if="{{is_show==1&&is_user_list==0}}">
154   - <view class="line"></view>
155   - <view class="load" bindtap="task_list">点击加载更多</view>
156   - <view class="line"></view>
157   - </view>
158   - <view class="flex-center bottom" wx:if="{{usercount>0}}">
159   - <view>该任务已被领取了{{usercount}}次</view>
160   - </view>
161   - <view class="flex-center bottom" wx:else>
162   - <view>暂无领取记录</view>
163   - </view>
164   -</view>
165   -
166   -
167   -<!--********** 钱巧玲 -->
168   -<view wx:if="{{is_share}}">
169   - <view class="dust"></view>
170   - <view class="canvas" style="width:100%;">
171   - <view class="flex-center">
172   - <canvas canvas-id="share_id" style="width:600rpx;height:1000rpx;" bindtap="preview"></canvas>
173   - </view>
174   - <view class="closes flex-center">
175   - <image class="close" src="{{iurl}}/miniapp/images/plus/Close.png" bindtap="close_share"></image>
176   - </view>
177   - </view>
178   -</view>
179   -<!-- 引入提示组件 -->
180   -<warn id="warn"></warn>
181   -<!-- 制作一个圆球导航 -->
182   -<nav_b id="nav_b"></nav_b>
... ...
pages/user/assistance/task_assistance.wxss
1 1 page {
2 2 /* background: #d01119; */
3 3 width: 100%;
4   - height: 100%;
  4 + height: 100%;
  5 +}
5 6  
  7 +.container {
  8 + height: 100vh;
6 9 }
7 10  
8 11 .tesk_list{
... ...
pages/user/index/filter.wxs
... ... @@ -4,22 +4,31 @@ var is_close = function (name,c_list) {
4 4 map['我的分销']="1";
5 5 map['我的拼单']="2";
6 6 map['秒杀活动']="3";
7   - map['PLUS会员']="4";
8   - map['专享礼包']="5";
9   - map['我的权益']="6";
10   - map['联系客服']="7";
11   - map['收藏夹']="8";
12   - map['我的地址']="9";
13   - map['收入卡包']="10";
14   - map['我的服务']="11";
15   - map['我的评价']="12";
16   - map['我的礼包']="13";
  7 + map['PLUS会员']="4";
  8 + map['我的权益']="5";
  9 + map['联系客服']="6";
  10 + map['收藏夹']="7";
  11 + map['我的地址']="8";
  12 + map['收入卡包']="9";
  13 + map['专享礼包']="10";
  14 + map['我的服务']="12";
  15 + map['我的评价']="13";
  16 + map['我的礼包']="14";
  17 + map['助力活动']="15";
17 18 var index=map[name];
18   - //不包含,不关闭
19   - if(c_list.indexOf(index)==-1) return 0;
20   - //包含,就是关闭的
21   - return 1
22   -
  19 +
  20 + //我的权益要判断5,和11
  21 + if(name=="我的权益"){
  22 + if(c_list.indexOf("11")!=-1) return 1;
  23 + else if(c_list.indexOf("5")!=-1) return 1;
  24 + return 0;
  25 + }else{
  26 + //不包含,不关闭
  27 + if(c_list.indexOf(index)==-1) return 0;
  28 + //包含,就是关闭的
  29 + return 1
  30 + }
  31 +
23 32 }
24 33  
25 34 module.exports = {
... ...
pages/user/index/index.wxml
... ... @@ -216,7 +216,13 @@
216 216 <image class="xc-center-img " src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image>
217 217 <view class="four-level-word">助力活动</view>
218 218 </view>
219   - </block>
  219 + </block>
  220 + <block wx:elif="{{item.name=='我的权益'}}">
  221 + <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}">
  222 + <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image>
  223 + <view class="fs26">我的权益</view>
  224 + </view>
  225 + </block>
220 226 <block wx:else>
221 227 <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav">
222 228 <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image>
... ... @@ -225,14 +231,8 @@
225 231 </block>
226 232 </block>
227 233 <!-- 没有链接地址的时候 -->
228   - <block wx:else>
229   - <block wx:if="{{item.name=='我的权益'}}">
230   - <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}">
231   - <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image>
232   - <view class="fs26">我的权益</view>
233   - </view>
234   - </block>
235   - <block wx:elif="{{item.name=='联系客服'}}">
  234 + <block wx:else>
  235 + <block wx:if="{{item.name=='联系客服'}}">
236 236 <button class="item t-c" wx:if="{{sys_switch.weapp_customertype}}" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
237 237 <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image>
238 238 <view class="fs26">联系客服</view>
... ...