Commit 3096b42e1f5c641104753b8eaedd28ea1e83e737

Authored by 后端研发-苏明海
2 parents d3be7aa1 4f6f14c5

Merge branch 'dev' into 'test'

Dev

See merge request !1124
Showing 72 changed files with 2891 additions and 1668 deletions
@@ -52,6 +52,8 @@ App({ @@ -52,6 +52,8 @@ App({
52 config2: null, //门店配置 52 config2: null, //门店配置
53 code: null, 53 code: null,
54 user_id:null,// qa-6519858,// 54 user_id:null,// qa-6519858,//
  55 + // user_id:6520314,// qa-6519858,//
  56 + // user_id:14148118,// qa-6519858,//
55 buy_now: null, 57 buy_now: null,
56 picklist: null, //门店列表 58 picklist: null, //门店列表
57 wuliuprice: null, //物流价格表 59 wuliuprice: null, //物流价格表
@@ -1197,5 +1199,66 @@ App({ @@ -1197,5 +1199,66 @@ App({
1197 }; 1199 };
1198 }, 1200 },
1199 1201
  1202 + //跳转视频号
  1203 + openChannelsActivity(obj){
  1204 + if (!obj.finderUserName) {
  1205 + wx.showToast({
  1206 + title: '参数缺少,跳转失败',
  1207 + duration: 2000,
  1208 + });
  1209 + }
  1210 + console.log('视频号参数:')
  1211 + console.log(obj)
  1212 + if (obj.video_type==1) { //1是直播 2 是 视频
  1213 + wx.getChannelsLiveInfo({
  1214 + finderUserName:obj.finderUserName,
  1215 + success:(res)=>{
  1216 + let {feedId ,status,nonceId} = res
  1217 + if (true || status == 2) {
  1218 + wx.openChannelsLive({
  1219 + finderUserName:obj.finderUserName,
  1220 + feedId,
  1221 + nonceId,
  1222 + success:()=>{
  1223 + console.log('进入直播间成功')
  1224 + },
  1225 + fail:(error)=>{
  1226 + console.log('进入直播间失败')
  1227 + console.log(error)
  1228 + }
  1229 + })
  1230 + }
  1231 + },
  1232 + fail:(error)=>{
  1233 + console.log('跳转失败1')
  1234 + console.log(error)
  1235 + wx.showModal({
  1236 + title: '提示',
  1237 + content: '获取直播失败:'+error.err_code,
  1238 + showCancel:false,
  1239 + success (res) {
  1240 + if (res.confirm) {
  1241 + console.log('用户点击确定')
  1242 + } else if (res.cancel) {
  1243 + console.log('用户点击取消')
  1244 + }
  1245 + }
  1246 + })
  1247 + }
  1248 + })
  1249 + }else{
  1250 + wx.openChannelsActivity({
  1251 + finderUserName:obj.finderUserName,
  1252 + feedId:obj.feedId,
  1253 + success:()=>{
  1254 + console.log('跳转成功')
  1255 + },
  1256 + fail:(error)=>{
  1257 + console.log('跳转失败')
  1258 + console.log(error)
  1259 + }
  1260 + })
  1261 + }
  1262 + },
1200 1263
1201 }); 1264 });
app.json
@@ -22,7 +22,6 @@ @@ -22,7 +22,6 @@
22 "pages/user/return_goods_info/return_goods_info", 22 "pages/user/return_goods_info/return_goods_info",
23 "pages/user/return_goods/return_goods", 23 "pages/user/return_goods/return_goods",
24 "pages/user/express/express", 24 "pages/user/express/express",
25 - "pages/user/get_user_info/get_user_info",  
26 "pages/activity/seckill_list/seckill_list", 25 "pages/activity/seckill_list/seckill_list",
27 "pages/activity/pind_list/pind_list", 26 "pages/activity/pind_list/pind_list",
28 "pages/team/team_success/team_success", 27 "pages/team/team_success/team_success",
@@ -34,12 +33,11 @@ @@ -34,12 +33,11 @@
34 33
35 "pages/user/userqy/userqy", 34 "pages/user/userqy/userqy",
36 "pages/user/user_spsy/user_spsy", 35 "pages/user/user_spsy/user_spsy",
37 - "pages/user/user_fw/user_fw", 36 +
38 "pages/user/grow_value/grow_value", 37 "pages/user/grow_value/grow_value",
39 "pages/payment/pay_success/pay_success", 38 "pages/payment/pay_success/pay_success",
40 "pages/user/plus/plus", 39 "pages/user/plus/plus",
41 "pages/user/cardinfo/cardinfo", 40 "pages/user/cardinfo/cardinfo",
42 - "pages/user/Detailed/Detailed",  
43 "pages/user/my_service/appment_main", 41 "pages/user/my_service/appment_main",
44 "pages/user/my_service/i_service", 42 "pages/user/my_service/i_service",
45 "pages/user/my_service/cosmetology_list", 43 "pages/user/my_service/cosmetology_list",
@@ -209,7 +207,9 @@ @@ -209,7 +207,9 @@
209 "root": "packageE/", 207 "root": "packageE/",
210 "name": "pack5", 208 "name": "pack5",
211 "pages": [ 209 "pages": [
212 - "pages/togoin/togoin" 210 + "pages/togoin/togoin",
  211 + "pages/user/Detailed/Detailed",
  212 + "pages/user/user_fw/user_fw"
213 ] 213 ]
214 } 214 }
215 215
components/diy_advertising/diy_advertising.js
@@ -43,7 +43,16 @@ Component({ @@ -43,7 +43,16 @@ Component({
43 var url=e.currentTarget.dataset.url; 43 var url=e.currentTarget.dataset.url;
44 getApp().goto(url); 44 getApp().goto(url);
45 }, 45 },
46 - 46 + nv_void(e){
  47 + var feedId=e.currentTarget.dataset.feedid;
  48 + var finderUserName=e.currentTarget.dataset.finderusername;
  49 + var video_type=e.currentTarget.dataset.video_type;
  50 + getApp().openChannelsActivity({
  51 + feedId,
  52 + finderUserName,
  53 + video_type
  54 + })
  55 + },
47 imageLoad:function(e){ 56 imageLoad:function(e){
48 var imgwidth = e.detail.width; 57 var imgwidth = e.detail.width;
49 var imgheight = e.detail.height; 58 var imgheight = e.detail.height;
components/diy_advertising/diy_advertising.wxml
@@ -19,6 +19,11 @@ @@ -19,6 +19,11 @@
19 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 19 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
20 </navigator> 20 </navigator>
21 </block> 21 </block>
  22 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  23 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" class="s1_gk_a1" >
  24 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  25 + </view>
  26 + </block>
22 <block wx:else> 27 <block wx:else>
23 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 28 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
24 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 29 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
@@ -53,6 +58,11 @@ @@ -53,6 +58,11 @@
53 </navigator> 58 </navigator>
54 </block> 59 </block>
55 60
  61 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  62 + <view class="s1_gk_a1" bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}">
  63 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  64 + </view>
  65 + </block>
56 <block wx:else> 66 <block wx:else>
57 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 67 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
58 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 68 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
@@ -97,6 +107,12 @@ @@ -97,6 +107,12 @@
97 </navigator> 107 </navigator>
98 </block> 108 </block>
99 109
  110 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  111 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" class="s1_gk_a1" >
  112 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  113 + </view>
  114 + </block>
  115 +
100 <block wx:else> 116 <block wx:else>
101 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 117 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
102 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 118 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
@@ -140,6 +156,11 @@ @@ -140,6 +156,11 @@
140 </navigator> 156 </navigator>
141 </block> 157 </block>
142 158
  159 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  160 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" class="s1_gk_a1" >
  161 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  162 + </view>
  163 + </block>
143 <block wx:else> 164 <block wx:else>
144 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 165 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
145 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 166 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
@@ -171,6 +192,12 @@ @@ -171,6 +192,12 @@
171 </navigator> 192 </navigator>
172 </block> 193 </block>
173 194
  195 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  196 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" class="s1_gk_a1" >
  197 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  198 + </view>
  199 + </block>
  200 +
174 <block wx:else> 201 <block wx:else>
175 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 202 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
176 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 203 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
@@ -202,6 +229,11 @@ @@ -202,6 +229,11 @@
202 <image src="{{object.data[0].src}}" lazy-load="true"></image> 229 <image src="{{object.data[0].src}}" lazy-load="true"></image>
203 </navigator> 230 </navigator>
204 </block> 231 </block>
  232 + <block wx:elif="{{object.data[0].finderUserName && object.data[0].feedId}}">
  233 + <view bindtap="nv_void" data-feedId="{{object.data[0].feedId}}" data-finderUserName="{{object.data[0].finderUserName}}" class="s1_gk_a1" >
  234 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  235 + </view>
  236 + </block>
205 <block wx:else> 237 <block wx:else>
206 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 238 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
207 <image src="{{object.data[0].src}}" lazy-load="true"></image> 239 <image src="{{object.data[0].src}}" lazy-load="true"></image>
@@ -234,6 +266,11 @@ @@ -234,6 +266,11 @@
234 <image src="{{object.data[1].src}}" lazy-load="true"></image> 266 <image src="{{object.data[1].src}}" lazy-load="true"></image>
235 </navigator> 267 </navigator>
236 </block> 268 </block>
  269 + <block wx:elif="{{object.data[1].finderUserName && object.data[1].feedId}}">
  270 + <view bindtap="nv_void" data-feedId="{{object.data[1].feedId}}" data-finderUserName="{{object.data[1].finderUserName}}" class="s1_gk_a1" >
  271 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  272 + </view>
  273 + </block>
237 <block wx:else> 274 <block wx:else>
238 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 275 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
239 <image src="{{object.data[1].src}}" lazy-load="true"></image> 276 <image src="{{object.data[1].src}}" lazy-load="true"></image>
@@ -265,6 +302,11 @@ @@ -265,6 +302,11 @@
265 <image src="{{object.data[2].src}}" lazy-load="true"></image> 302 <image src="{{object.data[2].src}}" lazy-load="true"></image>
266 </navigator> 303 </navigator>
267 </block> 304 </block>
  305 + <block wx:elif="{{object.data[2].finderUserName && object.data[2].feedId}}">
  306 + <view bindtap="nv_void" data-feedId="{{object.data[2].feedId}}" data-finderUserName="{{object.data[2].finderUserName}}" class="s1_gk_a1" >
  307 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  308 + </view>
  309 + </block>
268 <block wx:else> 310 <block wx:else>
269 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 311 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
270 <image src="{{object.data[2].src}}" lazy-load="true"></image> 312 <image src="{{object.data[2].src}}" lazy-load="true"></image>
@@ -304,6 +346,11 @@ @@ -304,6 +346,11 @@
304 <image src="{{object.data[0].src}}" lazy-load="true"></image> 346 <image src="{{object.data[0].src}}" lazy-load="true"></image>
305 </navigator> 347 </navigator>
306 </block> 348 </block>
  349 + <block wx:elif="{{object.data[0].finderUserName && object.data[0].feedId}}">
  350 + <view bindtap="nv_void" data-feedId="{{object.data[0].feedId}}" data-finderUserName="{{object.data[0].finderUserName}}" class="s1_gk_a1" >
  351 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  352 + </view>
  353 + </block>
307 <block wx:else> 354 <block wx:else>
308 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 355 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
309 <image src="{{object.data[0].src}}" lazy-load="true"></image> 356 <image src="{{object.data[0].src}}" lazy-load="true"></image>
@@ -334,6 +381,11 @@ @@ -334,6 +381,11 @@
334 <image src="{{object.data[1].src}}" lazy-load="true"></image> 381 <image src="{{object.data[1].src}}" lazy-load="true"></image>
335 </navigator> 382 </navigator>
336 </block> 383 </block>
  384 + <block wx:elif="{{object.data[1].finderUserName && object.data[1].feedId}}">
  385 + <view bindtap="nv_void" data-feedId="{{object.data[1].feedId}}" data-finderUserName="{{object.data[1].finderUserName}}" class="s1_gk_a1" >
  386 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  387 + </view>
  388 + </block>
337 <block wx:else> 389 <block wx:else>
338 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 390 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
339 <image src="{{object.data[1].src}}" lazy-load="true"></image> 391 <image src="{{object.data[1].src}}" lazy-load="true"></image>
@@ -367,6 +419,11 @@ @@ -367,6 +419,11 @@
367 <image src="{{object.data[2].src}}" lazy-load="true"></image> 419 <image src="{{object.data[2].src}}" lazy-load="true"></image>
368 </navigator> 420 </navigator>
369 </block> 421 </block>
  422 + <block wx:elif="{{object.data[2].finderUserName && object.data[2].feedId}}">
  423 + <view bindtap="nv_void" data-feedId="{{object.data[2].feedId}}" data-finderUserName="{{object.data[2].finderUserName}}" class="s1_gk_a1" >
  424 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  425 + </view>
  426 + </block>
370 <block wx:else> 427 <block wx:else>
371 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 428 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
372 <image src="{{object.data[2].src}}" lazy-load="true"></image> 429 <image src="{{object.data[2].src}}" lazy-load="true"></image>
@@ -397,6 +454,11 @@ @@ -397,6 +454,11 @@
397 <image src="{{object.data[3].src}}" lazy-load="true"></image> 454 <image src="{{object.data[3].src}}" lazy-load="true"></image>
398 </navigator> 455 </navigator>
399 </block> 456 </block>
  457 + <block wx:elif="{{object.data[3].finderUserName && object.data[3].feedId}}">
  458 + <view bindtap="nv_void" data-feedId="{{object.data[3].feedId}}" data-finderUserName="{{object.data[3].finderUserName}}" class="s1_gk_a1" >
  459 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  460 + </view>
  461 + </block>
400 <block wx:else> 462 <block wx:else>
401 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 463 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
402 <image src="{{object.data[3].src}}" lazy-load="true"></image> 464 <image src="{{object.data[3].src}}" lazy-load="true"></image>
@@ -434,6 +496,11 @@ @@ -434,6 +496,11 @@
434 <image src="{{object.data[0].src}}" lazy-load="true"></image> 496 <image src="{{object.data[0].src}}" lazy-load="true"></image>
435 </navigator> 497 </navigator>
436 </block> 498 </block>
  499 + <block wx:elif="{{object.data[0].finderUserName && object.data[0].feedId}}">
  500 + <view bindtap="nv_void" data-feedId="{{object.data[0].feedId}}" data-finderUserName="{{object.data[0].finderUserName}}" class="s1_gk_a1" >
  501 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  502 + </view>
  503 + </block>
437 <block wx:else> 504 <block wx:else>
438 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 505 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
439 <image src="{{object.data[0].src}}" lazy-load="true"></image> 506 <image src="{{object.data[0].src}}" lazy-load="true"></image>
@@ -464,6 +531,11 @@ @@ -464,6 +531,11 @@
464 <image src="{{object.data[1].src}}" lazy-load="true"></image> 531 <image src="{{object.data[1].src}}" lazy-load="true"></image>
465 </navigator> 532 </navigator>
466 </block> 533 </block>
  534 + <block wx:elif="{{object.data[1].finderUserName && object.data[1].feedId}}">
  535 + <view bindtap="nv_void" data-feedId="{{object.data[1].feedId}}" data-finderUserName="{{object.data[1].finderUserName}}" class="s1_gk_a1" >
  536 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  537 + </view>
  538 + </block>
467 <block wx:else> 539 <block wx:else>
468 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 540 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
469 <image src="{{object.data[1].src}}" lazy-load="true"></image> 541 <image src="{{object.data[1].src}}" lazy-load="true"></image>
@@ -498,6 +570,11 @@ @@ -498,6 +570,11 @@
498 <image src="{{object.data[2].src}}" lazy-load="true"></image> 570 <image src="{{object.data[2].src}}" lazy-load="true"></image>
499 </navigator> 571 </navigator>
500 </block> 572 </block>
  573 + <block wx:elif="{{object.data[2].finderUserName && object.data[2].feedId}}">
  574 + <view bindtap="nv_void" data-feedId="{{object.data[2].feedId}}" data-finderUserName="{{object.data[2].finderUserName}}" class="s1_gk_a1" >
  575 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  576 + </view>
  577 + </block>
501 <block wx:else> 578 <block wx:else>
502 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 579 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
503 <image src="{{object.data[2].src}}" lazy-load="true"></image> 580 <image src="{{object.data[2].src}}" lazy-load="true"></image>
@@ -528,6 +605,11 @@ @@ -528,6 +605,11 @@
528 <image src="{{object.data[3].src}}" lazy-load="true"></image> 605 <image src="{{object.data[3].src}}" lazy-load="true"></image>
529 </navigator> 606 </navigator>
530 </block> 607 </block>
  608 + <block wx:elif="{{object.data[3].finderUserName && object.data[3].feedId}}">
  609 + <view bindtap="nv_void" data-feedId="{{object.data[3].feedId}}" data-finderUserName="{{object.data[3].finderUserName}}" class="s1_gk_a1" >
  610 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  611 + </view>
  612 + </block>
531 <block wx:else> 613 <block wx:else>
532 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 614 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
533 <image src="{{object.data[3].src}}" lazy-load="true"></image> 615 <image src="{{object.data[3].src}}" lazy-load="true"></image>
@@ -567,6 +649,11 @@ @@ -567,6 +649,11 @@
567 <image src="{{object.data[0].src}}" lazy-load="true"></image> 649 <image src="{{object.data[0].src}}" lazy-load="true"></image>
568 </navigator> 650 </navigator>
569 </block> 651 </block>
  652 + <block wx:elif="{{object.data[0].finderUserName && object.data[0].feedId}}">
  653 + <view bindtap="nv_void" data-feedId="{{object.data[0].feedId}}" data-finderUserName="{{object.data[0].finderUserName}}" class="s1_gk_a1">
  654 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  655 + </view>
  656 + </block>
570 <block wx:else> 657 <block wx:else>
571 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 658 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
572 <image src="{{object.data[0].src}}" lazy-load="true"></image> 659 <image src="{{object.data[0].src}}" lazy-load="true"></image>
@@ -597,6 +684,11 @@ @@ -597,6 +684,11 @@
597 <image src="{{object.data[1].src}}" lazy-load="true"></image> 684 <image src="{{object.data[1].src}}" lazy-load="true"></image>
598 </navigator> 685 </navigator>
599 </block> 686 </block>
  687 + <block wx:elif="{{object.data[1].finderUserName && object.data[1].feedId}}">
  688 + <view bindtap="nv_void" data-feedId="{{object.data[1].feedId}}" data-finderUserName="{{object.data[1].finderUserName}}" class="s1_gk_a1">
  689 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  690 + </view>
  691 + </block>
600 <block wx:else> 692 <block wx:else>
601 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 693 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
602 <image src="{{object.data[1].src}}" lazy-load="true"></image> 694 <image src="{{object.data[1].src}}" lazy-load="true"></image>
@@ -631,6 +723,11 @@ @@ -631,6 +723,11 @@
631 <image src="{{object.data[2].src}}" lazy-load="true"></image> 723 <image src="{{object.data[2].src}}" lazy-load="true"></image>
632 </navigator> 724 </navigator>
633 </block> 725 </block>
  726 + <block wx:elif="{{object.data[2].finderUserName && object.data[2].feedId}}">
  727 + <view bindtap="nv_void" data-feedId="{{object.data[2].feedId}}" data-finderUserName="{{object.data[2].finderUserName}}" class="s1_gk_a1">
  728 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  729 + </view>
  730 + </block>
634 <block wx:else> 731 <block wx:else>
635 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 732 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
636 <image src="{{object.data[2].src}}" lazy-load="true"></image> 733 <image src="{{object.data[2].src}}" lazy-load="true"></image>
@@ -655,6 +752,11 @@ @@ -655,6 +752,11 @@
655 <image src="{{object.data[3].src}}" lazy-load="true"></image> 752 <image src="{{object.data[3].src}}" lazy-load="true"></image>
656 </navigator> 753 </navigator>
657 </block> 754 </block>
  755 + <block wx:elif="{{object.data[3].finderUserName && object.data[3].feedId}}">
  756 + <view bindtap="nv_void" data-feedId="{{object.data[3].feedId}}" data-finderUserName="{{object.data[3].finderUserName}}" class="s1_gk_a1">
  757 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  758 + </view>
  759 + </block>
658 <block wx:else> 760 <block wx:else>
659 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 761 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
660 <image src="{{object.data[3].src}}" lazy-load="true"></image> 762 <image src="{{object.data[3].src}}" lazy-load="true"></image>
@@ -683,6 +785,11 @@ @@ -683,6 +785,11 @@
683 <image src="{{object.data[4].src}}" lazy-load="true"></image> 785 <image src="{{object.data[4].src}}" lazy-load="true"></image>
684 </navigator> 786 </navigator>
685 </block> 787 </block>
  788 + <block wx:elif="{{object.data[4].finderUserName && object.data[4].feedId}}">
  789 + <view bindtap="nv_void" data-feedId="{{object.data[4].feedId}}" data-finderUserName="{{object.data[4].finderUserName}}" class="s1_gk_a1">
  790 + <image src="{{object.data[4].src}}" lazy-load="true"></image>
  791 + </view>
  792 + </block>
686 <block wx:else> 793 <block wx:else>
687 <view data-url="{{object.data[4].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url"> 794 <view data-url="{{object.data[4].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
688 <image src="{{object.data[4].src}}" lazy-load="true"></image> 795 <image src="{{object.data[4].src}}" lazy-load="true"></image>
@@ -721,6 +828,14 @@ @@ -721,6 +828,14 @@
721 </navigator> 828 </navigator>
722 </block> 829 </block>
723 830
  831 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  832 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" >
  833 + <swiper-item>
  834 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
  835 + <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
  836 + </swiper-item>
  837 + </view>
  838 + </block>
724 <block wx:else> 839 <block wx:else>
725 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" bindtap="go_url"> 840 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" bindtap="go_url">
726 <swiper-item> 841 <swiper-item>
components/diy_goodsGroup/diy_goodsGroup.js
@@ -29,7 +29,8 @@ Component({ @@ -29,7 +29,8 @@ Component({
29 imghost: o.imghost, 29 imghost: o.imghost,
30 is_recommend: 0, 30 is_recommend: 0,
31 is_hot: 0, 31 is_hot: 0,
32 - is_new: 0, 32 + is_new: 0,
  33 + isyhgoods:0,
33 baseUrl: "/api/weshop/goods/page", 34 baseUrl: "/api/weshop/goods/page",
34 resourceUrl: t.globalData.setting.resourceUrl, 35 resourceUrl: t.globalData.setting.resourceUrl,
35 url: t.globalData.setting.imghost, 36 url: t.globalData.setting.imghost,
@@ -77,7 +78,7 @@ Component({ @@ -77,7 +78,7 @@ Component({
77 78
78 //最新的版本才有nav_list 79 //最新的版本才有nav_list
79 if (nav_list) { 80 if (nav_list) {
80 - nav_item = nav_list[0]; 81 + nav_item = nav_list[0];
81 //要算一下商品goodsid 82 //要算一下商品goodsid
82 for (var ij in nav_list) { 83 for (var ij in nav_list) {
83 var item = nav_list[ij]; 84 var item = nav_list[ij];
@@ -134,6 +135,9 @@ Component({ @@ -134,6 +135,9 @@ Component({
134 if (nav_item && nav_item.goodsclass == 3) { 135 if (nav_item && nav_item.goodsclass == 3) {
135 this.data.is_new = 1 136 this.data.is_new = 1
136 } 137 }
  138 + if (nav_item && nav_item.goodsclass == 4) {
  139 + this.data.isyhgoods = 1
  140 + }
137 141
138 this.data.requestData = new Array(); 142 this.data.requestData = new Array();
139 this.data.g_id = nav_item.data; 143 this.data.g_id = nav_item.data;
@@ -225,6 +229,7 @@ Component({ @@ -225,6 +229,7 @@ Component({
225 if (th.data.is_recommend) r_data.is_recommend = th.data.is_recommend; 229 if (th.data.is_recommend) r_data.is_recommend = th.data.is_recommend;
226 if (th.data.is_hot) r_data.is_hot = th.data.is_hot; 230 if (th.data.is_hot) r_data.is_hot = th.data.is_hot;
227 if (th.data.is_new) r_data.is_new = th.data.is_new; 231 if (th.data.is_new) r_data.is_new = th.data.is_new;
  232 + if (th.data.isyhgoods) r_data.isyhgoods = th.data.isyhgoods;
228 233
229 var user_id = getApp().globalData.user_id; 234 var user_id = getApp().globalData.user_id;
230 if (!user_id) user_id = 0; 235 if (!user_id) user_id = 0;
@@ -239,7 +244,7 @@ Component({ @@ -239,7 +244,7 @@ Component({
239 th.setData({ 244 th.setData({
240 goods_btn: res.data.data.pageData, 245 goods_btn: res.data.data.pageData,
241 total: res.data.data.total 246 total: res.data.data.total
242 - }) 247 + })
243 th.data.currentPage++; 248 th.data.currentPage++;
244 //设置商品熏染 249 //设置商品熏染
245 th.set_good(goods); 250 th.set_good(goods);
@@ -277,12 +282,20 @@ Component({ @@ -277,12 +282,20 @@ Component({
277 }, 282 },
278 283
279 setLoading: function () { 284 setLoading: function () {
280 - var that = this;  
281 - if (this.data.loading) return false;  
282 - this.data.loading = 1;  
283 - that.init(that.data.classstyle_id, that.data.wgroup); 285 + if(this.data.object.column==5){return}
  286 + if( this.data.goods_btn.length!=0 || this.data.object.goodscount*this.data.page <this.data.total ){
  287 + var that = this;
  288 + if (this.data.loading) return false;
  289 + this.data.loading = 1;
  290 + that.init(that.data.classstyle_id, that.data.wgroup);
  291 + }
284 }, 292 },
285 - 293 + automore(){
  294 + let is_automore = this.data.object.is_automore
  295 + if (is_automore==1) {
  296 + this.setLoading()
  297 + }
  298 + },
286 //图片失败,默认图片 299 //图片失败,默认图片
287 bind_bnerr3: function (e) { 300 bind_bnerr3: function (e) {
288 var _errImg = e.target.dataset.errorimg; 301 var _errImg = e.target.dataset.errorimg;
@@ -420,7 +433,7 @@ Component({ @@ -420,7 +433,7 @@ Component({
420 } 433 }
421 434
422 435
423 - this.data.is_recommend = this.data.is_hot = this.data.is_new = 0; 436 + this.data.isyhgoods = this.data.is_recommend = this.data.is_hot = this.data.is_new = 0;
424 //推荐,热卖,新品 437 //推荐,热卖,新品
425 if (nav_item && nav_item.goodsclass == 1) { 438 if (nav_item && nav_item.goodsclass == 1) {
426 this.data.is_recommend = 1 439 this.data.is_recommend = 1
@@ -431,6 +444,9 @@ Component({ @@ -431,6 +444,9 @@ Component({
431 if (nav_item && nav_item.goodsclass == 3) { 444 if (nav_item && nav_item.goodsclass == 3) {
432 this.data.is_new = 1 445 this.data.is_new = 1
433 } 446 }
  447 + if (nav_item && nav_item.goodsclass == 4) {
  448 + this.data.isyhgoods = 1
  449 + }
434 450
435 451
436 this.data.currentPage = 1; 452 this.data.currentPage = 1;
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <wxs module="g_filter" src="g_filter.wxs"></wxs> 3 <wxs module="g_filter" src="g_filter.wxs"></wxs>
4 4
5 <!-- 要不要顶部标题 --> 5 <!-- 要不要顶部标题 -->
6 -<mp-loading show ="{{goods_array.length== 0}}" type="circle"></mp-loading> 6 +<!-- <mp-loading show ="{{goods_array.length== 0}}" type="circle"></mp-loading> -->
7 7
8 <view id="container"> 8 <view id="container">
9 9
@@ -24,8 +24,8 @@ @@ -24,8 +24,8 @@
24 </view> 24 </view>
25 </block> 25 </block>
26 26
27 -  
28 -<view style="background-color: {{bg_color}};"> 27 +
  28 +<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}">
29 <!--1个列表的时候--> 29 <!--1个列表的时候-->
30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'> 30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
31 <block wx:for="{{goods_array}}"> 31 <block wx:for="{{goods_array}}">
@@ -898,5 +898,5 @@ @@ -898,5 +898,5 @@
898 </swiper> 898 </swiper>
899 899
900 </view> 900 </view>
901 - 901 +<view class="nodata-title" wx:else>暂无数据</view>
902 </view> 902 </view>
903 \ No newline at end of file 903 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.wxss
@@ -904,7 +904,13 @@ top: 10rpx; @@ -904,7 +904,13 @@ top: 10rpx;
904 .zs_goods_xiao_wai{ padding-top:1rpx } 904 .zs_goods_xiao_wai{ padding-top:1rpx }
905 .s1_gk_a1.list_border{ display: block; border-bottom: 1rpx solid #eee} 905 .s1_gk_a1.list_border{ display: block; border-bottom: 1rpx solid #eee}
906 906
907 - 907 +.nodata-title {
  908 + padding-top: 40rpx;
  909 + padding-bottom: 40rpx;
  910 + color: #bbb;
  911 + font-size: 28rpx;
  912 + text-align: center;
  913 +}
908 914
909 915
910 916
components/diy_live/diy_live.js
@@ -24,7 +24,8 @@ Component({ @@ -24,7 +24,8 @@ Component({
24 data: { 24 data: {
25 // 弹窗显示控制 25 // 弹窗显示控制
26 showHongbao:false, 26 showHongbao:false,
27 - showHongbaoSmall: false, 27 + showHongbaoSmall: false,
  28 + imghost:getApp().globalData.setting.imghost
28 }, 29 },
29 30
30 /** 31 /**
components/diy_live/diy_live.wxml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <view class="close-box"> 3 <view class="close-box">
4 <text class="iconfont icon-guan"></text> 4 <text class="iconfont icon-guan"></text>
5 </view> 5 </view>
6 - <image class="img" src="../../images/share/default_g_img.gif" mode="aspectFit"></image> 6 + <image class="img" src="{{imghost}}/miniapp/images/default_g_img.gif" mode="aspectFit"></image>
7 <view class="zhibo-box t-c fs26"> 7 <view class="zhibo-box t-c fs26">
8 <text class="iconfont icon-zhibo"></text> 直播 8 <text class="iconfont icon-zhibo"></text> 直播
9 </view> 9 </view>
components/diy_nav/diy_nav.js
@@ -48,6 +48,18 @@ Component({ @@ -48,6 +48,18 @@ Component({
48 var url=e.currentTarget.dataset.url; 48 var url=e.currentTarget.dataset.url;
49 console.log('url==>', url); 49 console.log('url==>', url);
50 getApp().goto(url); 50 getApp().goto(url);
  51 + },
  52 + nv_void(e){
  53 + console.log('导航')
  54 + console.log(e)
  55 + var feedId=e.currentTarget.dataset.feedid;
  56 + var finderUserName=e.currentTarget.dataset.finderusername;
  57 + var video_type=e.currentTarget.dataset.video_type;
  58 + getApp().openChannelsActivity({
  59 + feedId,
  60 + finderUserName,
  61 + video_type
  62 + })
51 } 63 }
52 } 64 }
53 }) 65 })
54 \ No newline at end of file 66 \ No newline at end of file
components/diy_nav/diy_nav.wxml
@@ -13,6 +13,11 @@ @@ -13,6 +13,11 @@
13 <include src="diy_nav_part1.wxml" /> 13 <include src="diy_nav_part1.wxml" />
14 </navigator> 14 </navigator>
15 </block> 15 </block>
  16 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  17 + <view style="width:{{100/nav_list.length}}%;" bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}">
  18 + <include src="diy_nav_part1.wxml" />
  19 + </view>
  20 + </block>
16 <block wx:else> 21 <block wx:else>
17 <view style="width:{{100/nav_list.length}}%;" data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url"> 22 <view style="width:{{100/nav_list.length}}%;" data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url">
18 <include src="diy_nav_part1.wxml" /> 23 <include src="diy_nav_part1.wxml" />
@@ -36,6 +41,11 @@ @@ -36,6 +41,11 @@
36 <include src="diy_nav_part2.wxml" /> 41 <include src="diy_nav_part2.wxml" />
37 </navigator> 42 </navigator>
38 </block> 43 </block>
  44 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  45 + <view bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}">
  46 + <include src="diy_nav_part2.wxml" />
  47 + </view>
  48 + </block>
39 <block wx:else> 49 <block wx:else>
40 <view data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url"> 50 <view data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url">
41 <include src="diy_nav_part2.wxml" /> 51 <include src="diy_nav_part2.wxml" />
components/diy_notice/diy_notice.js
@@ -26,5 +26,15 @@ Component({ @@ -26,5 +26,15 @@ Component({
26 var url=e.currentTarget.dataset.url; 26 var url=e.currentTarget.dataset.url;
27 getApp().goto(url); 27 getApp().goto(url);
28 }, 28 },
  29 + nv_void(e){
  30 + var feedId=e.currentTarget.dataset.feedid;
  31 + var finderUserName=e.currentTarget.dataset.finderusername;
  32 + var video_type=e.currentTarget.dataset.video_type;
  33 + getApp().openChannelsActivity({
  34 + feedId,
  35 + finderUserName,
  36 + video_type
  37 + })
  38 + }
29 } 39 }
30 }) 40 })
31 \ No newline at end of file 41 \ No newline at end of file
components/diy_notice/diy_notice.wxml
@@ -32,6 +32,20 @@ @@ -32,6 +32,20 @@
32 </block> 32 </block>
33 33
34 34
  35 + <block wx:elif="{{object.finderUserName && object.video_type}}">
  36 + <view bindtap="nv_void" data-feedId="{{object.feedId}}" data-video_type="{{object.video_type}}" data-finderUserName="{{object.finderUserName}}" class="s1_gk_a1" style="background-color: {{object.notice_bgcolor}}">
  37 + <view class="big_border">
  38 + <image class="image_c" src="{{imghost}}/miniapp/images/notice.png"></image>
  39 + <view class="marquee">
  40 + <view class="content">
  41 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  42 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  43 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  44 + </view>
  45 + </view>
  46 + </view>
  47 + </view>
  48 + </block>
35 <block wx:else> 49 <block wx:else>
36 <view data-url="{{object.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" style="background-color: {{object.notice_bgcolor}}"> 50 <view data-url="{{object.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" style="background-color: {{object.notice_bgcolor}}">
37 <view class="big_border"> 51 <view class="big_border">
components/diy_picMax/diy_picMax.js
@@ -32,7 +32,16 @@ Component({ @@ -32,7 +32,16 @@ Component({
32 var url = e.currentTarget.dataset.url; 32 var url = e.currentTarget.dataset.url;
33 getApp().goto(url); 33 getApp().goto(url);
34 }, 34 },
35 - 35 + nv_void(e){
  36 + var feedId=e.currentTarget.dataset.feedid;
  37 + var finderUserName=e.currentTarget.dataset.finderusername;
  38 + var video_type=e.currentTarget.dataset.video_type;
  39 + getApp().openChannelsActivity({
  40 + feedId,
  41 + finderUserName,
  42 + video_type
  43 + })
  44 + },
36 previewImage(e){ 45 previewImage(e){
37 let src =e.currentTarget.dataset.src; 46 let src =e.currentTarget.dataset.src;
38 wx.previewImage({ 47 wx.previewImage({
components/diy_picMax/diy_picMax.wxml
@@ -14,6 +14,10 @@ @@ -14,6 +14,10 @@
14 <image src="{{item.src}}" mode="widthFix" style="display: block; height: 100%; width: 100%;"></image> 14 <image src="{{item.src}}" mode="widthFix" style="display: block; height: 100%; width: 100%;"></image>
15 </navigator> 15 </navigator>
16 </block> 16 </block>
  17 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  18 + <image bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" wx:if="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
  19 + <image bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" wx:else src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
  20 + </block>
17 <block wx:else> 21 <block wx:else>
18 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> 22 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
19 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> 23 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
@@ -34,6 +38,10 @@ @@ -34,6 +38,10 @@
34 <image src="{{item.src}}" mode="widthFix" style="display: block;"></image> 38 <image src="{{item.src}}" mode="widthFix" style="display: block;"></image>
35 </navigator> 39 </navigator>
36 </block> 40 </block>
  41 + <block wx:elif="{{item.finderUserName && item.video_type}}">
  42 + <image bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" wx:if="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image>
  43 + <image bindtap="nv_void" data-feedId="{{item.feedId}}" data-video_type="{{item.video_type}}" data-finderUserName="{{item.finderUserName}}" wx:else src="{{item.src}}" style="display: block;" mode="widthFix"></image>
  44 + </block>
37 <block wx:else> 45 <block wx:else>
38 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image> 46 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image>
39 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block;" mode="widthFix"></image> 47 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block;" mode="widthFix"></image>
components/diy_title/diy_title.js
@@ -24,6 +24,16 @@ Component({ @@ -24,6 +24,16 @@ Component({
24 var txt="object.title_img"; 24 var txt="object.title_img";
25 ob[txt] = iurl +'/miniapp/images/logo.png?v=1'; 25 ob[txt] = iurl +'/miniapp/images/logo.png?v=1';
26 this.setData(ob); 26 this.setData(ob);
27 - } 27 + },
  28 + nv_void(e){
  29 + var feedId=e.currentTarget.dataset.feedid;
  30 + var finderUserName=e.currentTarget.dataset.finderusername;
  31 + var video_type=e.currentTarget.dataset.video_type;
  32 + getApp().openChannelsActivity({
  33 + feedId,
  34 + finderUserName,
  35 + video_type
  36 + })
  37 + }
28 } 38 }
29 }) 39 })
components/diy_title/diy_title.wxml
@@ -13,6 +13,9 @@ @@ -13,6 +13,9 @@
13 <view class="txet_rim"><view class="text" style='color:{{object.title_namecolor}}'>{{object.title_name}}</view></view> 13 <view class="txet_rim"><view class="text" style='color:{{object.title_namecolor}}'>{{object.title_name}}</view></view>
14 </navigator> 14 </navigator>
15 15
  16 + <view wx:elif="{{object.finderUserName && object.video_type}}" data-url="{{object.wxapp_url}}" bindtap="nv_void" data-feedId="{{object.feedId}}" data-video_type="{{object.video_type}}" data-finderUserName="{{object.finderUserName}}" >
  17 + <view class="txet_rim"><view class="text" style='color:{{object.title_namecolor}}'>{{object.title_name}}</view></view>
  18 + </view>
16 <view data-url="{{object.wxapp_url}}" bindtap="go_url" wx:else> 19 <view data-url="{{object.wxapp_url}}" bindtap="go_url" wx:else>
17 <view class="txet_rim"><view class="text" style='color:{{object.title_namecolor}}'>{{object.title_name}}</view></view> 20 <view class="txet_rim"><view class="text" style='color:{{object.title_namecolor}}'>{{object.title_name}}</view></view>
18 </view> 21 </view>
@@ -38,6 +41,14 @@ @@ -38,6 +41,14 @@
38 </navigator> 41 </navigator>
39 42
40 43
  44 + <view wx:elif="{{object.finderUserName && object.video_type}}" bindtap="nv_void" data-feedId="{{object.feedId}}" data-video_type="{{object.video_type}}" data-finderUserName="{{object.finderUserName}}" >
  45 + <view class="right_rim">
  46 + <view class="font_right_rim">
  47 + <view class="caption" style='color:{{object.title_rightcolor}}'>{{object.title_right}}</view>
  48 + </view>
  49 + <view class="aa"></view>
  50 + </view>
  51 + </view>
41 <view wx:else bindtap="go_url" data-url='{{object.wxapp_url}}'> 52 <view wx:else bindtap="go_url" data-url='{{object.wxapp_url}}'>
42 <view class="right_rim"> 53 <view class="right_rim">
43 <view class="font_right_rim"> 54 <view class="font_right_rim">
custom-tab-bar/index.wxml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 style="color: {{active==idx?fontcolor_sele:fontcolor}};"> 6 style="color: {{active==idx?fontcolor_sele:fontcolor}};">
7 <view class="{{item.specific ? 'tabbar_item_wrapper':''}}" style="background-color: {{item.specific ? item.button_background:'transparent'}};"> 7 <view class="{{item.specific ? 'tabbar_item_wrapper':''}}" style="background-color: {{item.specific ? item.button_background:'transparent'}};">
8 <view class="tab_img"> 8 <view class="tab_img">
9 - <view wx:if="{{item.nav_name=='购物车' && cartGoodsNum != 0}}" class="cart_num" >{{cartGoodsNum}}</view> 9 + <!-- <view wx:if="{{item.nav_name=='购物车' && cartGoodsNum != 0}}" class="cart_num" >{{cartGoodsNum}}</view> -->
10 <view class="nav_imgage" style="background-image: url({{active==idx?item.src_sele:item.src}});"></view> 10 <view class="nav_imgage" style="background-image: url({{active==idx?item.src_sele:item.src}});"></view>
11 </view> 11 </view>
12 <view>{{item.nav_name}}</view> 12 <view>{{item.nav_name}}</view>
images/gt.png deleted

1.26 KB

images/share/default_g_img.gif deleted

4.23 KB

packageA/pages/activity_share/activity_share.js
@@ -1203,9 +1203,17 @@ Page({ @@ -1203,9 +1203,17 @@ Page({
1203 ee.data.share_goods_img = res.path; 1203 ee.data.share_goods_img = res.path;
1204 tt(); 1204 tt();
1205 }, 1205 },
1206 - fail: function(res) {  
1207 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
1208 - tt(); 1206 + fail: function(res) {
  1207 +
  1208 + //获取默认空白图
  1209 + wx.getImageInfo({
  1210 + src: ee.data.url+'/miniapp/images/default_g_img.gif',
  1211 + success: function(res) {
  1212 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  1213 + tt();
  1214 + }
  1215 + })
  1216 +
1209 } 1217 }
1210 }); 1218 });
1211 }, 1219 },
packageA/pages/distribution/order/order.wxml
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </view> 14 </view>
15 <view class="c-a">{{filter.status(item.status, statusArr)}}</view> 15 <view class="c-a">{{filter.status(item.status, statusArr)}}</view>
16 </view> 16 </view>
17 - <view class="flex jc_sb ai-center pd20" wx:for="{{item.goods}}" wx:for-item="it" bindtap="goto" data-url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id' + item.goods}}"> 17 + <view class="flex jc_sb ai-center pd20" wx:for="{{item.goods}}" wx:for-item="it" bindtap="goto" data-url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id=' + it.goods_id}}">
18 <view class="flex pdr20"> 18 <view class="flex pdr20">
19 <view class="pdr20"><image class="img" src="{{imghost + (it.original_img ? it.original_img : default_img)}}" lazy-load/></view> 19 <view class="pdr20"><image class="img" src="{{imghost + (it.original_img ? it.original_img : default_img)}}" lazy-load/></view>
20 <view class="fs24"> 20 <view class="fs24">
packageA/pages/distribution/shop/shop.js
@@ -84,6 +84,15 @@ Page({ @@ -84,6 +84,15 @@ Page({
84 }) 84 })
85 // this.getData(true, '/api/weshop/users/distribut/pagemyshop', this.data.currentQuery); 85 // this.getData(true, '/api/weshop/users/distribut/pagemyshop', this.data.currentQuery);
86 } 86 }
  87 +
  88 + getApp().promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{
  89 + var dis=rs.data.data;
  90 + if( dis){
  91 + self.setData({storeDistribut:dis})
  92 + }
  93 + })
  94 +
  95 +
87 }, 96 },
88 97
89 /** 98 /**
@@ -318,10 +327,17 @@ Page({ @@ -318,10 +327,17 @@ Page({
318 * 用户点击右上角分享 327 * 用户点击右上角分享
319 *--点击分享事件--分享我的小店 328 *--点击分享事件--分享我的小店
320 *--*/ 329 *--*/
321 - onShareAppMessage: function (t) { getApp().globalData.no_clear=1; 330 + onShareAppMessage: function (t) {
322 331
  332 + getApp().globalData.no_clear=1;
323 var th = this; 333 var th = this;
324 var title = "我的小店"; 334 var title = "我的小店";
  335 +
  336 + if(this.data.storeDistribut){
  337 + title=this.data.storeDistribut.distributSharetitle;
  338 + title+=" "+this.data.storeDistribut.distributShareremark;
  339 + }
  340 +
325 var user_id = this.data.first_leader; 341 var user_id = this.data.first_leader;
326 if (!user_id) { 342 if (!user_id) {
327 user_id = getApp().globalData.user_id 343 user_id = getApp().globalData.user_id
packageA/pages/goodsInfo/goodsInfo.js
@@ -2444,9 +2444,15 @@ Page({ @@ -2444,9 +2444,15 @@ Page({
2444 tt(); 2444 tt();
2445 }, 2445 },
2446 fail: function(res) { 2446 fail: function(res) {
  2447 + //获取默认空白图
  2448 + wx.getImageInfo({
  2449 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  2450 + success: function(res) {
  2451 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  2452 + tt();
  2453 + }
  2454 + })
2447 2455
2448 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
2449 - tt();  
2450 } 2456 }
2451 }); 2457 });
2452 }, 2458 },
packageA/pages/goods_share/goods_share.js
@@ -806,8 +806,16 @@ Page({ @@ -806,8 +806,16 @@ Page({
806 tt(); 806 tt();
807 }, 807 },
808 fail: function(res) { 808 fail: function(res) {
809 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
810 - tt(); 809 +
  810 + //获取默认空白图
  811 + wx.getImageInfo({
  812 + src: ee.data.url+'/miniapp/images/default_g_img.gif',
  813 + success: function(res) {
  814 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  815 + tt();
  816 + }
  817 + })
  818 +
811 } 819 }
812 }); 820 });
813 }, 821 },
packageA/pages/quan_list/quan_list.js
@@ -32,6 +32,9 @@ Page({ @@ -32,6 +32,9 @@ Page({
32 //---展示--- 32 //---展示---
33 onShow: function () { 33 onShow: function () {
34 34
  35 + //检查能不能分享
  36 + getApp().check_can_share();
  37 +
35 console.log("onShow:1"); 38 console.log("onShow:1");
36 this.data.curpage = 1; 39 this.data.curpage = 1;
37 this.setData({ dataList: null }); 40 this.setData({ dataList: null });
@@ -41,6 +44,8 @@ Page({ @@ -41,6 +44,8 @@ Page({
41 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}]; 44 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}];
42 //th.setData({dataList: data}); 45 //th.setData({dataList: data});
43 this.setData({ getcurday: ut.gettimestamp() }); 46 this.setData({ getcurday: ut.gettimestamp() });
  47 +
  48 +
44 }, 49 },
45 50
46 onHide: function () { 51 onHide: function () {
@@ -184,5 +189,36 @@ Page({ @@ -184,5 +189,36 @@ Page({
184 var index = e.currentTarget.dataset.ind; 189 var index = e.currentTarget.dataset.ind;
185 var item = this.data.dataList[index]; 190 var item = this.data.dataList[index];
186 getApp().goto("/packageA/pages/quan_pro/quan_pro?id=" + item.id); 191 getApp().goto("/packageA/pages/quan_pro/quan_pro?id=" + item.id);
187 - } 192 + },
  193 +
  194 +
  195 + //发送给好友
  196 + onShareAppMessage:async function(e) {
  197 + getApp().globalData.no_clear=1;
  198 + var url= `packageA/pages/quan_list/quan_list`;
  199 + var userInfo = getApp().globalData.userInfo;
  200 + //是分销商才带
  201 + if (userInfo) {
  202 + url += "?first_leader=" + userInfo.user_id;
  203 + }
  204 + var ob = {
  205 + title:"优惠券列表",
  206 + path: url,
  207 + //imageUrl:this.data.url+this.data.store_config.store_logo,
  208 + };
  209 + return ob;
  210 + },
  211 +
  212 + //发送给朋友圈
  213 + onShareTimeline() {
  214 + getApp().globalData.no_clear=1;
  215 + var user_id= getApp().globalData.user_id
  216 + return {
  217 + title:"优惠券列表",
  218 + query: 'first_leader='+user_id
  219 + }
  220 + },
  221 +
  222 +
  223 +
188 }); 224 });
packageA/pages/quan_pro/quan_pro.js
@@ -44,6 +44,10 @@ Page({ @@ -44,6 +44,10 @@ Page({
44 44
45 //---展示,显示券的信息--- 45 //---展示,显示券的信息---
46 onShow: function() { 46 onShow: function() {
  47 +
  48 + //检查能不能分享
  49 + getApp().check_can_share();
  50 +
47 var th=this; 51 var th=this;
48 var user_id=getApp().globalData.user_id; 52 var user_id=getApp().globalData.user_id;
49 getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { 53 getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", {
@@ -170,4 +174,33 @@ Page({ @@ -170,4 +174,33 @@ Page({
170 show_success:0 174 show_success:0
171 }) 175 })
172 }, 176 },
  177 +
  178 + //发送给好友
  179 + onShareAppMessage:async function(e) {
  180 + getApp().globalData.no_clear=1;
  181 + var url= "packageA/pages/quan_pro/quan_pro?id="+this.data.id;
  182 + var userInfo = getApp().globalData.userInfo;
  183 + //是分销商才带
  184 + if (userInfo) {
  185 + url += "&first_leader=" + userInfo.user_id;
  186 + }
  187 + var ob = {
  188 + title:this.data.q_data.name,
  189 + path: url,
  190 + //imageUrl:this.data.url+this.data.store_config.store_logo,
  191 + };
  192 + return ob;
  193 + },
  194 +
  195 + //发送给朋友圈
  196 + onShareTimeline() {
  197 + getApp().globalData.no_clear=1;
  198 + var user_id= getApp().globalData.user_id
  199 + return {
  200 + title:this.data.q_data.name,
  201 + query: 'id='+this.data.id+'&first_leader='+user_id
  202 + }
  203 + },
  204 +
  205 +
173 }); 206 });
packageA/pages/service_share/service_share.js
@@ -784,9 +784,15 @@ Page({ @@ -784,9 +784,15 @@ Page({
784 ee.data.share_goods_img = res.path; 784 ee.data.share_goods_img = res.path;
785 tt(); 785 tt();
786 }, 786 },
787 - fail: function(res) {  
788 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
789 - tt(); 787 + fail: function(res) {
  788 + //获取默认空白图
  789 + wx.getImageInfo({
  790 + src: ee.data.url+'/miniapp/images/default_g_img.gif',
  791 + success: function(res) {
  792 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  793 + tt();
  794 + }
  795 + })
790 } 796 }
791 }); 797 });
792 }, 798 },
packageB/pages/zuhegou/index/index.js
@@ -116,7 +116,9 @@ Page({ @@ -116,7 +116,9 @@ Page({
116 sort_store: 0, //门店分类 116 sort_store: 0, //门店分类
117 choice_sort_store: 0, //选择分类门店 117 choice_sort_store: 0, //选择分类门店
118 fir_pick_index: 0, //门店选择的下标 118 fir_pick_index: 0, //门店选择的下标
119 - sec_pick_index: 0 //门店选择的下标,地区选择之后的内页 119 + sec_pick_index: 0, //门店选择的下标,地区选择之后的内页
  120 +
  121 + sales_map:{}, //线下销售的map
120 }, 122 },
121 123
122 /** 124 /**
@@ -311,7 +313,6 @@ Page({ @@ -311,7 +313,6 @@ Page({
311 getApp().getConfig2(function (e) { 313 getApp().getConfig2(function (e) {
312 ee.setData({ 314 ee.setData({
313 bconfig: e, 315 bconfig: e,
314 - sales_rules: e.sales_rules,  
315 }); 316 });
316 //设置基本参数 317 //设置基本参数
317 th.wait_for_store_config(e); 318 th.wait_for_store_config(e);
@@ -533,6 +534,9 @@ Page({ @@ -533,6 +534,9 @@ Page({
533 //说明是加入购物车是时候 534 //说明是加入购物车是时候
534 this.data.is_zuhe_addcart = 1; 535 this.data.is_zuhe_addcart = 1;
535 if (!haveAdded) { 536 if (!haveAdded) {
  537 +
  538 +
  539 +
536 th.data.sele_g = this.data.list[index]; 540 th.data.sele_g = this.data.list[index];
537 if (!th.data.sele_g.num) th.data.goodsInputNum = 1; 541 if (!th.data.sele_g.num) th.data.goodsInputNum = 1;
538 542
@@ -567,11 +571,14 @@ Page({ @@ -567,11 +571,14 @@ Page({
567 } 571 }
568 return false; 572 return false;
569 } else { 573 } else {
570 - th.setData({  
571 - is_no_pipei: 0  
572 - });  
573 - th.check_is_in_cart(function () {  
574 - th.add_cart_func(); 574 + //先判断一下线下库存
  575 + th.check_pk_store_conut(function(){
  576 + th.setData({
  577 + is_no_pipei: 0
  578 + });
  579 + th.check_is_in_cart(function () {
  580 + th.add_cart_func();
  581 + })
575 }) 582 })
576 } 583 }
577 } else { 584 } else {
@@ -648,6 +655,109 @@ Page({ @@ -648,6 +655,109 @@ Page({
648 655
649 }, 656 },
650 657
  658 + //在启用线下的时候,要判断一下是不是有库存
  659 + async check_pk_store_conut(func,is_no_msg,gd,by_num){
  660 + var th=this;
  661 + if(this.data.sales_rules!=2){
  662 + func();
  663 + }
  664 + //门店库存no
  665 + var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no;
  666 + var pickup_id=gd && gd.pick_id?gd.pick_id:this.data.def_pick_store.pickup_id;
  667 + var lock = [];
  668 + var plist=null;
  669 + var good=gd || th.data.sele_g;
  670 + var buy_num=by_num || th.data.goodsInputNum;
  671 +
  672 + if(this.data.sales_map[good.goods_id]){
  673 +
  674 + var mp=this.data.sales_map[good.goods_id];
  675 + var lock_num=mp.lock_num;
  676 + var CanOutQty=mp.CanOutQty;
  677 + if (CanOutQty < lock_num +buy_num) {
  678 +
  679 + if(!is_no_msg) {
  680 + wx.showToast({
  681 + title: "门店库存不足",
  682 + icon: 'none',
  683 + duration: 2000
  684 + })
  685 + }
  686 + return false;
  687 + }
  688 + if(is_no_msg) return true;
  689 + func();
  690 +
  691 + }else {
  692 + //先读取门店的lock,采用链式写法,少用await
  693 + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  694 + data: {store_id: os.stoid, wareId: good.goods_id, pageSize: 1000}
  695 + }).then(res => {
  696 + if (res.data.code == 0 && res.data.data.total > 0) {
  697 + lock = res.data.data.pageData
  698 + }
  699 +
  700 + })
  701 + //---通过接口获取门店的线下库存信息--
  702 + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  703 + data: {
  704 + storageNos: pkno,
  705 + wareIds: encodeURIComponent(good.erpwareid),
  706 + storeId: os.stoid,
  707 + pageSize: 2000
  708 + }
  709 + }).then(res => {
  710 + if (ut.ajax_ok(res)) {
  711 + plist = res.data.data.pageData[0];
  712 + }
  713 + })
  714 +
  715 + if(!plist){
  716 + if(!is_no_msg) {
  717 + wx.showToast({
  718 + title: "该商品在门店未找到库存",
  719 + icon: 'none',
  720 + duration: 2000
  721 + })
  722 + }
  723 + return false;
  724 + }
  725 +
  726 + var lock_num = th.find_lock_num(pickup_id, lock);
  727 + this.data.sales_map[good.goods_id]={
  728 + CanOutQty:plist.CanOutQty,
  729 + lock_num:lock_num
  730 + }
  731 +
  732 + if (plist.CanOutQty < lock_num + buy_num) {
  733 + if(!is_no_msg) {
  734 + wx.showToast({
  735 + title: "该商品在门店未找到库存",
  736 + icon: 'none',
  737 + duration: 2000
  738 + })
  739 + }
  740 + return false;
  741 + }
  742 + if(is_no_msg) return true;
  743 + func();
  744 + }
  745 +
  746 + },
  747 +
  748 + find_lock_num(pick_id, lock) {
  749 + var lock_num = 0;
  750 + if (!lock) return 0;
  751 + if (lock.length < 0) return 0;
  752 + for (var i in lock) {
  753 + if (pick_id == lock[i].pickupId) {
  754 + lock_num += lock[i].outQty;
  755 + }
  756 + }
  757 + return lock_num;
  758 + },
  759 +
  760 +
651 /** 761 /**
652 * 增加数量 762 * 增加数量
653 */ 763 */
@@ -664,13 +774,17 @@ Page({ @@ -664,13 +774,17 @@ Page({
664 this.data.changing = 1; 774 this.data.changing = 1;
665 775
666 var index = e.currentTarget.dataset.index; 776 var index = e.currentTarget.dataset.index;
667 - this.data.sele_g = this.data.list[index]; 777 + this.data.sele_g = th.data.list[index];
668 this.data.sele_index = index; 778 this.data.sele_index = index;
669 - th.data.goodsInputNum = this.data.sele_g.num + 1;  
670 - if (this.data.sele_g.cart_num) {  
671 - th.data.s_cart_num = this.data.sele_g.cart_num + 1;  
672 - }  
673 - th.add_cart_func(); 779 + th.data.goodsInputNum = th.data.sele_g.num + 1;
  780 +
  781 + th.check_pk_store_conut(function(){
  782 + if (th.data.sele_g.cart_num) {
  783 + th.data.s_cart_num = th.data.sele_g.cart_num + 1;
  784 + }
  785 + th.add_cart_func();
  786 + })
  787 +
674 }, 788 },
675 789
676 /** 790 /**
@@ -1581,11 +1695,19 @@ Page({ @@ -1581,11 +1695,19 @@ Page({
1581 //只是单纯的选择门店 1695 //只是单纯的选择门店
1582 if (this.data.only) { 1696 if (this.data.only) {
1583 this.data.only = 0; 1697 this.data.only = 0;
  1698 + this.data.sales_map={};
  1699 +
1584 return false; 1700 return false;
1585 } 1701 }
1586 - th.check_is_in_cart(function () {  
1587 - th.add_cart_func(); 1702 +
  1703 + //-- 判断一下库存 --
  1704 + th.check_pk_store_conut(function(){
  1705 + th.check_is_in_cart(function () {
  1706 + th.add_cart_func();
  1707 + })
1588 }) 1708 })
  1709 +
  1710 +
1589 }, 1711 },
1590 1712
1591 1713
@@ -2116,7 +2238,7 @@ Page({ @@ -2116,7 +2238,7 @@ Page({
2116 getApp().request.get("/api/weshop/cart/list", { 2238 getApp().request.get("/api/weshop/cart/list", {
2117 data: req, 2239 data: req,
2118 success: async function (e) { 2240 success: async function (e) {
2119 - if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length) { 2241 + if(ut.ajax_ok(e)) {
2120 var map = {}; 2242 var map = {};
2121 var mlist = e.data.data.pageData; 2243 var mlist = e.data.data.pageData;
2122 th.data.cart_list = mlist; 2244 th.data.cart_list = mlist;
@@ -2127,6 +2249,8 @@ Page({ @@ -2127,6 +2249,8 @@ Page({
2127 if (item.prom_id != th.data.act.id) continue; 2249 if (item.prom_id != th.data.act.id) continue;
2128 map[item.goods_id] = item; 2250 map[item.goods_id] = item;
2129 } 2251 }
  2252 +
  2253 + //-- 循环活动的从表 --
2130 for (let j in th.data.list) { 2254 for (let j in th.data.list) {
2131 let item_j = th.data.list[j]; 2255 let item_j = th.data.list[j];
2132 item_j.current_price = item_j.shop_price; 2256 item_j.current_price = item_j.shop_price;
@@ -2144,6 +2268,16 @@ Page({ @@ -2144,6 +2268,16 @@ Page({
2144 if (map[item_j.goods_id]) { 2268 if (map[item_j.goods_id]) {
2145 var cart_num = map[item_j.goods_id].goods_num; 2269 var cart_num = map[item_j.goods_id].goods_num;
2146 item_j.num = cart_num; 2270 item_j.num = cart_num;
  2271 + item_j.pickup_no = map[item_j.goods_id].pickup_no;
  2272 + item_j.pick_id = map[item_j.goods_id].pick_id;
  2273 +
  2274 + //判断库存是不是存在
  2275 + var can_qty=await th.check_pk_store_conut(null,1,item_j,cart_num);
  2276 + if(!can_qty){
  2277 + item_j.num=0;
  2278 + continue;
  2279 + }
  2280 +
2147 item_j.cart_num = cart_num; 2281 item_j.cart_num = cart_num;
2148 item_j.cart_id = map[item_j.goods_id].id; 2282 item_j.cart_id = map[item_j.goods_id].id;
2149 if (item_j.buyqty > 0) { 2283 if (item_j.buyqty > 0) {
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
@@ -952,8 +952,14 @@ Page({ @@ -952,8 +952,14 @@ Page({
952 tt(); 952 tt();
953 }, 953 },
954 fail: function (res) { 954 fail: function (res) {
955 - ee.data.share_img_localpath= "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
956 - tt(); 955 + //获取默认空白图
  956 + wx.getImageInfo({
  957 + src: os.imghost+'/miniapp/images/default_g_img.gif',
  958 + success: function(res) {
  959 + ee.data.share_img_localpath = res.path; //分享的图片不能用网络的
  960 + tt();
  961 + }
  962 + })
957 } 963 }
958 }); 964 });
959 }, 965 },
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -5375,8 +5375,14 @@ Page({ @@ -5375,8 +5375,14 @@ Page({
5375 tt(); 5375 tt();
5376 }, 5376 },
5377 fail: function (res) { 5377 fail: function (res) {
5378 - ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
5379 - tt(); 5378 + //获取默认空白图
  5379 + wx.getImageInfo({
  5380 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  5381 + success: function(res) {
  5382 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  5383 + tt();
  5384 + }
  5385 + })
5380 } 5386 }
5381 }); 5387 });
5382 }, 5388 },
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -2894,7 +2894,25 @@ Page({ @@ -2894,7 +2894,25 @@ Page({
2894 //share_goods_img?share_goods_img:th.data.data.share_goods_img; 2894 //share_goods_img?share_goods_img:th.data.data.share_goods_img;
2895 //---中间大图--- 2895 //---中间大图---
2896 context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); 2896 context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
  2897 + //---自定义海报 产品质量保证
  2898 + if(th.data.poster.show_quality==1 ){
  2899 + var g_path = "/images/share/s_gou.png";
  2900 + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);
  2901 + context.setFillStyle("red")
  2902 + context.setFontSize(18 * unit)
  2903 + context.fillText("正品保证", 84 * unit, 690 * unit);
  2904 +
  2905 + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);
  2906 + context.setFillStyle("red")
  2907 + context.setFontSize(18 * unit)
  2908 + context.fillText("纯实体店", 246 * unit, 690 * unit);
  2909 +
  2910 + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);
  2911 + context.setFillStyle("red")
  2912 + context.setFontSize(18 * unit)
  2913 + context.fillText("官方验证", 420 * unit, 690 * unit);
2897 2914
  2915 + }
2898 2916
2899 //---画线--- 2917 //---画线---
2900 context.setLineWidth(1 * unit) 2918 context.setLineWidth(1 * unit)
@@ -3148,8 +3166,14 @@ Page({ @@ -3148,8 +3166,14 @@ Page({
3148 tt(); 3166 tt();
3149 }, 3167 },
3150 fail: function (res) { 3168 fail: function (res) {
3151 - ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
3152 - tt(); 3169 + //获取默认空白图
  3170 + wx.getImageInfo({
  3171 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  3172 + success: function(res) {
  3173 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  3174 + tt();
  3175 + }
  3176 + })
3153 } 3177 }
3154 }); 3178 });
3155 }, 3179 },
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
524 <view class="shopping-cart cart-ico new_split"> 524 <view class="shopping-cart cart-ico new_split">
525 <navigator open-type="switchTab" url="/pages/cart/cart/cart"> 525 <navigator open-type="switchTab" url="/pages/cart/cart/cart">
526 <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> 526 <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image>
527 - <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> 527 + <!-- <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> -->
528 <view>购物车</view> 528 <view>购物车</view>
529 </navigator> 529 </navigator>
530 </view> 530 </view>
packageC/pages/presell/pregoodsInfo/goodsInfo.js
@@ -3115,8 +3115,14 @@ Page({ @@ -3115,8 +3115,14 @@ Page({
3115 tt(); 3115 tt();
3116 }, 3116 },
3117 fail: function (res) { 3117 fail: function (res) {
3118 - ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
3119 - tt(); 3118 + //获取默认空白图
  3119 + wx.getImageInfo({
  3120 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  3121 + success: function(res) {
  3122 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  3123 + tt();
  3124 + }
  3125 + })
3120 } 3126 }
3121 }); 3127 });
3122 }, 3128 },
packageD/pages/user/coupons/coupons.js
@@ -11,10 +11,10 @@ const { @@ -11,10 +11,10 @@ const {
11 qrcode 11 qrcode
12 } = require('../../../../utils/index.js'); 12 } = require('../../../../utils/index.js');
13 let _this = null; 13 let _this = null;
14 - 14 +
15 Page({ 15 Page({
16 data: { 16 data: {
17 - 17 + iurl: getApp().globalData.setting.imghost,
18 val:false, 18 val:false,
19 datet: "", 19 datet: "",
20 dates: "", 20 dates: "",
@@ -96,9 +96,47 @@ Page({ @@ -96,9 +96,47 @@ Page({
96 96
97 97
98 }, 98 },
99 - 99 + //跳转商品
  100 + nvShop(){
  101 + let url= '/pages/goods/goodsList/goodsList'
  102 + getApp().goto(url)
  103 + },
  104 + //跳转商品详情
  105 + nvShopInfo(e){
  106 + let useobjectid = e.currentTarget.dataset.useobjectid;
  107 + //------------------------------------------------
  108 + getApp().request.get('/api/weshop/goods/list', {
  109 + data: {
  110 + store_id: os.stoid,
  111 + erpwareid: useobjectid,
  112 + },
  113 + success(res) {
  114 + if (res.data.code ==0) {
  115 + let good = res.data.data;
  116 + if (good.length>0) {
  117 + let item = good[0]
  118 + let url = `/pages/goods/goodsInfo/goodsInfo?goods_id=${item.goods_id}&prom_type=${item.prom_type}&prom_id=${item.prom_id}`
  119 + getApp().goto(url)
  120 + }else{
  121 + getApp().showWarning("未找到该商品");
  122 + }
  123 + }
  124 + }
  125 + })
100 126
101 - 127 +
  128 +
  129 + // wx.reLaunch({
  130 + // url: '/pages/goods/goodsInfo/goodsInfo',
  131 + // })
  132 +
  133 +
  134 +
  135 +
  136 +
  137 +
  138 + //------------------------------------------------
  139 + },
102 140
103 // 点击选中二维码 141 // 点击选中二维码
104 click: function (e) { 142 click: function (e) {
packageD/pages/user/coupons/coupons.wxml
@@ -20,11 +20,15 @@ @@ -20,11 +20,15 @@
20 <view class="fs28 ellipsis-1x">包邮券</view> 20 <view class="fs28 ellipsis-1x">包邮券</view>
21 <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view> 21 <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view>
22 </view> 22 </view>
23 - <view class="shrink0"><text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.no}}">{{filter.showBtnText(currentIndex)}}</text></view> 23 + <view class="shrink0"><text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'nvShop':''}}" data-index="{{idx}}" data-cashrepno="{{detail.no}}">{{filter.showBtnText(currentIndex)}}</text></view>
24 </view> 24 </view>
25 - <view class="c-time"> 25 + <view class="flex jc_sb ai_c c-time">
26 <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}} 至 {{time.format_time(detail.use_end_time)}}</text> 26 <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}} 至 {{time.format_time(detail.use_end_time)}}</text>
27 <text wx:else>有效期:不限</text> 27 <text wx:else>有效期:不限</text>
  28 + <!-- <image bindtap="clickUse" data-index="{{idx}}" data-cashrepno="{{detail.no}}" style="height: 42rpx ;width: 42rpx;border: 2px solid #fe9db5;background: #fe9db5;" src="{{iurl}}/miniapp/images/qrcode1.png"></image> -->
  29 + <image bindtap="clickUse" data-index="{{idx}}" data-cashrepno="{{detail.no}}" style="height: 52rpx ;width: 52rpx;" src="{{iurl}}/miniapp/images/qrcode_img.png"></image>
  30 + <!-- <text class="iconfont icon-erweima" bindtap="clickUse" style="color: black;" data-index="{{idx}}" data-cashrepno="{{detail.no}}" ></text> -->
  31 +
28 </view> 32 </view>
29 </view> 33 </view>
30 </view> 34 </view>
@@ -46,15 +50,17 @@ @@ -46,15 +50,17 @@
46 <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}}</view> 50 <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}}</view>
47 </view> 51 </view>
48 <view class="shrink0"> 52 <view class="shrink0">
49 - <text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}">{{filter.showBtnText(currentIndex)}}</text> 53 + <text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? ( detail.UseObjectID==null || detail.UseObjectID== '' ? 'nvShop' : (detail.UseObjectType==20 ? 'nvShopInfo' :'clickUse') ):''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}" data-useobjectid="{{detail.UseObjectID}}">{{filter.showBtnText(currentIndex)}}</text>
50 </view> 54 </view>
51 </view> 55 </view>
52 - <view class="c-time"> 56 + <view class="c-time flex jc_sb ai_c">
53 <text wx:if="{{detail.ValidDate}}" class="ellipsis-1x">有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}}</text> 57 <text wx:if="{{detail.ValidDate}}" class="ellipsis-1x">有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}}</text>
54 <text wx:else>有效期:不限</text> 58 <text wx:else>有效期:不限</text>
  59 + <!-- <image wx:if="{{detail.UseObjectID==null || detail.UseObjectID=='' || detail.UseObjectType==20}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}" style="height: 42rpx ;width: 42rpx;border: 2px solid #fe9db5;background: #fe9db5;" src="{{iurl}}/miniapp/images/qrcode1.png"></image> -->
  60 + <image wx:if="{{detail.UseObjectID==null || detail.UseObjectID=='' || detail.UseObjectType==20}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}" style="height: 52rpx ;width: 52rpx;" src="{{iurl}}/miniapp/images/qrcode_img.png"></image>
55 </view> 61 </view>
56 </view> 62 </view>
57 - </view> 63 + </view>
58 </view> 64 </view>
59 <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}"> 65 <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}">
60 <view class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:if="{{detail.Remark1!=''}}"><text style="margin-right: 15rpx">使用说明:</text>{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}};活动名称:{{detail.ActName}}、活动编号:{{detail.ActNo}}</view> 66 <view class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:if="{{detail.Remark1!=''}}"><text style="margin-right: 15rpx">使用说明:</text>{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}};活动名称:{{detail.ActName}}、活动编号:{{detail.ActNo}}</view>
pages/user/Detailed/Detailed.js renamed to packageE/pages/user/Detailed/Detailed.js
@@ -3,9 +3,9 @@ var t = getApp(), @@ -3,9 +3,9 @@ var t = getApp(),
3 a = t.request, 3 a = t.request,
4 o = t.globalData.setting, 4 o = t.globalData.setting,
5 os = o, 5 os = o,
6 - i = require("../../../utils/util.js"), 6 + i = require("../../../../utils/util.js"),
7 ut = i, 7 ut = i,
8 - s = require("../../../utils/common.js"); 8 + s = require("../../../../utils/common.js");
9 9
10 Page({ 10 Page({
11 /** 11 /**
@@ -222,12 +222,12 @@ Page({ @@ -222,12 +222,12 @@ Page({
222 //开启画布 222 //开启画布
223 const ctx = wx.createCanvasContext('myCanvas'); 223 const ctx = wx.createCanvasContext('myCanvas');
224 //先画背景 224 //先画背景
225 - ctx.drawImage("../../../images/share/mackground.png", 0, 0, 554 * unit, 899 * unit); 225 + ctx.drawImage("../../../../images/share/mackground.png", 0, 0, 554 * unit, 899 * unit);
226 ctx.setFontSize(24 * unit); 226 ctx.setFontSize(24 * unit);
227 ctx.setFillStyle("rgb(0,0,0)"); 227 ctx.setFillStyle("rgb(0,0,0)");
228 ctx.fillText(nickname, 152 * unit, 76 * unit); 228 ctx.fillText(nickname, 152 * unit, 76 * unit);
229 var width = 24 * nickname.length * unit + 2 * unit; 229 var width = 24 * nickname.length * unit + 2 * unit;
230 - var tj_path = "../../../images/share/q_tj.png"; 230 + var tj_path = "../../../../images/share/q_tj.png";
231 ctx.drawImage(tj_path, 152 * unit + width, 54 * unit, 95 * unit, 30 * unit); 231 ctx.drawImage(tj_path, 152 * unit + width, 54 * unit, 95 * unit, 30 * unit);
232 ctx.setFontSize(18 * unit); 232 ctx.setFontSize(18 * unit);
233 ctx.setLineJoin('round'); //交点设置成圆角 233 ctx.setLineJoin('round'); //交点设置成圆角
pages/user/Detailed/Detailed.json renamed to packageE/pages/user/Detailed/Detailed.json
pages/user/Detailed/Detailed.wxml renamed to packageE/pages/user/Detailed/Detailed.wxml
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 5
6 <picker class='pi' mode="date" value='{{datet}}' start="2019/1/1" bindchange='bindDateChenge'> 6 <picker class='pi' mode="date" value='{{datet}}' start="2019/1/1" bindchange='bindDateChenge'>
7 <view class="rq-rim"> 7 <view class="rq-rim">
8 - <view class='kssj'><text class="wz"name="datat"value='{{datet}}'bindinput='watchPassWord'>{{datet}}</text></view> 8 + <view class='kssj'><text class="wz"name="datat" value='{{datet}}' bindinput='watchPassWord'>{{datet}}</text></view>
9 <!-- 清除输入框中的内容--> 9 <!-- 清除输入框中的内容-->
10 <view hidden='{{isBind}}' class="qc-rim"> 10 <view hidden='{{isBind}}' class="qc-rim">
11 <button class="empty" catchtap="eliminate">x</button> 11 <button class="empty" catchtap="eliminate">x</button>
pages/user/Detailed/Detailed.wxss renamed to packageE/pages/user/Detailed/Detailed.wxss
pages/user/user_fw/user_fw.js renamed to packageE/pages/user/user_fw/user_fw.js
1 // pages/user/userfw/userfw.js 1 // pages/user/userfw/userfw.js
2 var e = getApp(),os = e.globalData.setting; 2 var e = getApp(),os = e.globalData.setting;
3 -var utils = require('../../../utils/util.js');  
4 -var regeneratorRuntime = require('../../../utils/runtime.js'); 3 +var utils = require('../../../../utils/util.js');
  4 +var regeneratorRuntime = require('../../../../utils/runtime.js');
5 5
6 Page({ 6 Page({
7 /** 7 /**
pages/user/user_fw/user_fw.json renamed to packageE/pages/user/user_fw/user_fw.json
pages/user/user_fw/user_fw.wxml renamed to packageE/pages/user/user_fw/user_fw.wxml
1 -<wxs module="filter" src="../../../utils/filter.wxs"></wxs> 1 +<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 <view class="xc-page"> 2 <view class="xc-page">
3 <view class="items t-c" bindtap="open_fw" wx:for="{{fw_list}}" 3 <view class="items t-c" bindtap="open_fw" wx:for="{{fw_list}}"
4 data-ind="{{index}}" > 4 data-ind="{{index}}" >
pages/user/user_fw/user_fw.wxss renamed to packageE/pages/user/user_fw/user_fw.wxss
pages/cart/cart/cart.js
@@ -28,6 +28,7 @@ Page({ @@ -28,6 +28,7 @@ Page({
28 up_dating: 0, //更新中 28 up_dating: 0, //更新中
29 isreduce: 0, //商品数量是否可减 29 isreduce: 0, //商品数量是否可减
30 isadd: 0, //是否可以加商品数量 30 isadd: 0, //是否可以加商品数量
  31 + invalidList:[], //失效商品列表
31 32
32 card_field:"", 33 card_field:"",
33 bconf:null, 34 bconf:null,
@@ -65,7 +66,9 @@ Page({ @@ -65,7 +66,9 @@ Page({
65 onShow: function () { 66 onShow: function () {
66 //每次显示都清空 67 //每次显示都清空
67 this.data.in_zhact_gdmap = {}; 68 this.data.in_zhact_gdmap = {};
68 - 69 + this.setData({
  70 + invalidList:[]
  71 + });
69 72
70 if (typeof this.getTabBar === 'function' && this.getTabBar()) { 73 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
71 var index = getApp().getPageIndex(this); 74 var index = getApp().getPageIndex(this);
@@ -164,9 +167,39 @@ Page({ @@ -164,9 +167,39 @@ Page({
164 onUnLoad() { 167 onUnLoad() {
165 getApp().globalData.cart_zh_act = null; 168 getApp().globalData.cart_zh_act = null;
166 }, 169 },
  170 +
  171 + //失效商品处理
  172 + // invType 表示失效的原因,classType 表示类别 0 表示商品,1表示服务
  173 + disInvalid(item,invType=0,classType=0){
  174 + let invalidList = this.data.invalidList;
  175 + let off = true;
  176 + console.log('失效商品-----1')
  177 + console.log(item)
  178 + console.log('失效商品-----2')
  179 + invalidList.map(ite=>{
  180 + if(classType ==0 && ite.goods_id == item.goods_id){ //判断该商品是否存在于失效列表中
  181 + off = false;
  182 + }
  183 + if(classType ==1 && ite.service_id == item.service_id){ //判断该商品是否存在于失效列表中
  184 + off = false;
  185 + }
  186 + });
  187 + if(off){
  188 + if(invType==0){
  189 + item.invalid = '商品活动变动';
  190 + }else if(invType ==1){
  191 + item.invalid = '商品已下架';
  192 + }else{
  193 + item.invalid ="商品超出限购"
  194 + }
  195 + item.classType = classType
  196 + invalidList.push(item);
  197 + this.setData({invalidList});
  198 + }
  199 + },
167 //-------------获取购物车列表,要安装门店进行分类订单----------- 200 //-------------获取购物车列表,要安装门店进行分类订单-----------
168 getCardList: function () { 201 getCardList: function () {
169 - 202 + this.setData({invalidList:[]}); //重置失效商品
170 var th = this; 203 var th = this;
171 204
172 //要获取会员是不是等级会员 205 //要获取会员是不是等级会员
@@ -218,6 +251,156 @@ Page({ @@ -218,6 +251,156 @@ Page({
218 }, 800) 251 }, 800)
219 } 252 }
220 }, 253 },
  254 + //失效单选
  255 + inCheck_th_item: async function(e){
  256 + console.log('失效单选');
  257 + console.log(e);
  258 + let i = e.currentTarget.dataset.item;
  259 + let invalidList = this.data.invalidList;
  260 + console.log(i)
  261 + console.log(invalidList[i])
  262 + invalidList[i].selected = invalidList[i].selected == 1 ? 0 : 1;
  263 + console.log(invalidList);
  264 + this.setData({invalidList});
  265 + console.log(this.data.invalidList);
  266 + // this.doCheckAll();
  267 +
  268 + },
  269 + //清空失效宝贝
  270 + delInva(obj=null){
  271 + let ainvalid='';
  272 + let binvalid='';
  273 + var user_id = getApp().globalData.user_id;
  274 + var th = this;
  275 + let ab = 0; //选中
  276 + let abc = 0; //
  277 + let arr = obj.id ? [obj] : this.data.invalidList
  278 + console.log('失效-----')
  279 + console.log(arr);
  280 + arr.map(item=>{
  281 + if (item.classType ==0 ) {
  282 + ainvalid+=item.id + ',';
  283 + ab = 1;
  284 + }
  285 + if (item.classType ==1 ) {
  286 + binvalid+=item.id + ',';
  287 + abc = 1;
  288 + }
  289 + });
  290 +
  291 +
  292 + if (ab == 0 && abc == 0 ) {
  293 + t.my_warnning('没有需要清空的失效宝贝', 0, th);
  294 + return false;
  295 + }
  296 + if (ab) {
  297 + ainvalid = ainvalid.substring(0, ainvalid.length - 1);
  298 + //要删除购物车中的商品
  299 + var url = '/api/weshop/cart/delIds/' + oo.stoid + '/' + user_id + '/' + ainvalid;
  300 + getApp().request.delete(url, {
  301 + success: function (t) {
  302 + th.getCardList();
  303 + getApp().requestCardNum(th);
  304 + }
  305 + });
  306 + }
  307 + if (abc) {
  308 + binvalid = binvalid.substring(0, binvalid.length - 1);
  309 + //要删除购物车中的商品
  310 + var url = '/api/weshop/cartService/delIds/' + oo.stoid + '/' + user_id + '/' + binvalid;
  311 + getApp().request.delete(url, {
  312 + success: function (t) {
  313 + th.getCardList();
  314 + getApp().requestCardNum(th);
  315 + }
  316 + });
  317 + }
  318 + },
  319 +
  320 + //---------点击收藏------------
  321 + collectGoods: async function () {
  322 +
  323 + let t = this
  324 + let timestamp = Date.parse(new Date());
  325 + timestamp = timestamp / 1000;
  326 + let d = {
  327 + // goods_id: t.data.data.goods_id,
  328 + user_id: app.globalData.user_id,
  329 + store_id: oo.stoid,
  330 + add_time: timestamp,
  331 + };
  332 + //加入收藏夹就是导购的ID
  333 + if (getApp().globalData.guide_id) {
  334 + d.guide_id = getApp().globalData.guide_id;
  335 + d.guide_type = 2;
  336 + }
  337 + let off = false
  338 + let errOff = false
  339 + var invalidList= [...this.data.invalidList]
  340 + var arr=[]
  341 + invalidList.map(async (item,index)=>{
  342 + if (item.selected) {
  343 + off = true
  344 + if(item.classType ==1 ){
  345 + d.goods_id = item.service_id
  346 + d.type = 1
  347 + }else{
  348 + d.goods_id = item.goods_id
  349 + d.type =0
  350 + }
  351 + let is_collect = 0
  352 + //------是否收藏----------
  353 + await getApp().request.promiseGet("/api/weshop/goodscollect/page", {
  354 + data: {
  355 + store_id: oo.stoid,
  356 + goods_id: d.goods_id,
  357 + user_id: app.globalData.user_id,
  358 + }
  359 + }).then(res => {
  360 + let t = res;
  361 + let data = t.data.data.pageData;
  362 + if (data && data.length > 0) {
  363 + is_collect =1
  364 + }
  365 + })
  366 + if (is_collect) {
  367 + t.delInva(item)
  368 + return
  369 + }
  370 + await getApp().request.post("/api/weshop/goodscollect/save", { //添加收藏
  371 + data: d,
  372 + success: function (e) {
  373 + t.data.is_collect_load = 0;
  374 + if (e.data.code == 0) {
  375 + t.delInva(item)
  376 + }else{
  377 + errOff = true
  378 + arr.push(item)
  379 + }
  380 + }
  381 + });
  382 + }else{
  383 + arr.push(item)
  384 + }
  385 + });
  386 + if (off) {
  387 + t.setData({
  388 + invalidList:arr
  389 + })
  390 + if (errOff) {
  391 + getApp().my_warnning('移到收藏夹错误', 0, t);
  392 + }else{
  393 + wx.showToast({
  394 + title: "收藏成功",
  395 + icon: 'none',
  396 + duration: 2000
  397 + })
  398 + }
  399 + console.log('移动成功')
  400 + }else{
  401 + getApp().my_warnning('请先选择失效宝贝', 0, t);
  402 + }
  403 + },
221 404
222 //-----真的获取购物车-------- 405 //-----真的获取购物车--------
223 get_cart: function () { 406 get_cart: function () {
@@ -287,10 +470,11 @@ Page({ @@ -287,10 +470,11 @@ Page({
287 var tt = ut.gettimestamp(); 470 var tt = ut.gettimestamp();
288 //如果商品下架了,或者商品是赠品,一开始都要清除 471 //如果商品下架了,或者商品是赠品,一开始都要清除
289 if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0) { 472 if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0) {
290 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
291 - getApp().request.delete(url, {  
292 - success: function (t) {}  
293 - }); 473 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  474 + // getApp().request.delete(url, {
  475 + // success: function (t) {}
  476 + // });
  477 + th.disInvalid(item,1);
294 //商品已经下架 478 //商品已经下架
295 continue; 479 continue;
296 } 480 }
@@ -307,8 +491,9 @@ Page({ @@ -307,8 +491,9 @@ Page({
307 if (item.goods_num + goodsbuynum > limit && limit > 0) { 491 if (item.goods_num + goodsbuynum > limit && limit > 0) {
308 var cbuy = limit - goodsbuynum; 492 var cbuy = limit - goodsbuynum;
309 if (cbuy <= 0) { 493 if (cbuy <= 0) {
310 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
311 - a.delete(url, {}); 494 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  495 + // a.delete(url, {});
  496 + th.disInvalid(item,2);
312 continue; 497 continue;
313 } 498 }
314 //-- 购物车更新 -- 499 //-- 购物车更新 --
@@ -323,23 +508,72 @@ Page({ @@ -323,23 +508,72 @@ Page({
323 }) 508 })
324 item.goods_num = cbuy; 509 item.goods_num = cbuy;
325 } 510 }
326 - 511 + //判断如果是普通商品,后面参加活动了,变成失效商品
  512 + if (item.prom_type == 0) {
  513 + var prom = null;
  514 + var now = ut.gettimestamp();
  515 + await getApp().request.promiseGet(`/api/weshop/activitylist/listGoodActInfo2`, {
  516 + data:{
  517 + "store_id": oo.stoid,
  518 + "goods_id": item.goods_id,
  519 + "user_id": user_id,
  520 + }
  521 + }).then(res => {
  522 + if (res.data.code == 0) {
  523 + prom = res.data.data
  524 + }
  525 + })
  526 + let prom_true = 0
  527 + let prom_id=0
  528 + if (prom) {
  529 + prom.map(item=>{
  530 + if (item.prom_type==3 || item.prom_type==7) {
  531 + prom_true = item.prom_type
  532 + prom_id = item.act_id
  533 + }
  534 + })
  535 + }
  536 + if (prom_true) {
  537 + //-- 购物车更新 --
  538 + var updata1 = {
  539 + id: item.id,
  540 + prom_type: prom_true,
  541 + prom_id,
  542 + store_id: os.stoid,
  543 + user_id: getApp().globalData.userInfo.user_id
  544 + };
  545 + item.prom_id = prom_id
  546 + item.prom_type = prom_true
  547 + getApp().request.put("/api/weshop/cart/update", {
  548 + data: updata1,
  549 + })
  550 +
  551 + }else{
  552 + if(prom && !item.is_integral_normal && !item.is_pd_normal){
  553 + th.disInvalid(item);
  554 + continue;
  555 + }
  556 + }
  557 + }
327 //如果秒杀活动都去掉了,或者结束了,那么这个商品也没有必要留着 558 //如果秒杀活动都去掉了,或者结束了,那么这个商品也没有必要留着
328 if (item.prom_type == 1) { 559 if (item.prom_type == 1) {
329 var prom = null; 560 var prom = null;
330 var now = ut.gettimestamp(); 561 var now = ut.gettimestamp();
331 await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + '/' + user_id + "/" + item.prom_id, {}).then(res => { 562 await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + '/' + user_id + "/" + item.prom_id, {}).then(res => {
332 - if (res.data.code == 0) { 563 + console.log('活动情况----------------')
  564 + console.log(res)
  565 + if (res.data.code == 0) {
333 prom = res.data.data; 566 prom = res.data.data;
334 prom.price = prom.user_price; 567 prom.price = prom.user_price;
335 } 568 }
336 }) 569 })
337 //---如果互动都已经过期,或者还未开始,或者无活动 570 //---如果互动都已经过期,或者还未开始,或者无活动
338 if (!prom || prom.is_end == 1 || prom.end_time < now || prom.start_time > now) { 571 if (!prom || prom.is_end == 1 || prom.end_time < now || prom.start_time > now) {
339 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
340 - a.delete(url, {  
341 - success: function (t) {}  
342 - }); 572 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  573 + // a.delete(url, {
  574 + // success: function (t) {}
  575 + // });
  576 + th.disInvalid(item);
343 //商品已经下架 577 //商品已经下架
344 continue; 578 continue;
345 } 579 }
@@ -348,8 +582,9 @@ Page({ @@ -348,8 +582,9 @@ Page({
348 if (item.goods_num + promgoodsbuynum > prom.buy_limit && prom.buy_limit > 0) { 582 if (item.goods_num + promgoodsbuynum > prom.buy_limit && prom.buy_limit > 0) {
349 var cbuy = prom.buy_limit - promgoodsbuynum; 583 var cbuy = prom.buy_limit - promgoodsbuynum;
350 if (cbuy <= 0) { 584 if (cbuy <= 0) {
351 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
352 - a.delete(url, {}); 585 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  586 + // a.delete(url, {});
  587 + th.disInvalid(item,2);
353 continue; 588 continue;
354 } 589 }
355 //-- 购物车更新 -- 590 //-- 购物车更新 --
@@ -380,6 +615,30 @@ Page({ @@ -380,6 +615,30 @@ Page({
380 }) 615 })
381 } 616 }
382 } 617 }
  618 + // 判断团购活动都去掉了,或者结束了,那么这个商品也没有必要留着
  619 + else if(item.prom_type ==2){
  620 + var prom = null;
  621 + var now = ut.gettimestamp();
  622 + await getApp().request.promiseGet('/api/weshop/goods/groupBuy/getActInfo/' + item.goods_id + '/' + user_id + '/' + item.prom_id, {}).then(res => {
  623 + if (res.data.code == 0) {
  624 + prom = res.data.data;
  625 + prom.price = prom.user_price;
  626 + }
  627 + });
  628 + //---如果互动都已经过期,或者还未开始,或者无活动
  629 + if (!prom || prom.is_end == 1 || prom.end_time < now || prom.start_time > now) {
  630 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  631 + // a.delete(url, {
  632 + // success: function (t) {}
  633 + // });
  634 + console.log('团购活动-----');
  635 + th.disInvalid(item);
  636 + //商品已经下架
  637 + continue;
  638 + }
  639 +
  640 +
  641 + }
383 //--判断优惠活动有没有过期,-- 642 //--判断优惠活动有没有过期,--
384 else if (item.prom_type == 3) { 643 else if (item.prom_type == 3) {
385 var isok = 1,is_g_prom=0; 644 var isok = 1,is_g_prom=0;
@@ -405,23 +664,26 @@ Page({ @@ -405,23 +664,26 @@ Page({
405 if (res.data.code == 0) { 664 if (res.data.code == 0) {
406 var r_data = res.data.data; 665 var r_data = res.data.data;
407 if (!r_data.promGoodsLists) { 666 if (!r_data.promGoodsLists) {
408 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
409 - getApp().request.delete(url, {}); 667 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  668 + // getApp().request.delete(url, {});
  669 + th.disInvalid(item);
410 //商品已经无活动 670 //商品已经无活动
411 isok = 0; 671 isok = 0;
412 } else { 672 } else {
413 //如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了 673 //如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了
414 if (item.prom_id != r_data.promGoodsLists[0].prom_id) { 674 if (item.prom_id != r_data.promGoodsLists[0].prom_id) {
415 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
416 - getApp().request.delete(url, {}); 675 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  676 + // getApp().request.delete(url, {});
  677 + th.disInvalid(item);
417 //商品已经下架 678 //商品已经下架
418 isok = 0; 679 isok = 0;
419 } 680 }
420 } 681 }
421 682
422 } else { 683 } else {
423 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
424 - getApp().request.delete(url, {}); 684 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  685 + // getApp().request.delete(url, {});
  686 + th.disInvalid(item);
425 //商品已经下架 687 //商品已经下架
426 isok = 0; 688 isok = 0;
427 } 689 }
@@ -432,23 +694,26 @@ Page({ @@ -432,23 +694,26 @@ Page({
432 if (res.data.code == 0) { 694 if (res.data.code == 0) {
433 var r_data = res.data.data; 695 var r_data = res.data.data;
434 if (!r_data.promGoodsLists) { 696 if (!r_data.promGoodsLists) {
435 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
436 - getApp().request.delete(url, {}); 697 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  698 + // getApp().request.delete(url, {});
  699 + th.disInvalid(item);
437 //商品已经无活动 700 //商品已经无活动
438 isok = 0; 701 isok = 0;
439 } else { 702 } else {
440 //如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了 703 //如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了
441 if (item.prom_id != r_data.promGoodsLists[0].prom_id) { 704 if (item.prom_id != r_data.promGoodsLists[0].prom_id) {
442 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
443 - getApp().request.delete(url, {}); 705 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  706 + // getApp().request.delete(url, {});
  707 + th.disInvalid(item);
444 //商品已经下架 708 //商品已经下架
445 isok = 0; 709 isok = 0;
446 } 710 }
447 } 711 }
448 712
449 } else { 713 } else {
450 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
451 - getApp().request.delete(url, {}); 714 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  715 + // getApp().request.delete(url, {});
  716 + th.disInvalid(item,1);
452 //商品已经下架 717 //商品已经下架
453 isok = 0; 718 isok = 0;
454 } 719 }
@@ -492,8 +757,9 @@ Page({ @@ -492,8 +757,9 @@ Page({
492 } 757 }
493 }) 758 })
494 if (!isok) { 759 if (!isok) {
495 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
496 - getApp().request.delete(url, {}); 760 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  761 + // getApp().request.delete(url, {});
  762 + th.disInvalid(item);
497 th.data.zuhe_map[item.prom_id] = -1; 763 th.data.zuhe_map[item.prom_id] = -1;
498 continue; 764 continue;
499 } 765 }
@@ -530,8 +796,9 @@ Page({ @@ -530,8 +796,9 @@ Page({
530 return ele.goods_id == item.goods_id 796 return ele.goods_id == item.goods_id
531 }) 797 })
532 if (!t_item) { 798 if (!t_item) {
533 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
534 - getApp().request.delete(url, {}); 799 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  800 + // getApp().request.delete(url, {});
  801 + th.disInvalid(item,1);
535 th.data.zuhe_map[item.prom_id] = -1; 802 th.data.zuhe_map[item.prom_id] = -1;
536 continue; 803 continue;
537 } 804 }
@@ -578,8 +845,9 @@ Page({ @@ -578,8 +845,9 @@ Page({
578 } 845 }
579 }) 846 })
580 if (!isok){ 847 if (!isok){
581 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
582 - getApp().request.delete(url, {}); 848 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  849 + // getApp().request.delete(url, {});
  850 + th.disInvalid(item,1);
583 th.data.ladder_map[item.prom_id]=-1; 851 th.data.ladder_map[item.prom_id]=-1;
584 continue; 852 continue;
585 } 853 }
@@ -818,6 +1086,7 @@ Page({ @@ -818,6 +1086,7 @@ Page({
818 //-----真的获取购物车-------- 1086 //-----真的获取购物车--------
819 get_ser_cart: function () { 1087 get_ser_cart: function () {
820 var th = this; 1088 var th = this;
  1089 + var user_id = getApp().globalData.user_id;
821 var rd = Math.random().toString(36).substr(2, 15); 1090 var rd = Math.random().toString(36).substr(2, 15);
822 getApp().request.get("/api/weshop/cartService/page", { 1091 getApp().request.get("/api/weshop/cartService/page", {
823 data: { 1092 data: {
@@ -841,23 +1110,101 @@ Page({ @@ -841,23 +1110,101 @@ Page({
841 good = res.data.data; 1110 good = res.data.data;
842 }) 1111 })
843 if (!good) { 1112 if (!good) {
844 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
845 - getApp().request.delete(url, {  
846 - success: function (t) {}  
847 - }); 1113 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  1114 + // getApp().request.delete(url, {
  1115 + // success: function (t) {}
  1116 + // });
  1117 + th.disInvalid({
  1118 + ...item,
  1119 + original_img: good.imgUrl
  1120 + },1,1);
848 continue; 1121 continue;
849 } 1122 }
850 - 1123 +
851 //如果商品下架了,或者商品是赠品,一开始都要清除 1124 //如果商品下架了,或者商品是赠品,一开始都要清除
852 if (good.is_show == 0) { 1125 if (good.is_show == 0) {
853 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
854 - getApp().request.delete(url, {  
855 - success: function (t) {}  
856 - }); 1126 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  1127 + // getApp().request.delete(url, {
  1128 + // success: function (t) {}
  1129 + // });
  1130 + th.disInvalid({
  1131 + ...item,
  1132 + original_img: good.imgUrl
  1133 + },1,1);
857 //商品已经下架 1134 //商品已经下架
858 continue; 1135 continue;
859 } 1136 }
860 1137
  1138 + if(item.prom_type ==0){
  1139 + var prom = null;
  1140 + var now = ut.gettimestamp();
  1141 + await getApp().request.promiseGet(`/api/weshop/activitylist/listGoodActInfo2`, {
  1142 + data:{
  1143 + store_id: oo.stoid,
  1144 + goods_id: item.service_id,
  1145 + user_id: user_id,
  1146 + goods_type: 1,
  1147 + }
  1148 + }).then(res => {
  1149 + console.log('服务卡活动信息')
  1150 + console.log(res)
  1151 + console.log('服务卡活动信息-------------')
  1152 + if (res.data.code == 0) {
  1153 + prom = res.data.data
  1154 + }
  1155 + })
  1156 + if(prom){
  1157 + th.disInvalid({
  1158 + ...item,
  1159 + original_img: good.imgUrl
  1160 + },2,1)
  1161 + continue;
  1162 + }
  1163 + }
  1164 +
  1165 + if (item.prom_type == 1) {
  1166 + var prom = null;
  1167 + var now = ut.gettimestamp();
  1168 + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + os.stoid + '/' + user_id + '/' + item.prom_id, {}).then(res => {
  1169 + if (res.data.code == 0) {
  1170 + prom = res.data.data;
  1171 + prom.price = prom.user_price;
  1172 + }
  1173 + });
  1174 + console.log('服务的秒杀信息')
  1175 + console.log(prom)
  1176 + //---如果互动都已经过期,或者还未开始,或者无活动
  1177 + if (!prom || prom.is_end == 1 || prom.end_time < now || prom.start_time > now) {
  1178 + th.disInvalid({
  1179 + ...item,
  1180 + original_img: good.imgUrl
  1181 + },0,1);
  1182 + continue;
  1183 + }
  1184 + //判断秒杀的限购
  1185 + var msNum=0
  1186 + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
  1187 + data: {
  1188 + store_id: os.stoid,
  1189 + user_id: user_id,
  1190 + card_id: prom.goods_id,
  1191 + }
  1192 + }).then(res=>{
  1193 + if (res.data.code==0) {
  1194 + msNum = res.data.data.cardbuynum
  1195 + console.log('秒杀限购:'+msNum)
  1196 + }
  1197 + })
  1198 + }
  1199 + if (msNum && (msNum >= prom.buy_limit) ) {
  1200 + console.log('秒杀限购')
  1201 + th.disInvalid({
  1202 + ...item,
  1203 + original_img: good.imgUrl
  1204 + },2,1)
  1205 + continue;
  1206 + }
  1207 +
861 all_num += item.goods_num; 1208 all_num += item.goods_num;
862 item.img_url = oo.imghost + good.imgUrl; 1209 item.img_url = oo.imghost + good.imgUrl;
863 item.selected = 0; 1210 item.selected = 0;
@@ -912,6 +1259,7 @@ Page({ @@ -912,6 +1259,7 @@ Page({
912 }, 1259 },
913 1260
914 1261
  1262 +
915 //设置莫个门店的所有线下价格 1263 //设置莫个门店的所有线下价格
916 async set_offline(list) { 1264 async set_offline(list) {
917 var th = this; 1265 var th = this;
@@ -1625,6 +1973,11 @@ Page({ @@ -1625,6 +1973,11 @@ Page({
1625 } else { 1973 } else {
1626 if(item[c].prom_type==7){ 1974 if(item[c].prom_type==7){
1627 //先把商品放入组合计算的专用的区域 1975 //先把商品放入组合计算的专用的区域
  1976 + console.log('是组合商品---')
  1977 + console.log(car);
  1978 + console.log(a)
  1979 + console.log(obj)
  1980 + console.log('......................')
1628 zh_calc.add_zhprom(car,a,obj); 1981 zh_calc.add_zhprom(car,a,obj);
1629 }else if(item[c].prom_type==10){ 1982 }else if(item[c].prom_type==10){
1630 ladder_calc.add_ladder_prom(car,a,obj); 1983 ladder_calc.add_ladder_prom(car,a,obj);
@@ -1644,6 +1997,8 @@ Page({ @@ -1644,6 +1997,8 @@ Page({
1644 1997
1645 //总的价格,把组合商品的价格拿出来 1998 //总的价格,把组合商品的价格拿出来
1646 var zh_calc_res=zh_calc.calculate_zh(car,a,th); 1999 var zh_calc_res=zh_calc.calculate_zh(car,a,th);
  2000 + console.log('.组合价-----------')
  2001 + console.log(zh_calc_res)
1647 //总的价格,把阶梯促销商品的价格拿出来 2002 //总的价格,把阶梯促销商品的价格拿出来
1648 var ladder_calc_res=ladder_calc.calculate_ladder(car,a,th); 2003 var ladder_calc_res=ladder_calc.calculate_ladder(car,a,th);
1649 2004
@@ -1725,7 +2080,7 @@ Page({ @@ -1725,7 +2080,7 @@ Page({
1725 2080
1726 function normal_check(store_count, goodsinfo, wareIds) { 2081 function normal_check(store_count, goodsinfo, wareIds) {
1727 //--- 看一下是不是线下库存 --- 2082 //--- 看一下是不是线下库存 ---
1728 - if (th.data.sales_rules == 2 && goodsinfo.prom_type != 7 && !goodsinfo.whsle_id) { 2083 + if (th.data.sales_rules == 2 && !goodsinfo.whsle_id) {
1729 th.check_down_line(t, pitem, item, wareIds); 2084 th.check_down_line(t, pitem, item, wareIds);
1730 } else { 2085 } else {
1731 if (t.goods_num > store_count) { 2086 if (t.goods_num > store_count) {
@@ -2536,6 +2891,23 @@ Page({ @@ -2536,6 +2891,23 @@ Page({
2536 } 2891 }
2537 } 2892 }
2538 } 2893 }
  2894 +
  2895 + //排除失效商品结算
  2896 + this.data.invalidList.map(item=>{
  2897 + if(item.selected && item.classType==0){
  2898 + rq.put('/api/weshop/cart/update', {
  2899 + data: {
  2900 + id: item.id,
  2901 + selected: 0,
  2902 + store_id: oo.stoid
  2903 + },
  2904 + success: function (ee) {
  2905 + console.log(ee);
  2906 + }
  2907 + });
  2908 + }
  2909 + })
  2910 +
2539 if (ab == 0) { 2911 if (ab == 0) {
2540 t.my_warnning("未选择商品", 0, th); 2912 t.my_warnning("未选择商品", 0, th);
2541 wx.hideLoading(); 2913 wx.hideLoading();
@@ -2715,6 +3087,18 @@ Page({ @@ -2715,6 +3087,18 @@ Page({
2715 }); 3087 });
2716 } 3088 }
2717 } 3089 }
  3090 + //排除失效服务结算
  3091 + this.data.invalidList.map(item=>{
  3092 + if(item.selected && item.classType==1){
  3093 + rq.promisePut('/api/weshop/cartService/update', {
  3094 + data: {
  3095 + id: item.id,
  3096 + selected: 0,
  3097 + store_id: oo.stoid
  3098 + }
  3099 + });
  3100 + }
  3101 + })
2718 wx.hideLoading(); 3102 wx.hideLoading();
2719 getApp().goto("/packageA/pages/cart2_ser/cart2_ser?is_cart=1"); 3103 getApp().goto("/packageA/pages/cart2_ser/cart2_ser?is_cart=1");
2720 } 3104 }
@@ -2923,8 +3307,9 @@ Page({ @@ -2923,8 +3307,9 @@ Page({
2923 var item = list.goods[ii]; 3307 var item = list.goods[ii];
2924 list.goods.splice(ii, 1); 3308 list.goods.splice(ii, 1);
2925 if (item.prom_id == p_item[0] && item.prom_type == 3) { 3309 if (item.prom_id == p_item[0] && item.prom_type == 3) {
2926 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
2927 - getApp().request.delete(url, {}); 3310 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  3311 + // getApp().request.delete(url, {});
  3312 + th.disInvalid(item);
2928 } 3313 }
2929 } 3314 }
2930 continue; 3315 continue;
@@ -3227,8 +3612,9 @@ Page({ @@ -3227,8 +3612,9 @@ Page({
3227 var item = list.goods[ii]; 3612 var item = list.goods[ii];
3228 list.goods.splice(ii, 1); 3613 list.goods.splice(ii, 1);
3229 if (item.prom_id == p_item[0] && item.prom_type == 3) { 3614 if (item.prom_id == p_item[0] && item.prom_type == 3) {
3230 - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;  
3231 - getApp().request.delete(url, {}); 3615 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  3616 + // getApp().request.delete(url, {});
  3617 + th.disInvalid(item);
3232 } 3618 }
3233 } 3619 }
3234 continue; 3620 continue;
pages/cart/cart/cart.wxml
@@ -238,8 +238,42 @@ @@ -238,8 +238,42 @@
238 238
239 239
240 </block> 240 </block>
241 - </block>  
242 - 241 + </block>
  242 + <!-- 失效商品 -->
  243 + <block wx:if="{{invalidList && invalidList.length > 0}}">
  244 + <view class="store" style="border-top: 20rpx solid rgb(245, 245, 245);">
  245 + <view class="shmd_m flex-equality">
  246 + <view class="shmd fs30" >失效宝贝{{invalidList.length}}件</view>
  247 + <view class="flex fs26 ctb">
  248 + <view bindtap="collectGoods">移到收藏夹</view>
  249 + <view class="mgl20" bindtap="delInva">清空失效宝贝</view>
  250 + </view>
  251 + </view>
  252 + <view class="order-item" style="border: none;" data-item="{{idx}}" wx:for="{{invalidList}}" wx:for-item="items" wx:for-index="idx" wx:key="{{index}}">
  253 + <block >
  254 + <view bindtap="inCheck_th_item" class="order-raido flex-vertical " data-check="{{items.selected}}" data-item="{{idx}}" data-pitems="{{pidx}}">
  255 + <icon wx:if="{{items.selected}}" color="red" size="20" type="success"></icon>
  256 + <text wx:else class="icon_no_sele"></text>
  257 + </view>
  258 + </block>
  259 + <view class="goods-img rel" data-gd="{{items.goods_id}}">
  260 + <image class="wh100" src="{{imgUrl + items.original_img}}" binderror="bind_bnerr2" data-errorimg="requestData[{{pidx}}].goods[{{idx}}].original_img" data-url="{{items.original_img}}"></image>
  261 + </view>
  262 + <view class="goods-cont">
  263 + <view class="goods-name">
  264 + <view class="ellipsis-2 fs30" data-gd="{{items.goods_id}}" style="color: #a5a5a5;">{{items.goods_name || items.service_name}}</view>
  265 + </view>
  266 + <block>
  267 + <view class="flex alend jc_sb">
  268 + <view class="goods-price baseline ellipsis-1">
  269 + <view class="fs28">{{items.invalid}}</view>
  270 + </view>
  271 + </view>
  272 + </block>
  273 + </view>
  274 + </view>
  275 + </view>
  276 + </block>
243 277
244 </view> 278 </view>
245 <view class="pay-for flex-vertical-between"> 279 <view class="pay-for flex-vertical-between">
pages/cart/cart/cart.wxss
@@ -222,7 +222,7 @@ radio { @@ -222,7 +222,7 @@ radio {
222 } 222 }
223 223
224 .store { 224 .store {
225 - border-bottom: 7rpx solid rgb(245, 245, 245); 225 + /* border-bottom: 7rpx solid rgb(245, 245, 245); */
226 } 226 }
227 .login-in { 227 .login-in {
228 position: relative; 228 position: relative;
pages/giftpack/giftpacklist/giftpacklist.js
@@ -1126,8 +1126,14 @@ Page({ @@ -1126,8 +1126,14 @@ Page({
1126 tt(); 1126 tt();
1127 }, 1127 },
1128 fail: function (res) { 1128 fail: function (res) {
1129 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
1130 - tt(); 1129 + //获取默认空白图
  1130 + wx.getImageInfo({
  1131 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  1132 + success: function(res) {
  1133 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  1134 + tt();
  1135 + }
  1136 + })
1131 } 1137 }
1132 }); 1138 });
1133 }, 1139 },
pages/goods/categoryList/categoryList.js
@@ -5,21 +5,26 @@ var i = function (i) { @@ -5,21 +5,26 @@ var i = function (i) {
5 }; 5 };
6 }(require("../../../utils/LoadMore.js")), a = new i.default(), ut = require("../../../utils/util.js"); 6 }(require("../../../utils/LoadMore.js")), a = new i.default(), ut = require("../../../utils/util.js");
7 //t = i,e = t 7 //t = i,e = t
  8 +var nextTimeOff=null
8 Page({ 9 Page({
9 data: { 10 data: {
10 - is_date:true, 11 + is_date: true,
11 scrollHeight: 0, 12 scrollHeight: 0,
12 - currentTab:-1,  
13 - abc:0,  
14 - windowHeight:0, 13 + currentTab: -1,
  14 + abc: 0,
  15 + windowHeight: 0,
15 windowWidth: 0, 16 windowWidth: 0,
16 - eachLetterHeight:0,  
17 - lettersPosition:0,  
18 - catelist:null, //分类读取 17 + eachLetterHeight: 0,
  18 + lettersPosition: 0,
  19 + catelist: null, //分类读取
19 nationlist: null,//国家读取 20 nationlist: null,//国家读取
20 groups: null, //品牌读取 21 groups: null, //品牌读取
21 iurl: oo.imghost,//图片地址 22 iurl: oo.imghost,//图片地址
22 - 23 + nextShow:false, //是否跳转下个类型
  24 + nextShow2:false, //是否跳转下个类型
  25 + toupper:true,
  26 + sClientY:0, //滑动初始值
  27 + eClientY:0, //滑动终值
23 // 当前选择的导航字母 28 // 当前选择的导航字母
24 selected: 0, 29 selected: 0,
25 // 选择字母视图滚动的位置id 30 // 选择字母视图滚动的位置id
@@ -27,55 +32,55 @@ Page({ @@ -27,55 +32,55 @@ Page({
27 // 导航字母 32 // 导航字母
28 letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 33 letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
29 'U', 'V', 'W', 'X', 'Y', 'Z'], 34 'U', 'V', 'W', 'X', 'Y', 'Z'],
30 - //控制新旧分类版本  
31 - is_used_share:0, 35 + //控制新旧分类版本
  36 + is_used_share: 0,
32 //国家的控制属性 37 //国家的控制属性
33 - is_country:1, 38 + is_country: 1,
34 //品牌的控制属性 39 //品牌的控制属性
35 - is_brand:1, 40 + is_brand: 1,
36 //选择分类的控制属性 41 //选择分类的控制属性
37 - select_classify_on:223,  
38 - index:223,  
39 - classify_name:"国家",//项目类型  
40 - brand_list:null,//品牌列表  
41 -  
42 - one_level_classify:[],// 新的版本左边的边分类1级  
43 - is_level_three:0,//判断有没有3级  
44 - cat_id:0, 42 + select_classify_on: 223,
  43 + index: 223,
  44 + classify_name: "国家",//项目类型
  45 + brand_list: null,//品牌列表
  46 +
  47 + one_level_classify: [],// 新的版本左边的边分类1级
  48 + is_level_three: 0,//判断有没有3级
  49 + cat_id: 0,
45 pl_timer: null,//只有品类的定时器 50 pl_timer: null,//只有品类的定时器
46 - is_pl_time:0,  
47 - requestData:null, //风格三的商品数据列表 分页  
48 - stylePage:1, //商品列表分页标识 51 + is_pl_time: 0,
  52 + requestData: null, //风格三的商品数据列表 分页
  53 + stylePage: 1, //商品列表分页标识
49 54
50 //风格三使用 55 //风格三使用
51 url: t.globalData.setting.imghost, 56 url: t.globalData.setting.imghost,
52 currentPage: 1, 57 currentPage: 1,
53 allData: null, 58 allData: null,
54 openFilterModal: !1, 59 openFilterModal: !1,
55 - baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1", 60 + baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id=" + oo.stoid + "&is_recommend=1",
56 requestUrl: "", 61 requestUrl: "",
57 tabname: "goods_id", //排序的字段 62 tabname: "goods_id", //排序的字段
58 adname: "desc", //升降的字段 63 adname: "desc", //升降的字段
59 is_new: 0, 64 is_new: 0,
60 is_hot: 0, 65 is_hot: 0,
61 - msgStatus:false, //页面显示暂无数据状态 66 + msgStatus: false, //页面显示暂无数据状态
62 countDownNum: 3, 67 countDownNum: 3,
63 timer: null, //定时器 68 timer: null, //定时器
64 - lastMsg:false,  
65 - toView:"",  
66 - is_show_class:false,//是否添加新样式  
67 - status_show:0, 69 + lastMsg: false,
  70 + toView: "",
  71 + is_show_class: false,//是否添加新样式
  72 + status_show: 0,
68 currentTab: 0, //预设当前项的值 73 currentTab: 0, //预设当前项的值
69 -  
70 - load:0, 74 +
  75 + load: 0,
71 xmlist: null, 76 xmlist: null,
72 - 77 +
73 78
74 }, 79 },
75 80
76 81
77 //判断当前滚动超过一屏时,设置tab标题滚动条。 82 //判断当前滚动超过一屏时,设置tab标题滚动条。
78 - checkCor: function() { 83 + checkCor: function () {
79 let that = this; 84 let that = this;
80 //这里计算按照实际情况进行修改,动态数据要进行动态分析 85 //这里计算按照实际情况进行修改,动态数据要进行动态分析
81 //思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算 86 //思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算
@@ -92,413 +97,418 @@ Page({ @@ -92,413 +97,418 @@ Page({
92 }, 97 },
93 98
94 99
95 - onLoad: function(tt) {  
96 - var that = this;  
97 - var first_leader=tt.first_leader;  
98 - if(first_leader){  
99 - //-- user_id代过来免登录 --  
100 - getApp().globalData.first_leader=first_leader;  
101 - } 100 + onLoad: function (tt) {
  101 + // wx.createSelectorQuery().select('#sview').boundingClientRect(function(rect){
  102 + // console.log('显示下滑区域');
  103 + // console.log(rect);
  104 + // }).exec()
102 105
103 - if(tt.type) this.data.type= parseInt(tt.type);  
104 - that.get_brand();  
105 -  
106 - clearInterval(that.data.timer);  
107 - that.setData({ countDownNum: 3, stylePage: 1 }); 106 + var that = this;
  107 + var first_leader = tt.first_leader;
  108 + if (first_leader) {
  109 + //-- user_id代过来免登录 --
  110 + getApp().globalData.first_leader = first_leader;
  111 + }
108 112
109 - const res = wx.getSystemInfoSync(),  
110 - letters = this.data.letters;  
111 - this.setData({  
112 - abc: t.globalData.heigth-88-88-16,  
113 - windowHeight: res.windowHeight,  
114 - windowWidth: res.windowWidth,  
115 -  
116 - }); 113 + if (tt.type) this.data.type = parseInt(tt.type);
  114 + that.get_brand();
117 115
118 - var bli = res.windowWidth/750;  
119 - //--------第一个字母距离顶部高度,单位使用的是rpx,须除以bli------  
120 - //才能与touch事件中的数值相加减,css中定义nav高度为94%,所以 *0.94  
121 - const eachLetterHeight = 35.4*bli,  
122 - comTop = (88+88) * bli,  
123 - temp = []; 116 + clearInterval(that.data.timer);
  117 + that.setData({ countDownNum: 3, stylePage: 1 });
124 118
125 - this.setData({  
126 - eachLetterHeight: eachLetterHeight  
127 - });  
128 - //---------求各字母距离设备左上角所处位置---------  
129 - for (let i = 0, len = letters.length; i < len; i++) {  
130 - const x = (this.data.windowWidth - (30 + 50)) * bli,  
131 - y = comTop + (i * eachLetterHeight);  
132 - temp.push([x, y]); 119 + const res = wx.getSystemInfoSync(),
  120 + letters = this.data.letters;
  121 + this.setData({
  122 + abc: t.globalData.heigth - 88 - 88 - 16,
  123 + windowHeight: res.windowHeight,
  124 + windowWidth: res.windowWidth,
  125 +
  126 + });
  127 +
  128 + var bli = res.windowWidth / 750;
  129 + //--------第一个字母距离顶部高度,单位使用的是rpx,须除以bli------
  130 + //才能与touch事件中的数值相加减,css中定义nav高度为94%,所以 *0.94
  131 + const eachLetterHeight = 35.4 * bli,
  132 + comTop = (88 + 88) * bli,
  133 + temp = [];
  134 +
  135 + this.setData({
  136 + eachLetterHeight: eachLetterHeight
  137 + });
  138 + //---------求各字母距离设备左上角所处位置---------
  139 + for (let i = 0, len = letters.length; i < len; i++) {
  140 + const x = (this.data.windowWidth - (30 + 50)) * bli,
  141 + y = comTop + (i * eachLetterHeight);
  142 + temp.push([x, y]);
  143 + }
  144 + this.setData({
  145 + lettersPosition: temp
  146 + });
  147 +
  148 + if (this.data.is_used_share == 0) {
  149 + this.get_nation();
  150 + this.getServiceCategory();
  151 + }
  152 +
  153 + //风格三
  154 + //t = i,e = t
  155 + var th = this;
  156 + a.init(this, "", "requestData");
  157 + var url = this.data.baseUrl;
  158 + this.data.is_new = i.is_new;
  159 + this.data.is_hot = i.is_hot;
  160 + if (0 != this.data.cat_id) {
  161 + url += "&cat_id=" + this.data.cat_id;
  162 + }
  163 +
  164 + // this.requestGoodsList(url);
  165 + getApp().getConfig2(function (rs) {
  166 + //计算等级价相关
  167 + var swithc_list = rs.switch_list;
  168 + var sw_arr = JSON.parse(swithc_list);
  169 + //---如果后台又开等级卡的开关---
  170 + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
  171 + th.setData({ rank_switch: true });
  172 + var user = getApp().globalData.userInfo;
  173 + var ti = setInterval(function () {
  174 + if (!user) return false;
  175 + clearInterval(ti);
  176 + //---回调卡的列表---
  177 + th.getPlusCardType(function (ob) {
  178 + th.setData({ card_list: ob.card_list });
  179 + if (user.card_field && user['card_expiredate']) {
  180 + var str = user['card_expiredate'].replace(/-/g, '/');
  181 + var end = new Date(str);
  182 + end = Date.parse(end) / 1000;
  183 + var now = ut.gettimestamp();
  184 +
  185 + //--- 判断是等级会员,且在有效期范围内 ---
  186 + if (user.card_field && now < end) {
  187 + var card_name = ob.name_map.get(user.card_field);
  188 + //if (card_name.length > 4) card_name = card_name.substring(0, 4);
  189 + th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });
  190 + }
  191 + }
  192 + })
  193 + }, 500)
133 } 194 }
134 - this.setData({  
135 - lettersPosition: temp 195 + });
  196 + },
  197 + onShow: function () {
  198 + getApp().check_can_share();
  199 +
  200 + if (typeof this.getTabBar === 'function' && this.getTabBar()) {
  201 + var index = getApp().getPageIndex(this);
  202 + this.getTabBar().setData({
  203 + active: index //数字是当前页面在tabbar的索引
136 }); 204 });
137 -  
138 - if (this.data.is_used_share==0){  
139 - this.get_nation();  
140 - this.getServiceCategory(); 205 + getApp().requestCardNum(this);
  206 + }
  207 +
  208 +
  209 + var that = this;
  210 + //调用底部导航
  211 + //t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url);
  212 + //this.requestFirstCategoris();
  213 + setTimeout(function () {
  214 + //if (getApp().globalData.user_id) getApp().requestCardNum(that);
  215 + }, 500)
  216 +
  217 + if (this.data.load) return false;
  218 +
  219 + getApp().getConfig2(function (e) {
  220 + console.log('card------------>>>>', e);
  221 + var data = e;
  222 + var switch_list_data = data.switch_list;
  223 + var switch_list = JSON.parse(switch_list_data);
  224 + var is_newsgoodstype = switch_list.is_newsgoodstype;
  225 + if (is_newsgoodstype == undefined) {
  226 + is_newsgoodstype = 0;
141 } 227 }
142 -  
143 - //风格三  
144 - //t = i,e = t  
145 - var th = this;  
146 - a.init(this, "", "requestData");  
147 - var url = this.data.baseUrl;  
148 - this.data.is_new = i.is_new;  
149 - this.data.is_hot = i.is_hot;  
150 - if (0 != this.data.cat_id) {  
151 - url += "&cat_id=" + this.data.cat_id; 228 + that.setData({ is_used_share: is_newsgoodstype });
  229 + if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); }
  230 + if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); }
  231 + if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); }
  232 + if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); }
  233 + that.setData({ store_config: e, is_do: 1 });
  234 +
  235 + //---有勾品类---
  236 + if (that.data.is_show_pl) {
  237 + that.requestFirstCategoris();
152 } 238 }
153 -  
154 - // this.requestGoodsList(url);  
155 - getApp().getConfig2(function (rs) {  
156 - //计算等级价相关  
157 - var swithc_list = rs.switch_list;  
158 - var sw_arr = JSON.parse(swithc_list);  
159 - //---如果后台又开等级卡的开关---  
160 - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {  
161 - th.setData({ rank_switch: true });  
162 - var user = getApp().globalData.userInfo;  
163 - var ti = setInterval(function () {  
164 - if (!user) return false;  
165 - clearInterval(ti);  
166 - //---回调卡的列表---  
167 - th.getPlusCardType(function (ob) {  
168 - th.setData({ card_list: ob.card_list });  
169 - if (user.card_field && user['card_expiredate']) {  
170 - var str = user['card_expiredate'].replace(/-/g, '/');  
171 - var end = new Date(str);  
172 - end = Date.parse(end) / 1000;  
173 - var now = ut.gettimestamp();  
174 -  
175 - //--- 判断是等级会员,且在有效期范围内 ---  
176 - if (user.card_field && now < end) {  
177 - var card_name = ob.name_map.get(user.card_field);  
178 - //if (card_name.length > 4) card_name = card_name.substring(0, 4);  
179 - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });  
180 - } 239 + if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl) {
  240 + that.data.pl_timer = setInterval(function () {
  241 + if (that.data.one_level_classify.length > 0) {
  242 + var item = that.data.one_level_classify[0], arr = item.array;
  243 + //----如果有下级的时候-----
  244 + if (item.array && item.array.length > 0) {
  245 + var is_lev_thr = 0
  246 + for (var i = 0; i < arr.length; i++) {
  247 + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }
181 } 248 }
182 - })  
183 - }, 500)  
184 - }  
185 - });  
186 - },  
187 - onShow:function(){  
188 - getApp().check_can_share();  
189 -  
190 - if (typeof this.getTabBar === 'function' && this.getTabBar()) {  
191 - var index=getApp().getPageIndex(this);  
192 - this.getTabBar().setData({  
193 - active: index //数字是当前页面在tabbar的索引  
194 - });  
195 - getApp().requestCardNum(this);  
196 - }  
197 -  
198 -  
199 - var that=this;  
200 - //调用底部导航  
201 - //t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url);  
202 - //this.requestFirstCategoris();  
203 - setTimeout(function () {  
204 - //if (getApp().globalData.user_id) getApp().requestCardNum(that);  
205 - },500)  
206 -  
207 - if(this.data.load) return false;  
208 -  
209 - getApp().getConfig2(function (e) {  
210 - console.log('card------------>>>>', e);  
211 - var data=e;  
212 - var switch_list_data = data.switch_list;  
213 - var switch_list = JSON.parse(switch_list_data);  
214 - var is_newsgoodstype = switch_list.is_newsgoodstype;  
215 - if (is_newsgoodstype==undefined)  
216 - {  
217 - is_newsgoodstype=0;  
218 - }  
219 - that.setData({ is_used_share :is_newsgoodstype});  
220 - if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); }  
221 - if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); }  
222 - if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); }  
223 - if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); }  
224 - that.setData({ store_config: e,is_do:1 });  
225 -  
226 - //---有勾品类---  
227 - if (that.data.is_show_pl){  
228 - that.requestFirstCategoris();  
229 - }  
230 - if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){  
231 - that.data.pl_timer = setInterval(function () {  
232 - if (that.data.one_level_classify.length>0){  
233 - var item=that.data.one_level_classify[0],arr=item.array;  
234 - //----如果有下级的时候-----  
235 - if(item.array && item.array.length>0){  
236 - var is_lev_thr=0  
237 - for(var i=0;i<arr.length;i++){  
238 - if (arr[i].arrays.length>0) {is_lev_thr=1;break; }  
239 - }  
240 - that.setData({ is_level_three: is_lev_thr });  
241 - if (is_lev_thr!=1) {  
242 - that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: item.array });  
243 - console.log("id:="+item.items.id)  
244 - that.style(that.data.stylePage,that.data.cat_id);  
245 - } else {  
246 - that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: arr });  
247 - console.log("id:="+item.items.id)  
248 - that.style(that.data.stylePage,that.data.cat_id);  
249 - }  
250 - }  
251 - else{  
252 - that.setData({ select_classify_on: 0, index: 0, goodslist: null,classify_name:item.items.name,is_level_three: 0});  
253 - }  
254 - clearInterval(that.data.pl_timer);  
255 - }  
256 - },1000);  
257 -  
258 - } else if (that.data.is_show_gb != 1 && that.data.is_show_pp ){  
259 - that.setData({ select_classify_on: 220, classify_name: "品牌" });  
260 - }  
261 -  
262 -  
263 - var one_level_classify = that.data.one_level_classify;  
264 -  
265 - if (that.data.is_show_pl) that.setData({ currentTab: 0 });  
266 - else if (that.data.is_show_gb){ that.setData({ currentTab: 1 });that.get_nation(); }  
267 - else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); }  
268 - else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); }  
269 -  
270 -  
271 - var t_type=that.data.type;  
272 - //----求传参过来的控制-----  
273 - if (t_type == 1 && that.data.is_show_gb ) {  
274 - that.setData({ currentTab: 1,select_classify_on:223 });  
275 - that.get_nation();  
276 - } else if (t_type == 2 && that.data.is_show_pp ) {  
277 - that.setData({ currentTab: 2,select_classify_on:220});  
278 - that.get_brand();  
279 - } else if (t_type == 3 && that.data.is_show_xm ) {  
280 - that.setData({ currentTab: 3,select_classify_on:221 });  
281 - that.getServiceCategory();  
282 - } else if (that.data.is_show_pl) {  
283 - that.setData({ currentTab: 0,select_classify_on:0 });  
284 - }  
285 - // 获取默认选中的第一个  
286 - if(that.data.is_show_gb && that.data.select_classify_on == 223){  
287 - that.setData({ status_show: 1 });  
288 - }else if(that.data.is_show_pp && that.data.select_classify_on == 220){  
289 - that.setData({ status_show: 2 });  
290 - }  
291 -  
292 - that.data.load=1;  
293 - })  
294 -  
295 - },  
296 -  
297 - //---------------分类请求接口,数据进行拼装------------------  
298 - requestFirstCategoris: function() {  
299 - var t = this;  
300 - e.get("/api/weshop/goodscategory/page", {  
301 - data: { store_id: oo.stoid,pageSize:6600,is_show:1},  
302 - success: function(e) {  
303 - var arr=new Array();  
304 - var dda = e.data.data.pageData;  
305 - if (dda != null && dda !=""&&dda!=undefined){  
306 - t.setData({is_pl_time:1}); 249 + that.setData({ is_level_three: is_lev_thr });
  250 + if (is_lev_thr != 1) {
  251 + that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name, cat_id: item.items.id, goodslist: item.array });
  252 + console.log("id:=" + item.items.id)
  253 + that.style(that.data.stylePage, that.data.cat_id);
  254 + } else {
  255 + that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name, cat_id: item.items.id, goodslist: arr });
  256 + console.log("id:=" + item.items.id)
  257 + that.style(that.data.stylePage, that.data.cat_id);
307 } 258 }
308 -  
309 - if (t.data.is_used_share == 0) {//is_used_share控制新旧版本  
310 - for(var i=0;i<dda.length;i++){  
311 - if (parseInt(dda[i].level)==1){  
312 - var item = {items: dda[i], array: new Array()}  
313 - arr.push(item);  
314 - } else if (parseInt(dda[i].level) == 2){  
315 - for (var j = 0; j < arr.length;j++ ){  
316 - if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)){  
317 - arr[j].array.push(dda[i]); break;  
318 - }  
319 - }  
320 - }else{  
321 - continue;  
322 - }  
323 - }  
324 - t.setData({ catelist: arr});  
325 - } else if (t.data.is_used_share == 1 || t.data.is_used_share == 2){  
326 -  
327 - //---------新的版本----------------  
328 - for (var i = 0; i < dda.length; i++) {  
329 - //--要排队的元素---  
330 - var need_to_insert=dda[i];  
331 - if (parseInt(need_to_insert.level) == 1) {  
332 - var item = { items: need_to_insert, array: new Array() }//判断数组的长度看看有没有2级菜单  
333 - arr.push(item);  
334 - } else if (parseInt(need_to_insert.level) == 2) {  
335 -  
336 - for (var j = 0; j < arr.length; j++) {  
337 -  
338 -  
339 - if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) {  
340 -  
341 - var ishaf_two = { items: need_to_insert, arrays: new Array() };  
342 - arr[j].array.push(ishaf_two); arr.ishaf_two = 0;  
343 - }  
344 - }  
345 - } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组  
346 -  
347 - for (var dd = 0; dd < arr.length; dd++) {  
348 - for (var pp = 0; pp < arr[dd].array.length; pp++) {  
349 - //--判断二级--  
350 - var two_item = arr[dd].array;  
351 -  
352 - if (two_item && two_item.length>0){  
353 -  
354 - if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) {  
355 -  
356 - arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break;  
357 - }  
358 - }  
359 - }  
360 - } 259 + }
  260 + else {
  261 + that.setData({ select_classify_on: 0, index: 0, goodslist: null, classify_name: item.items.name, is_level_three: 0 });
  262 + }
  263 + clearInterval(that.data.pl_timer);
  264 + }
  265 + }, 1000);
  266 +
  267 + } else if (that.data.is_show_gb != 1 && that.data.is_show_pp) {
  268 + that.setData({ select_classify_on: 220, classify_name: "品牌" });
  269 + }
  270 +
  271 +
  272 + var one_level_classify = that.data.one_level_classify;
  273 +
  274 + if (that.data.is_show_pl) that.setData({ currentTab: 0 });
  275 + else if (that.data.is_show_gb) { that.setData({ currentTab: 1 }); that.get_nation(); }
  276 + else if (that.data.is_show_pp) { that.setData({ currentTab: 2 }); that.get_brand(); }
  277 + else if (that.data.is_show_xm) { that.setData({ currentTab: 3 }); that.getServiceCategory(); }
  278 +
  279 +
  280 + var t_type = that.data.type;
  281 + //----求传参过来的控制-----
  282 + if (t_type == 1 && that.data.is_show_gb) {
  283 + that.setData({ currentTab: 1, select_classify_on: 223 });
  284 + that.get_nation();
  285 + } else if (t_type == 2 && that.data.is_show_pp) {
  286 + that.setData({ currentTab: 2, select_classify_on: 220 });
  287 + that.get_brand();
  288 + } else if (t_type == 3 && that.data.is_show_xm) {
  289 + that.setData({ currentTab: 3, select_classify_on: 221 });
  290 + that.getServiceCategory();
  291 + } else if (that.data.is_show_pl) {
  292 + that.setData({ currentTab: 0, select_classify_on: 0 });
  293 + }
  294 + // 获取默认选中的第一个
  295 + if (that.data.is_show_gb && that.data.select_classify_on == 223) {
  296 + that.setData({ status_show: 1 });
  297 + } else if (that.data.is_show_pp && that.data.select_classify_on == 220) {
  298 + that.setData({ status_show: 2 });
  299 + }
  300 +
  301 + that.data.load = 1;
  302 + })
  303 +
  304 + },
  305 +
  306 + //---------------分类请求接口,数据进行拼装------------------
  307 + requestFirstCategoris: function () {
  308 + var t = this;
  309 + e.get("/api/weshop/goodscategory/page", {
  310 + data: { store_id: oo.stoid, pageSize: 6600, is_show: 1 },
  311 + success: function (e) {
  312 + var arr = new Array();
  313 + var dda = e.data.data.pageData;
  314 + if (dda != null && dda != "" && dda != undefined) {
  315 + t.setData({ is_pl_time: 1 });
  316 + }
  317 +
  318 + if (t.data.is_used_share == 0) {//is_used_share控制新旧版本
  319 + for (var i = 0; i < dda.length; i++) {
  320 + if (parseInt(dda[i].level) == 1) {
  321 + var item = { items: dda[i], array: new Array() }
  322 + arr.push(item);
  323 + } else if (parseInt(dda[i].level) == 2) {
  324 + for (var j = 0; j < arr.length; j++) {
  325 + if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)) {
  326 + arr[j].array.push(dda[i]); break;
361 } 327 }
362 } 328 }
363 - for(var i=0;i<arr.length;i++){  
364 - arr[i]['items']['is_show_class'] = false;  
365 - var mobile_name = arr[i]['items']['name']  
366 - //if(mobile_name.length > 4){  
367 - //arr[i]['items']['name'] = mobile_name.substring(0, 4)  
368 - //}  
369 - }  
370 - if(t.data.is_show_pl==1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1){  
371 - arr[0]['items']['is_show_class'] = true;  
372 - }  
373 - //console.log(arr)  
374 - t.setData({one_level_classify:arr});  
375 - if(t.data.select_classify_on==0){  
376 - var item=arr[0]; 329 + } else {
  330 + continue;
  331 + }
  332 + }
  333 + t.setData({ catelist: arr });
  334 + } else if (t.data.is_used_share == 1 || t.data.is_used_share == 2) {
377 335
378 - var name = item.items.name;  
379 - var cid = item.items.id;  
380 - var arr = item.array; 336 + //---------新的版本----------------
  337 + for (var i = 0; i < dda.length; i++) {
  338 + //--要排队的元素---
  339 + var need_to_insert = dda[i];
  340 + if (parseInt(need_to_insert.level) == 1) {
  341 + var item = { items: need_to_insert, array: new Array() }//判断数组的长度看看有没有2级菜单
  342 + arr.push(item);
  343 + } else if (parseInt(need_to_insert.level) == 2) {
381 344
382 - console.log("11111",item); 345 + for (var j = 0; j < arr.length; j++) {
383 346
384 347
385 - if (arr.length == 0) {  
386 - t.setData({  
387 - select_classify_on: 0, index: 0, classify_name: name, cat_id: cid,  
388 - goodslist: null, is_level_three: 0  
389 - }); 348 + if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) {
390 349
391 - if(t.data.is_used_share == 2)  
392 - t.style(t.data.stylePage, cid) 350 + var ishaf_two = { items: need_to_insert, arrays: new Array() };
  351 + arr[j].array.push(ishaf_two); arr.ishaf_two = 0;
  352 + }
  353 + }
  354 + } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组
393 355
394 - return false;  
395 - }  
396 - if (arr.length != 0) {  
397 - var is_lev_thr = 0  
398 - for (var i = 0; i < arr.length; i++) {  
399 - if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }  
400 - }  
401 - t.setData({ is_level_three: is_lev_thr });  
402 -  
403 - if (this.data.is_level_three != 1) {  
404 - t.setData({ index: 0, classify_name: name, goodslist: arr });  
405 - } else {  
406 - t.setData({ index: 0, goodslist: arr });  
407 - }  
408 - } 356 + for (var dd = 0; dd < arr.length; dd++) {
  357 + for (var pp = 0; pp < arr[dd].array.length; pp++) {
  358 + //--判断二级--
  359 + var two_item = arr[dd].array;
409 360
410 - t.style(t.data.stylePage, cid) 361 + if (two_item && two_item.length > 0) {
411 362
  363 + if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) {
  364 +
  365 + arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break;
  366 + }
  367 + }
412 } 368 }
  369 + }
  370 + }
  371 + }
  372 + for (var i = 0; i < arr.length; i++) {
  373 + arr[i]['items']['is_show_class'] = false;
  374 + var mobile_name = arr[i]['items']['name']
  375 + //if(mobile_name.length > 4){
  376 + //arr[i]['items']['name'] = mobile_name.substring(0, 4)
  377 + //}
  378 + }
  379 + if (t.data.is_show_pl == 1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1) {
  380 + arr[0]['items']['is_show_class'] = true;
  381 + }
  382 + //console.log(arr)
  383 + t.setData({ one_level_classify: arr });
  384 + if (t.data.select_classify_on == 0) {
  385 + var item = arr[0];
  386 +
  387 + var name = item.items.name;
  388 + var cid = item.items.id;
  389 + var arr = item.array;
413 390
414 - } 391 + console.log("11111", item);
  392 + console.log(arr.length);
  393 +
  394 + if (arr.length == 0) {
  395 + t.setData({
  396 + select_classify_on: 0, index: 0, classify_name: name, cat_id: cid,
  397 + goodslist: null, is_level_three: 0
  398 + });
  399 +
  400 + if (t.data.is_used_share == 2)
  401 + t.style(t.data.stylePage, cid)
  402 +
  403 + return false;
415 } 404 }
416 - });  
417 - },  
418 -  
419 - requestCategories: function(t) {  
420 - var s = this;  
421 - e.get("/api/goods/goodsSecAndThirdCategoryList", {  
422 - data: {  
423 - parent_id: t  
424 - },  
425 - success: function(e) {  
426 - s.setData({  
427 - categories: e.data.result,  
428 - currentCategoryId: t  
429 - }); 405 + if (arr.length != 0) {
  406 + var is_lev_thr = 0
  407 + for (var i = 0; i < arr.length; i++) {
  408 + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }
  409 + }
  410 + t.setData({ is_level_three: is_lev_thr ,cat_id:cid});
  411 +
  412 + if (this.data.is_level_three != 1) {
  413 + t.setData({ index: 0, classify_name: name, goodslist: arr });
  414 + } else {
  415 + t.setData({ index: 0, goodslist: arr });
  416 + }
430 } 417 }
431 - });  
432 - },  
433 418
434 - switchFirstCategory: function(t) {  
435 - this.requestCategories(t.currentTarget.dataset.id);  
436 - }, 419 + t.style(t.data.stylePage, cid)
437 420
438 - //-----------滑动切换----------  
439 - swiperTab: function (e) {  
440 - var that = this;  
441 - if (e.detail.source == "touch") {  
442 - this.setData({  
443 - currentTab: e.detail.current,  
444 - });  
445 - } 421 + }
446 422
447 - //获取国别  
448 - if (e.detail.current == 1 && that.data.nationlist == null) {  
449 - that.get_nation();  
450 - }  
451 - //获取品牌  
452 - if (e.detail.current == 2 && that.data.groups == null) {  
453 - that.get_brand(); 423 + }
454 } 424 }
  425 + });
  426 + },
455 427
456 - //获取服务卡项  
457 - if (e.detail.current == 3 && that.data.xmlist == null) {  
458 - that.getServiceCategory(); 428 + requestCategories: function (t) {
  429 + var s = this;
  430 + e.get("/api/goods/goodsSecAndThirdCategoryList", {
  431 + data: {
  432 + parent_id: t
  433 + },
  434 + success: function (e) {
  435 + s.setData({
  436 + categories: e.data.result,
  437 + currentCategoryId: t
  438 + });
459 } 439 }
  440 + });
  441 + },
460 442
  443 + switchFirstCategory: function (t) {
  444 + this.requestCategories(t.currentTarget.dataset.id);
  445 + },
461 446
462 - },  
463 - //-----------点击切换-----------  
464 - clickTab: function (e) {  
465 - var that = this;  
466 - if (this.data.currentTab === e.target.dataset.current) {  
467 - return false;  
468 - } else {  
469 - that.setData({  
470 - currentTab: e.target.dataset.current  
471 - })  
472 - }  
473 - //获取国别  
474 - if (e.detail.current == 1 && that.data.nationlist == null) {  
475 - that.get_nation();  
476 - } 447 + //-----------滑动切换----------
  448 + swiperTab: function (e) {
  449 + var that = this;
  450 + if (e.detail.source == "touch") {
  451 + this.setData({
  452 + currentTab: e.detail.current,
  453 + });
  454 + }
477 455
478 - //获取品牌  
479 - if (e.detail.current == 2 && that.data.groups == null) {  
480 - that.get_brand();  
481 - } 456 + //获取国别
  457 + if (e.detail.current == 1 && that.data.nationlist == null) {
  458 + that.get_nation();
  459 + }
  460 + //获取品牌
  461 + if (e.detail.current == 2 && that.data.groups == null) {
  462 + that.get_brand();
  463 + }
482 464
483 - //获取服务卡项  
484 - if (e.detail.current == 3 && that.data.xmlist == null) {  
485 - that.getServiceCategory();  
486 - } 465 + //获取服务卡项
  466 + if (e.detail.current == 3 && that.data.xmlist == null) {
  467 + that.getServiceCategory();
  468 + }
487 469
488 - },  
489 470
490 - tabLetter(e) {  
491 - const index = e.currentTarget.dataset.index;  
492 - this.setData({  
493 - selected: index,  
494 - scrollIntoView: index 471 + },
  472 + //-----------点击切换-----------
  473 + clickTab: function (e) {
  474 + var that = this;
  475 + if (this.data.currentTab === e.target.dataset.current) {
  476 + return false;
  477 + } else {
  478 + that.setData({
  479 + currentTab: e.target.dataset.current
495 }) 480 })
496 - this.cleanAcitvedStatus(); 481 + }
  482 + //获取国别
  483 + if (e.detail.current == 1 && that.data.nationlist == null) {
  484 + that.get_nation();
  485 + }
  486 +
  487 + //获取品牌
  488 + if (e.detail.current == 2 && that.data.groups == null) {
  489 + that.get_brand();
  490 + }
  491 +
  492 + //获取服务卡项
  493 + if (e.detail.current == 3 && that.data.xmlist == null) {
  494 + that.getServiceCategory();
  495 + }
  496 +
  497 + },
  498 +
  499 + tabLetter(e) {
  500 + const index = e.currentTarget.dataset.index;
  501 + this.setData({
  502 + selected: index,
  503 + scrollIntoView: index
  504 + })
  505 + this.cleanAcitvedStatus();
497 }, 506 },
498 //-------------------清除字母选中状态--------------- 507 //-------------------清除字母选中状态---------------
499 cleanAcitvedStatus() { 508 cleanAcitvedStatus() {
500 setTimeout(() => { 509 setTimeout(() => {
501 - this.setData({selected: 0}) }, 500); 510 + this.setData({ selected: 0 })
  511 + }, 500);
502 }, 512 },
503 513
504 //------------手指滑动------------------ 514 //------------手指滑动------------------
@@ -530,19 +540,19 @@ Page({ @@ -530,19 +540,19 @@ Page({
530 }, 540 },
531 541
532 //跳转到分类的商品列表 542 //跳转到分类的商品列表
533 - go_cate:function(t){  
534 - var cid= t.currentTarget.dataset.cid;  
535 - var pid = t.currentTarget.dataset.pid;  
536 - var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid;  
537 - lurl+="&pid="+pid;  
538 - wx.navigateTo({ url: lurl}); 543 + go_cate: function (t) {
  544 + var cid = t.currentTarget.dataset.cid;
  545 + var pid = t.currentTarget.dataset.pid;
  546 + var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid;
  547 + lurl += "&pid=" + pid;
  548 + wx.navigateTo({ url: lurl });
539 }, 549 },
540 550
541 //跳转到品牌的商品列表 551 //跳转到品牌的商品列表
542 go_brand: function (t) { 552 go_brand: function (t) {
543 var cid = t.currentTarget.dataset.bid; 553 var cid = t.currentTarget.dataset.bid;
544 var lurl = "/pages/goods/goodsList/goodsList?brand_id=" + cid; 554 var lurl = "/pages/goods/goodsList/goodsList?brand_id=" + cid;
545 - wx.navigateTo({ url: lurl}); 555 + wx.navigateTo({ url: lurl });
546 }, 556 },
547 557
548 //跳转到国别的商品列表 558 //跳转到国别的商品列表
@@ -551,24 +561,24 @@ Page({ @@ -551,24 +561,24 @@ Page({
551 var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid; 561 var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid;
552 wx.navigateTo({ url: lurl }); 562 wx.navigateTo({ url: lurl });
553 }, 563 },
554 - 564 +
555 //获取国别 565 //获取国别
556 - get_nation:function() { 566 + get_nation: function () {
557 var s = this; 567 var s = this;
558 e.get("/api/weshop/nation/page", { 568 e.get("/api/weshop/nation/page", {
559 data: { 569 data: {
560 is_hot: 1, 570 is_hot: 1,
561 - store_id:oo.stoid,  
562 - pageSize:300, 571 + store_id: oo.stoid,
  572 + pageSize: 300,
563 }, 573 },
564 success: function (e) { 574 success: function (e) {
565 var dda = e.data.data.pageData; 575 var dda = e.data.data.pageData;
566 - s.setData({ nationlist:dda}) 576 + s.setData({ nationlist: dda })
567 } 577 }
568 }); 578 });
569 }, 579 },
570 580
571 - //获取品牌 581 + //获取品牌
572 get_brand: function () { 582 get_brand: function () {
573 var compare = function (prop) { 583 var compare = function (prop) {
574 return function (obj1, obj2) { 584 return function (obj1, obj2) {
@@ -576,8 +586,10 @@ Page({ @@ -576,8 +586,10 @@ Page({
576 if (!isNaN(Number(val1)) && !isNaN(Number(val2))) { 586 if (!isNaN(Number(val1)) && !isNaN(Number(val2))) {
577 val1 = Number(val1); val2 = Number(val2); 587 val1 = Number(val1); val2 = Number(val2);
578 } 588 }
579 - if (val1 < val2) { return -1;  
580 - } else if (val1 > val2) { return 1; 589 + if (val1 < val2) {
  590 + return -1;
  591 + } else if (val1 > val2) {
  592 + return 1;
581 } else { return 0; } 593 } else { return 0; }
582 } 594 }
583 } 595 }
@@ -590,77 +602,77 @@ Page({ @@ -590,77 +602,77 @@ Page({
590 pageSize: 10000, 602 pageSize: 10000,
591 }, 603 },
592 success: function (e) { 604 success: function (e) {
593 - var arr=new Array();  
594 - var dda = e.data.data.pageData;  
595 - s.setData({brand_list:dda});  
596 -  
597 -  
598 - for (var i = 0; i < dda.length; i++) {  
599 - //console.log(dda[i].logo)  
600 - if(dda[i].logo==""){  
601 - dda[i].logo= s.data.iurl+"/miniapp/images/no_brand_def.jpg";  
602 - }else if(dda[i].logo && dda[i].logo.indexOf("http")<0){  
603 - dda[i].logo = oo.imghost+dda[i].logo;  
604 - }  
605 -  
606 - //进行排序,只有是默认排序的时候,才按首字母排序  
607 - // if(parseInt(s.data.is_used_share)!=0) continue;  
608 -  
609 - if (arr.length>0){  
610 - var find = 0;  
611 - //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素  
612 - for (var k = 0; k < arr.length;k++){  
613 - if(dda[i].zm == arr[k].zm){ find=k+1; break;}  
614 - }  
615 - if (find == 0) {  
616 - var item = { zm: dda[i].zm, array: new Array() }  
617 - item.array.push(dda[i]);  
618 - arr.push(item);  
619 - } else{  
620 - arr[find - 1].array.push(dda[i]);  
621 - }  
622 - }else{  
623 - var item = { zm: dda[i].zm, array: new Array() }  
624 - item.array.push(dda[i]);  
625 - arr.push(item);  
626 - }  
627 - }  
628 - // if(parseInt(s.data.is_used_share)==0){  
629 - // arr.sort(compare("zm"));  
630 - // }else{  
631 - // var ob={array:dda};  
632 - // arr.push(ob);  
633 - // }  
634 -  
635 - arr.sort(compare("zm"));  
636 -  
637 - s.setData({ groups: arr });  
638 - //console.log(s.data.groups) 605 + var arr = new Array();
  606 + var dda = e.data.data.pageData;
  607 + s.setData({ brand_list: dda });
  608 +
  609 +
  610 + for (var i = 0; i < dda.length; i++) {
  611 + //console.log(dda[i].logo)
  612 + if (dda[i].logo == "") {
  613 + dda[i].logo = s.data.iurl + "/miniapp/images/no_brand_def.jpg";
  614 + } else if (dda[i].logo && dda[i].logo.indexOf("http") < 0) {
  615 + dda[i].logo = oo.imghost + dda[i].logo;
  616 + }
  617 +
  618 + //进行排序,只有是默认排序的时候,才按首字母排序
  619 + // if(parseInt(s.data.is_used_share)!=0) continue;
  620 +
  621 + if (arr.length > 0) {
  622 + var find = 0;
  623 + //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素
  624 + for (var k = 0; k < arr.length; k++) {
  625 + if (dda[i].zm == arr[k].zm) { find = k + 1; break; }
  626 + }
  627 + if (find == 0) {
  628 + var item = { zm: dda[i].zm, array: new Array() }
  629 + item.array.push(dda[i]);
  630 + arr.push(item);
  631 + } else {
  632 + arr[find - 1].array.push(dda[i]);
  633 + }
  634 + } else {
  635 + var item = { zm: dda[i].zm, array: new Array() }
  636 + item.array.push(dda[i]);
  637 + arr.push(item);
  638 + }
  639 + }
  640 + // if(parseInt(s.data.is_used_share)==0){
  641 + // arr.sort(compare("zm"));
  642 + // }else{
  643 + // var ob={array:dda};
  644 + // arr.push(ob);
  645 + // }
  646 +
  647 + arr.sort(compare("zm"));
  648 +
  649 + s.setData({ groups: arr });
  650 + //console.log(s.data.groups)
639 } 651 }
640 }); 652 });
641 }, 653 },
642 654
643 655
644 // 获取服务卡项分类 656 // 获取服务卡项分类
645 - getServiceCategory: function() { 657 + getServiceCategory: function () {
646 var s = this; 658 var s = this;
647 e.get("/api/weshop/serviceCategory/page", { 659 e.get("/api/weshop/serviceCategory/page", {
648 data: { 660 data: {
649 is_show: 1, 661 is_show: 1,
650 - store_id:oo.stoid,  
651 - pageSize: 1000, 662 + store_id: oo.stoid,
  663 + pageSize: 1000,
652 }, 664 },
653 success: function (e) { 665 success: function (e) {
654 var dda = e.data.data.pageData; 666 var dda = e.data.data.pageData;
655 - s.setData({  
656 - xmlist:dda,  
657 - }); 667 + s.setData({
  668 + xmlist: dda,
  669 + });
658 } 670 }
659 }); 671 });
660 }, 672 },
661 673
662 -  
663 - goServiceCategoryList: function(t) { 674 +
  675 + goServiceCategoryList: function (t) {
664 var cid = t.currentTarget.dataset.cid; 676 var cid = t.currentTarget.dataset.cid;
665 var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid; 677 var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid;
666 wx.navigateTo({ url: lurl }); 678 wx.navigateTo({ url: lurl });
@@ -668,45 +680,45 @@ Page({ @@ -668,45 +680,45 @@ Page({
668 680
669 //---------分享配置-------- 681 //---------分享配置--------
670 onShareAppMessage: function (e) { 682 onShareAppMessage: function (e) {
671 - getApp().globalData.no_clear=1;  
672 - var url="pages/goods/categoryList/categoryList";  
673 - var userInfo=getApp().globalData.userInfo;  
674 - //是分销商才带  
675 - if(userInfo){  
676 - url+="?first_leader="+userInfo.user_id;  
677 - }  
678 - console.log("--分类分享---分享--");  
679 - console.log(url);  
680 - 683 + getApp().globalData.no_clear = 1;
  684 + var url = "pages/goods/categoryList/categoryList";
  685 + var userInfo = getApp().globalData.userInfo;
  686 + //是分销商才带
  687 + if (userInfo) {
  688 + url += "?first_leader=" + userInfo.user_id;
  689 + }
  690 + console.log("--分类分享---分享--");
  691 + console.log(url);
  692 +
681 return { 693 return {
682 - title: "商品分类",  
683 - path:url, 694 + title: "商品分类",
  695 + path: url,
684 } 696 }
685 }, 697 },
686 //图片失败,默认图片 698 //图片失败,默认图片
687 - bind_bnerr: function (e) { 699 + bind_bnerr: function (e) {
688 var _errImg = e.target.dataset.errorimg; 700 var _errImg = e.target.dataset.errorimg;
689 var _errObj = {}; 701 var _errObj = {};
690 - _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; 702 + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif";
691 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 703 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
692 }, 704 },
693 - //图片失败,默认图片  
694 - bind_bnerr_pp: function (e) {  
695 - var list = this.data.groups  
696 - var _errImg = e.target.dataset.errorimg;  
697 - var idx = e.target.dataset.idx;  
698 - var pix = e.target.dataset.pix;  
699 -  
700 - },  
701 - //商品图片失败,默认图片 705 + //图片失败,默认图片
  706 + bind_bnerr_pp: function (e) {
  707 + var list = this.data.groups
  708 + var _errImg = e.target.dataset.errorimg;
  709 + var idx = e.target.dataset.idx;
  710 + var pix = e.target.dataset.pix;
  711 +
  712 + },
  713 + //商品图片失败,默认图片
702 goods_bnerr: function (e) { 714 goods_bnerr: function (e) {
703 - var _errImg = e.target.dataset.err; 715 + var _errImg = e.target.dataset.err;
704 var _errObj = {}; 716 var _errObj = {};
705 _errObj[_errImg] = this.data.iurl + "/miniapp/images/no_cate_def.png"; 717 _errObj[_errImg] = this.data.iurl + "/miniapp/images/no_cate_def.png";
706 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 718 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
707 }, 719 },
708 720
709 - goseach:function(){ 721 + goseach: function () {
710 wx.navigateTo({ 722 wx.navigateTo({
711 url: "/pages/goods/search/search" 723 url: "/pages/goods/search/search"
712 }); 724 });
@@ -714,106 +726,115 @@ Page({ @@ -714,106 +726,115 @@ Page({
714 726
715 //图片失败,默认图片 727 //图片失败,默认图片
716 bind_bnerr2: function (e) { 728 bind_bnerr2: function (e) {
717 - var _errImg = e.target.dataset.errorimg;  
718 - var _errObj = {};  
719 - _errObj[_errImg] = "/public/images/category.png";  
720 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;  
721 - 729 + var _errImg = e.target.dataset.errorimg;
  730 + var _errObj = {};
  731 + _errObj[_errImg] = "/public/images/category.png";
  732 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  733 +
722 }, 734 },
723 735
724 736
725 - //图片失败,默认图片  
726 - bind_bnerr_t3: function (e) {  
727 - var _errImg = e.target.dataset.errorimg;  
728 - var _errObj = {};  
729 - _errObj[_errImg] = "/miniapp/images/default_g_img.gif";  
730 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 737 + //图片失败,默认图片
  738 + bind_bnerr_t3: function (e) {
  739 + var _errImg = e.target.dataset.errorimg;
  740 + var _errObj = {};
  741 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
  742 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
731 743
732 - }, 744 + },
733 745
734 746
735 747
736 // 新的版本分类点击一级分类 748 // 新的版本分类点击一级分类
737 - click_classify:function(e){  
738 - // 在风格三的时候,才会有current  
739 - clearInterval(this.data.timer);  
740 -  
741 - let cur = e.currentTarget.dataset.current;  
742 - if(cur) { 749 + click_classify: function (e) {
  750 + // 在风格三的时候,才会有current
  751 + clearInterval(this.data.timer);
  752 + console.log('类别切换---------------');
  753 + this.setData({
  754 + toupper:true,
  755 + nextShow:false,
  756 + nextShow2:false
  757 + })
  758 + let cur = e.currentTarget.dataset.current;
  759 + console.log(cur);
  760 + console.log(this.data.currentTab);
  761 + if (cur > -1) {
  762 +
743 if (this.data.currentTab == cur) { 763 if (this.data.currentTab == cur) {
744 - if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) {  
745 - return false;  
746 - } else if (cur != 0) {  
747 - return false;  
748 - } 764 +
  765 + if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) {
  766 + return false;
  767 + } else if (cur != 0) {
  768 + return false;
  769 + }
749 } else { 770 } else {
750 - wx.pageScrollTo({  
751 - scrollTop: 0  
752 - })  
753 - this.setData({  
754 - currentTab: cur,  
755 - select_classify_on: cur  
756 - })  
757 - this.checkCor(); 771 + wx.pageScrollTo({
  772 + scrollTop: 0
  773 + })
  774 + this.setData({
  775 + currentTab: cur,
  776 + select_classify_on: cur
  777 + })
  778 + this.checkCor();
758 } 779 }
759 - }  
760 - this.setData({  
761 - countDownNum: 3,  
762 - });  
763 -  
764 - var arr2 = this.data.one_level_classify  
765 - for(var i=0;i<arr2.length;i++){  
766 - if(i == e.currentTarget.dataset.index){  
767 - arr2[i]['items']['is_show_class'] = true  
768 - }else{  
769 - arr2[i]['items']['is_show_class'] = false  
770 - }  
771 - }  
772 - this.setData({ one_level_classify: arr2});  
773 - //this.data.one_level_classify[e.currentTarget.dataset.index]['items']['is_show_class'] = true  
774 - // console.log(e.currentTarget.dataset.index)  
775 - clearInterval(this.data.timer);  
776 - this.setData({ countDownNum: 3, stylePage: 1, scrollTop: 0});  
777 - this.data.ishaf_three = 0;  
778 - var indexs = e.currentTarget.dataset.index;  
779 - var name = e.currentTarget.dataset.name;  
780 - var cid = e.currentTarget.dataset.cid;  
781 - var pid = e.currentTarget.dataset.pid;  
782 - var arr = e.currentTarget.dataset.arr;  
783 - console.log("cid:=" + name)  
784 - if (indexs == 220) { this.get_brand(); }  
785 - //==2的时候 请求数据为商品,不为分类  
786 - if (this.data.is_used_share == 2) {  
787 - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid,lastMsg: false, });  
788 - console.log("edqdqw:="+this.data.select_classify_on)  
789 - this.style(this.data.stylePage, cid)  
790 - }else{  
791 - if (arr != "undefined" && arr != undefined) {  
792 - if (arr.length == 0) {  
793 - this.setData({  
794 - select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid,  
795 - goodslist: null, is_level_three: 0  
796 - });  
797 - return false;  
798 - }  
799 - if (arr.length != 0) {  
800 - var is_lev_thr = 0  
801 - for (var i = 0; i < arr.length; i++) {  
802 - if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }  
803 - }  
804 - this.setData({ is_level_three: is_lev_thr });  
805 -  
806 - if (this.data.is_level_three != 1) {  
807 - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, goodslist: arr });  
808 - } else {  
809 - this.setData({ select_classify_on: indexs, index: indexs, goodslist: arr }); 780 + }
  781 + this.setData({
  782 + countDownNum: 3,
  783 + });
  784 +
  785 + var arr2 = this.data.one_level_classify
  786 + for (var i = 0; i < arr2.length; i++) {
  787 + if (i == e.currentTarget.dataset.index) {
  788 + arr2[i]['items']['is_show_class'] = true
  789 + } else {
  790 + arr2[i]['items']['is_show_class'] = false
  791 + }
  792 + }
  793 + this.setData({ one_level_classify: arr2 });
  794 + //this.data.one_level_classify[e.currentTarget.dataset.index]['items']['is_show_class'] = true
  795 + // console.log(e.currentTarget.dataset.index)
  796 + clearInterval(this.data.timer);
  797 + this.setData({ countDownNum: 3, stylePage: 1, scrollTop: 0 });
  798 + this.data.ishaf_three = 0;
  799 + var indexs = e.currentTarget.dataset.index;
  800 + var name = e.currentTarget.dataset.name;
  801 + var cid = e.currentTarget.dataset.cid;
  802 + var pid = e.currentTarget.dataset.pid;
  803 + var arr = e.currentTarget.dataset.arr;
  804 + console.log("cid:=" + name)
  805 + if (indexs == 220) { this.get_brand(); }
  806 + //==2的时候 请求数据为商品,不为分类
  807 + if (this.data.is_used_share == 2) {
  808 + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, lastMsg: false, });
  809 + console.log("edqdqw:=" + this.data.select_classify_on)
  810 + this.style(this.data.stylePage, cid)
  811 + } else {
  812 + if (arr != "undefined" && arr != undefined) {
  813 + if (arr.length == 0) {
  814 + this.setData({
  815 + select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid,
  816 + goodslist: null, is_level_three: 0
  817 + });
  818 + return false;
810 } 819 }
811 - }  
812 - }  
813 - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, stylePage: 1,lastMsg: false,});  
814 - }  
815 -  
816 - }, 820 + if (arr.length != 0) {
  821 + var is_lev_thr = 0
  822 + for (var i = 0; i < arr.length; i++) {
  823 + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }
  824 + }
  825 + this.setData({ is_level_three: is_lev_thr });
  826 +
  827 + if (this.data.is_level_three != 1) {
  828 + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, goodslist: arr });
  829 + } else {
  830 + this.setData({ select_classify_on: indexs, index: indexs, goodslist: arr });
  831 + }
  832 + }
  833 + }
  834 + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, stylePage: 1, lastMsg: false, });
  835 + }
  836 +
  837 + },
817 838
818 839
819 //图片失败 840 //图片失败
@@ -825,34 +846,34 @@ Page({ @@ -825,34 +846,34 @@ Page({
825 _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; 846 _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
826 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 847 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
827 }, 848 },
828 -  
829 - 849 +
  850 +
830 //选择更多 851 //选择更多
831 - select_more:function(e){ 852 + select_more: function (e) {
832 var cid = e.currentTarget.dataset.cid; 853 var cid = e.currentTarget.dataset.cid;
833 var pid = e.currentTarget.dataset.pid; 854 var pid = e.currentTarget.dataset.pid;
834 var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; 855 var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid;
835 wx.navigateTo({ url: lurl }); 856 wx.navigateTo({ url: lurl });
836 - 857 +
837 }, 858 },
838 -  
839 -  
840 -//扫一扫  
841 - getScancode:function(){  
842 - var _this = this;  
843 - getApp().globalData.no_clear=1; 859 +
  860 +
  861 + //扫一扫
  862 + getScancode: function () {
  863 + var _this = this;
  864 + getApp().globalData.no_clear = 1;
844 // 允许从相机和相册扫码 865 // 允许从相机和相册扫码
845 wx.scanCode({ 866 wx.scanCode({
846 success: (res) => { 867 success: (res) => {
847 - var result = res.result;  
848 - wx.navigateTo({  
849 - url: "/pages/goods/search/search?s_key="+result,  
850 - }); 868 + var result = res.result;
  869 + wx.navigateTo({
  870 + url: "/pages/goods/search/search?s_key=" + result,
  871 + });
851 } 872 }
852 }) 873 })
853 }, 874 },
854 -  
855 - 875 +
  876 +
856 onUnload: function () { 877 onUnload: function () {
857 //this.destroyActivityTimer(); 878 //this.destroyActivityTimer();
858 }, 879 },
@@ -882,97 +903,177 @@ Page({ @@ -882,97 +903,177 @@ Page({
882 console.log(data.data.data.pageData) 903 console.log(data.data.data.pageData)
883 that.setData({ 904 that.setData({
884 requestData: data.data.data.pageData, 905 requestData: data.data.data.pageData,
885 - is_go: 1 906 + is_go: 1
886 }); 907 });
887 that.setData({ is_go: 1 }); 908 that.setData({ is_go: 1 });
888 - that.data.stylePage++ , null == that.data.allData && (that.data.allData = Object.assign({}, data.data.data.pageData)), 909 + that.data.stylePage++, null == that.data.allData && (that.data.allData = Object.assign({}, data.data.data.pageData)),
889 wx.stopPullDownRefresh(); 910 wx.stopPullDownRefresh();
890 } 911 }
891 }); 912 });
892 913
893 }, 914 },
894 915
895 - 916 +
896 // 左侧更新 917 // 左侧更新
897 scrollLower: function (data) { 918 scrollLower: function (data) {
898 - if(this.data.is_no_more) return false; 919 + if (this.data.is_no_more) return false;
899 var that = this; 920 var that = this;
900 clearInterval(that.data.timer); 921 clearInterval(that.data.timer);
901 that.setData({ 922 that.setData({
902 stylePage: that.data.stylePage + 1, 923 stylePage: that.data.stylePage + 1,
903 countDownNum: 3, 924 countDownNum: 3,
904 lastMsg: false, 925 lastMsg: false,
905 - });  
906 - that.style(that.data.stylePage, that.data.cat_id); 926 + });
  927 + // if (nextTimeOff) {
  928 + // clearTimeout(nextTimeOff)
  929 + // }
  930 + // nextTimeOff = setTimeout(()=>{
  931 + that.style(that.data.stylePage, that.data.cat_id);
  932 + // },1000)
  933 + },
  934 + scrolltoupper(){
  935 + console.log('到顶部--------');
  936 + this.setData({
  937 + toupper:true
  938 + })
  939 + },
  940 + bScroll(even){
  941 + console.log('滑动开始');
  942 + console.log(even);
  943 + this.setData({
  944 + sClientY:even.changedTouches.length>0 ? even.changedTouches[0].clientY : 0
  945 + })
  946 + },
  947 + btouMove(even){
  948 + console.log('滑动结束');
  949 + console.log(even);
  950 + let eClientY = even.changedTouches.length>0 ? even.changedTouches[0].clientY : 0
  951 + let sClientY = this.data.sClientY
  952 + console.log(eClientY - sClientY);
  953 + if (eClientY - sClientY > 0) {
  954 + console.log('下滑');
  955 + console.log(this.data.toupper);
  956 + if (this.data.toupper) {
  957 + console.log('下滑请求数据');
  958 + this.setData({msgStatus:false,is_no_more:false})
  959 + clearInterval(this.data.timer);
  960 + this.nextCategory(true)
  961 + }else{
  962 + this.disNexCat()
  963 + }
  964 + }else{
  965 + console.log('上滑');
  966 + if (!this.data.msgStatus) {
  967 + this.setData({
  968 + toupper:false
  969 + })
  970 + }
  971 + this.disNexCat()
  972 + }
  973 + },
  974 + disNexCat(){
  975 + let that = this
  976 + const { windowHeight } = wx.getSystemInfoSync()
  977 + wx.createSelectorQuery().select('#sview').boundingClientRect(function(rect){
  978 + if (rect) {
  979 + const { top,height } = rect
  980 + if ((top < windowHeight) && (top + height >0) ) {
  981 + let nextShow2 = that.data.nextShow2
  982 + if (nextShow2) {
  983 + that.nextCategory()
  984 + }else{
  985 + that.setData({
  986 + nextShow2:true
  987 + })
  988 + }
  989 + }else{
  990 + that.setData({
  991 + nextShow2:false
  992 + })
  993 + }
  994 + }
  995 + }).exec()
907 }, 996 },
908 -  
909 //页面版面风格三的时候请求推荐商品 返回 997 //页面版面风格三的时候请求推荐商品 返回
910 style: function (page, cid) { 998 style: function (page, cid) {
911 console.log("page:=" + page) 999 console.log("page:=" + page)
  1000 + console.log("cid:=" + cid)
  1001 + console.log("cid:=" + this.data.cat_id);
912 var s = this 1002 var s = this
913 e.get("/api/weshop/goods/page?1=1", { 1003 e.get("/api/weshop/goods/page?1=1", {
914 data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, 1004 data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 },
915 success: function (e) { 1005 success: function (e) {
  1006 + console.log('上拉加载。。。。。。。。。');
916 console.log(e.data.data.pageData) 1007 console.log(e.data.data.pageData)
917 1008
918 if (e.data.data.pageData.length > 0) { 1009 if (e.data.data.pageData.length > 0) {
  1010 + clearInterval(s.data.timer);
919 s.setData({ 1011 s.setData({
920 - msgStatus: false,is_no_more:0 1012 + msgStatus: false, is_no_more: 0
921 }); 1013 });
922 //如果有数据 判断分页为第一页的时候直接渲染数据 1014 //如果有数据 判断分页为第一页的时候直接渲染数据
923 if (page > 1) { 1015 if (page > 1) {
924 //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 1016 //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面
925 var arr = s.data.requestData 1017 var arr = s.data.requestData
926 -  
927 - for (var i = 0; i < e.data.data.pageData.length;i++){ 1018 +
  1019 + for (var i = 0; i < e.data.data.pageData.length; i++) {
928 arr.push(e.data.data.pageData[i]); 1020 arr.push(e.data.data.pageData[i]);
929 } 1021 }
930 - 1022 +
  1023 + if (e.data.data.pageData.length < e.data.data.pageSize) {
  1024 + s.setData({
  1025 + nextShow:true,
  1026 + // nextShow2:true
  1027 + })
  1028 + }
  1029 +
931 s.setData({ 1030 s.setData({
932 requestData: arr 1031 requestData: arr
933 }); 1032 });
934 -  
935 - }else{ 1033 +
  1034 + } else {
936 s.setData({ 1035 s.setData({
937 requestData: e.data.data.pageData 1036 requestData: e.data.data.pageData
938 }); 1037 });
  1038 + if ( e.data.data.pageData.length && (e.data.data.pageData.length < e.data.data.pageSize)) {
  1039 + s.setData({
  1040 + nextShow:true,
  1041 + // nextShow2:true
  1042 + })
  1043 + const { windowHeight } = wx.getSystemInfoSync()
  1044 + wx.createSelectorQuery().select('#sview').boundingClientRect(function(rect){
  1045 + if (rect) {
  1046 + const { top,height } = rect
  1047 + if ((top < windowHeight) && (top + height >0) ) {
  1048 + s.setData({
  1049 + nextShow2:true
  1050 + })
  1051 + }
  1052 + }
  1053 + }).exec()
  1054 + }
939 if (wx.pageScrollTo) { 1055 if (wx.pageScrollTo) {
940 wx.pageScrollTo({ 1056 wx.pageScrollTo({
941 scrollTop: 0 1057 scrollTop: 0
942 }) 1058 })
943 - } 1059 + }
944 } 1060 }
945 1061
946 - s.setData({  
947 - dataLength: s.data.requestData.length,  
948 - });  
949 - 1062 + s.setData({
  1063 + dataLength: s.data.requestData.length,
  1064 + });
  1065 +
950 } else { 1066 } else {
951 //没有数据页面显示暂无数据 1067 //没有数据页面显示暂无数据
952 if (page != 1) { 1068 if (page != 1) {
953 - var dataArray = s.data.one_level_classify  
954 - var index = s.data.index  
955 - dataArray[index]['items']['is_show_class'] = false  
956 - //没有下一个类别的时候  
957 - if(index+1>=dataArray.length){  
958 - s.setData({is_no_more:1});  
959 - }else{  
960 - dataArray[index+1]['items']['is_show_class'] = true  
961 - console.log(dataArray[index + 1]['items'])  
962 - s.setData({  
963 - msgStatus: true,  
964 - stylePage: 1,  
965 - index: index + 1,  
966 - select_classify_on: index + 1,  
967 - cat_id: dataArray[index + 1]['items']['id'],  
968 - classify_name: dataArray[index + 1]['items']['name'],  
969 - one_level_classify: dataArray,  
970 - is_no_more:0  
971 - });  
972 - s.style(s.data.stylePage, dataArray[index + 1]['items']['id'])  
973 - }  
974 -  
975 - }else{ 1069 + let nextShow = s.data.nextShow
  1070 +
  1071 + if (!nextShow) {
  1072 + s.setData({
  1073 + nextShow:true
  1074 + })
  1075 + }
  1076 + } else {
976 //没有数据而且是第一页的时候 1077 //没有数据而且是第一页的时候
977 s.setData({ 1078 s.setData({
978 stylePage: 1, 1079 stylePage: 1,
@@ -982,9 +1083,10 @@ Page({ @@ -982,9 +1083,10 @@ Page({
982 msgStatus: true, 1083 msgStatus: true,
983 countDownNum: countDownNum, 1084 countDownNum: countDownNum,
984 requestData: [], 1085 requestData: [],
985 - is_no_more:0, 1086 + is_no_more: 0,
986 }); 1087 });
987 - s.data.timer=setInterval(function () { 1088 + clearInterval(s.data.timer);
  1089 + s.data.timer = setInterval(function () {
988 if (countDownNum == 0) { 1090 if (countDownNum == 0) {
989 clearInterval(s.data.timer); 1091 clearInterval(s.data.timer);
990 //关闭定时器之后,可作其他处理 1092 //关闭定时器之后,可作其他处理
@@ -997,50 +1099,83 @@ Page({ @@ -997,50 +1099,83 @@ Page({
997 var dataArray = s.data.one_level_classify 1099 var dataArray = s.data.one_level_classify
998 var index = s.data.index 1100 var index = s.data.index
999 console.log(dataArray[index + 1]) 1101 console.log(dataArray[index + 1])
1000 - if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined"){ 1102 + if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined") {
1001 console.log("dataArray[index + 1] = undefined") 1103 console.log("dataArray[index + 1] = undefined")
1002 s.setData({ 1104 s.setData({
1003 stylePage: 1, 1105 stylePage: 1,
1004 msgStatus: true, 1106 msgStatus: true,
1005 lastMsg: true 1107 lastMsg: true
1006 }); 1108 });
1007 - }else{ 1109 + } else {
1008 dataArray[index]['items']['is_show_class'] = false 1110 dataArray[index]['items']['is_show_class'] = false
1009 - dataArray[index+1]['items']['is_show_class'] = true 1111 + dataArray[index + 1]['items']['is_show_class'] = true
1010 s.setData({ 1112 s.setData({
1011 stylePage: 1, 1113 stylePage: 1,
1012 index: index + 1, 1114 index: index + 1,
1013 select_classify_on: index + 1, 1115 select_classify_on: index + 1,
1014 cat_id: dataArray[index + 1]['items']['id'], 1116 cat_id: dataArray[index + 1]['items']['id'],
1015 classify_name: dataArray[index + 1]['items']['name'], 1117 classify_name: dataArray[index + 1]['items']['name'],
1016 - one_level_classify:dataArray 1118 + one_level_classify: dataArray
1017 }); 1119 });
1018 s.style(s.data.stylePage, dataArray[index + 1]['items']['id']); 1120 s.style(s.data.stylePage, dataArray[index + 1]['items']['id']);
1019 } 1121 }
1020 - 1122 +
1021 } 1123 }
1022 countDownNum--; 1124 countDownNum--;
1023 s.setData({ 1125 s.setData({
1024 countDownNum: countDownNum 1126 countDownNum: countDownNum
1025 }) 1127 })
1026 var arr2 = s.data.one_level_classify 1128 var arr2 = s.data.one_level_classify
1027 - for(var i=0;i<arr2.length;i++){  
1028 - if(i == s.data.index){  
1029 - arr2[i]['items']['is_show_class'] = true  
1030 - }else{  
1031 - arr2[i]['items']['is_show_class'] = false 1129 + for (var i = 0; i < arr2.length; i++) {
  1130 + if (i == s.data.index) {
  1131 + arr2[i]['items']['is_show_class'] = true
  1132 + } else {
  1133 + arr2[i]['items']['is_show_class'] = false
1032 } 1134 }
1033 } 1135 }
1034 - s.setData({ one_level_classify: arr2}); 1136 + s.setData({ one_level_classify: arr2 });
1035 }, 1000) 1137 }, 1000)
1036 } 1138 }
1037 -  
1038 - 1139 +
  1140 +
1039 } 1141 }
1040 } 1142 }
1041 }); 1143 });
1042 }, 1144 },
1043 - 1145 + //下一个品类
  1146 + nextCategory(up=false){
  1147 + console.log('跳转下一个页面');
  1148 + clearInterval(this.data.timer);
  1149 + this.setData({
  1150 + nextShow:false
  1151 + })
  1152 + var dataArray = this.data.one_level_classify
  1153 + var index = this.data.index
  1154 + let s = 1
  1155 + if (up) {
  1156 + s = -1
  1157 + }
  1158 + dataArray[index]['items']['is_show_class'] = false
  1159 + //没有下一个类别的时候
  1160 + if (index + s >= dataArray.length || index+s < 0) {
  1161 + this.setData({ is_no_more: 1 });
  1162 + } else {
  1163 + dataArray[index + s]['items']['is_show_class'] = true
  1164 + console.log(dataArray[index + s]['items'])
  1165 + this.setData({
  1166 + msgStatus: true,
  1167 + stylePage: 1,
  1168 + index: index + s,
  1169 + select_classify_on: index + s,
  1170 + cat_id: dataArray[index + s]['items']['id'],
  1171 + classify_name: dataArray[index + s]['items']['name'],
  1172 + one_level_classify: dataArray,
  1173 + is_no_more: 0,
  1174 + currentTab:index + s
  1175 + });
  1176 + this.style(this.data.stylePage, dataArray[index + s]['items']['id'])
  1177 + }
  1178 + },
1044 1179
1045 openFilterModal: function () { 1180 openFilterModal: function () {
1046 this.setData({ 1181 this.setData({
@@ -1090,28 +1225,28 @@ Page({ @@ -1090,28 +1225,28 @@ Page({
1090 func(ob); 1225 func(ob);
1091 }) 1226 })
1092 }, 1227 },
1093 - 1228 +
1094 //导航跳转 1229 //导航跳转
1095 - nav_goto:function(e){  
1096 - var url=e.currentTarget.dataset.url;  
1097 - if(!url || url=='') return;  
1098 - if(url[0]!='/') url='/'+url;  
1099 - getApp().goto(url);  
1100 - },  
1101 -  
1102 - onShareTimeline(){  
1103 - getApp().globalData.no_clear=1;  
1104 - var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';  
1105 - if(!store_name)  
1106 - store_name=getApp().globalData.setting.appName;  
1107 -  
1108 - var user_id=getApp().globalData.user_id;  
1109 - if(!user_id) user_id=0;  
1110 -  
1111 - return {  
1112 - title:'商品分类-'+store_name,  
1113 - query: "first_leader=" + user_id  
1114 - } 1230 + nav_goto: function (e) {
  1231 + var url = e.currentTarget.dataset.url;
  1232 + if (!url || url == '') return;
  1233 + if (url[0] != '/') url = '/' + url;
  1234 + getApp().goto(url);
  1235 + },
  1236 +
  1237 + onShareTimeline() {
  1238 + getApp().globalData.no_clear = 1;
  1239 + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : '';
  1240 + if (!store_name)
  1241 + store_name = getApp().globalData.setting.appName;
  1242 +
  1243 + var user_id = getApp().globalData.user_id;
  1244 + if (!user_id) user_id = 0;
  1245 +
  1246 + return {
  1247 + title: '商品分类-' + store_name,
  1248 + query: "first_leader=" + user_id
1115 } 1249 }
  1250 + }
1116 1251
1117 }); 1252 });
1118 \ No newline at end of file 1253 \ No newline at end of file
pages/goods/categoryList/categoryList.wxml
@@ -5,231 +5,219 @@ @@ -5,231 +5,219 @@
5 <!-- 风格1 --> 5 <!-- 风格1 -->
6 <block wx:if="{{is_used_share==0}}"> 6 <block wx:if="{{is_used_share==0}}">
7 <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> 7 <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}">
8 - <view class="swiper-tab" >  
9 - <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}"  
10 - data-current="0" bindtap="clickTab">分类</view>  
11 - <view wx:if="{{is_show_gb}}" class="swiper-tab-item {{currentTab==1?'active':''}}"  
12 - data-current="1" bindtap="clickTab">国家</view>  
13 - <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}"  
14 - data-current="2" bindtap="clickTab">品牌</view>  
15 - <view wx:if="{{is_show_xm}}" class="swiper-tab-item {{currentTab==3?'active':''}}"  
16 - data-current="3" bindtap="clickTab">项目</view>  
17 - </view> 8 + <view class="swiper-tab">
  9 + <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">分类</view>
  10 + <view wx:if="{{is_show_gb}}" class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">国家</view>
  11 + <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}" data-current="2" bindtap="clickTab">品牌</view>
  12 + <view wx:if="{{is_show_xm}}" class="swiper-tab-item {{currentTab==3?'active':''}}" data-current="3" bindtap="clickTab">项目</view>
  13 + </view>
18 </view> 14 </view>
19 - <view class="search-box " bindtap="goseach">  
20 - <view class="search-inner">  
21 - <view class="search-img">  
22 - <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image>  
23 - </view>  
24 - <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input>  
25 - </view> 15 + <view class="search-box " bindtap="goseach">
  16 + <view class="search-inner">
  17 + <view class="search-img">
  18 + <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image>
  19 + </view>
  20 + <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input>
  21 + </view>
26 </view> 22 </view>
27 <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> 23 <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}">
28 - <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx"> 24 + <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx">
29 <!--------分类----------> 25 <!--------分类---------->
30 - <swiper-item >  
31 - <scroll-view scroll-y="true" class="fenlei-list"  
32 - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" >  
33 - <block wx:for="{{catelist}}" wx:for-item="fitem" >  
34 - <view class='f_item'>  
35 - <view class="pic_view" bindtap="go_cate" data-cid="{{fitem.items.id}}" data-pid="0"><image class='fl_img' src='{{iurl}}{{fitem.items.image}}' binderror="bind_bnerr2" data-errorimg="catelist[{{index}}].items.image"></image>  
36 - <view class='over_view'></view>  
37 - <text class='f_item_over_t'>{{fitem.items.name}}</text></view>  
38 - <view class='fenlei_text_v'>  
39 - <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item"  
40 - bindtap="go_cate" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view>  
41 - </view>  
42 - </view>  
43 - </block>  
44 - </scroll-view> 26 + <swiper-item>
  27 + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;">
  28 + <block wx:for="{{catelist}}" wx:for-item="fitem">
  29 + <view class='f_item'>
  30 + <view class="pic_view" bindtap="go_cate" data-cid="{{fitem.items.id}}" data-pid="0">
  31 + <image class='fl_img' src='{{iurl}}{{fitem.items.image}}' binderror="bind_bnerr2" data-errorimg="catelist[{{index}}].items.image"></image>
  32 + <view class='over_view'></view>
  33 + <text class='f_item_over_t'>{{fitem.items.name}}</text>
  34 + </view>
  35 + <view class='fenlei_text_v'>
  36 + <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="go_cate" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view>
  37 + </view>
  38 + </view>
  39 + </block>
  40 + </scroll-view>
45 </swiper-item> 41 </swiper-item>
46 <!-------国别----------> 42 <!-------国别---------->
47 <swiper-item> 43 <swiper-item>
48 - <scroll-view scroll-y="true" class="fenlei-list"  
49 - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" >  
50 - <view class='f_item'  
51 - bindtap="go_nation" data-nid="{{bitem.id}}"  
52 - wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx">  
53 - <view>  
54 - <image wx:if="{{bitem.imgtype==1}}" class='n_img' src='{{bitem.logo}}'></image>  
55 - <image wx:else class='n_img' src='{{iurl}}{{bitem.logo}}'></image>  
56 -  
57 - <view class='nation_box'>  
58 - <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view>  
59 - <view class='nt_2'>{{bitem.enname}}</view>  
60 - </view>  
61 - </view>  
62 - </view>  
63 - </scroll-view> 44 + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;">
  45 + <view class='f_item' bindtap="go_nation" data-nid="{{bitem.id}}" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx">
  46 + <view>
  47 + <image wx:if="{{bitem.imgtype==1}}" class='n_img' src='{{bitem.logo}}'></image>
  48 + <image wx:else class='n_img' src='{{iurl}}{{bitem.logo}}'></image>
  49 +
  50 + <view class='nation_box'>
  51 + <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view>
  52 + <view class='nt_2'>{{bitem.enname}}</view>
  53 + </view>
  54 + </view>
  55 + </view>
  56 + </scroll-view>
64 </swiper-item> 57 </swiper-item>
65 <!-- 品牌 --> 58 <!-- 品牌 -->
66 <swiper-item> 59 <swiper-item>
67 - <scroll-view scroll-y="true" class="fenlei-list"  
68 - style="height: {{abc}}rpx;" scroll-into-view="{{scrollIntoView}}">  
69 - <block wx:for="{{groups}}" wx:for-item="group" wx:for-index="pidx">  
70 - <view >  
71 - <view id="{{group.zm}}" class="group-name">{{group.zm}}</view>  
72 - <view class="group-users">  
73 - <view wx:for="{{group.array}}" bindtap="go_brand" data-bid="{{user.id}}"  
74 - wx:for-item="user" wx:for-index="idx" class="user box box-lr">  
75 - <image class="user-avatar-img" src="{{user.logo}}"  
76 - data-errorimg="groups[{{pidx}}].array[{{idx}}].logo"  
77 - binderror="bind_bnerr"></image>  
78 - </view>  
79 - </view>  
80 - </view>  
81 - </block>  
82 - </scroll-view>  
83 -  
84 - <view class="nav box box-tb my-nav" catchtouchmove="touchmove" catchtouchend="touchend" >  
85 -<!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> -->  
86 - <!-- <icon color="icon-close" color="#000" size="30" type="icon-shangjiantou" style=""></icon> -->  
87 - <view class="iconfont icon-shangjiantou"></view>  
88 - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}"  
89 - class="flex box box-align-center box-pack-center letter">  
90 - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> 60 + <scroll-view scroll-y="true" class="fenlei-list" style="height: {{abc}}rpx;" scroll-into-view="{{scrollIntoView}}">
  61 + <block wx:for="{{groups}}" wx:for-item="group" wx:for-index="pidx">
  62 + <view>
  63 + <view id="{{group.zm}}" class="group-name">{{group.zm}}</view>
  64 + <view class="group-users">
  65 + <view wx:for="{{group.array}}" bindtap="go_brand" data-bid="{{user.id}}" wx:for-item="user" wx:for-index="idx" class="user box box-lr">
  66 + <image class="user-avatar-img" src="{{user.logo}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr"></image>
  67 + </view>
91 </view> 68 </view>
92 </view> 69 </view>
  70 + </block>
  71 + </scroll-view>
  72 +
  73 + <view class="nav box box-tb my-nav" catchtouchmove="touchmove" catchtouchend="touchend">
  74 + <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> -->
  75 + <!-- <icon color="icon-close" color="#000" size="30" type="icon-shangjiantou" style=""></icon> -->
  76 + <view class="iconfont icon-shangjiantou"></view>
  77 + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter">
  78 + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text>
  79 + </view>
  80 + </view>
93 </swiper-item> 81 </swiper-item>
94 - <!-------项目---------->  
95 - <swiper-item wx:if="{{is_show_xm}}">  
96 - <scroll-view scroll-y="true" class="fenlei-list"  
97 - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" >  
98 - <block wx:if="{{xmlist && xmlist.length != 0}}">  
99 - <block wx:for="{{xmlist}}" wx:for-item="fitem" >  
100 - <view class='f_item'>  
101 - <view class="pic_view" bindtap="goServiceCategoryList" data-cid="{{fitem.id}}" data-pid="0">  
102 -  
103 - <image wx:if="{{fitem.showImgType==1}}" binderror="bind_bnerr2" class='fl_img' data-errorimg="xmlist[{{index}}].showImg" src='{{fitem.showImg}}'></image>  
104 - <image wx:else class='fl_img' binderror="bind_bnerr2" data-errorimg="xmlist[{{index}}].showImg" src='{{iurl}}{{fitem.showImg}}'></image>  
105 -  
106 - <view class='over_view'></view>  
107 - <text class='f_item_over_t'>{{fitem.name}}</text></view>  
108 - <view class='fenlei_text_v'>  
109 - <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="goServiceCategoryList" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view>  
110 - </view>  
111 - </view>  
112 - </block>  
113 - </block>  
114 -  
115 -  
116 - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>  
117 - </scroll-view>  
118 - </swiper-item>  
119 - </swiper>  
120 - <view class="no-data" wx:if="{{!is_date}}"> 82 + <!-------项目---------->
  83 + <swiper-item wx:if="{{is_show_xm}}">
  84 + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;">
  85 + <block wx:if="{{xmlist && xmlist.length != 0}}">
  86 + <block wx:for="{{xmlist}}" wx:for-item="fitem">
  87 + <view class='f_item'>
  88 + <view class="pic_view" bindtap="goServiceCategoryList" data-cid="{{fitem.id}}" data-pid="0">
  89 +
  90 + <image wx:if="{{fitem.showImgType==1}}" binderror="bind_bnerr2" class='fl_img' data-errorimg="xmlist[{{index}}].showImg" src='{{fitem.showImg}}'></image>
  91 + <image wx:else class='fl_img' binderror="bind_bnerr2" data-errorimg="xmlist[{{index}}].showImg" src='{{iurl}}{{fitem.showImg}}'></image>
  92 +
  93 + <view class='over_view'></view>
  94 + <text class='f_item_over_t'>{{fitem.name}}</text>
  95 + </view>
  96 + <view class='fenlei_text_v'>
  97 + <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="goServiceCategoryList" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view>
  98 + </view>
  99 + </view>
  100 + </block>
  101 + </block>
  102 +
  103 +
  104 + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>
  105 + </scroll-view>
  106 + </swiper-item>
  107 + </swiper>
  108 + <view class="no-data" wx:if="{{!is_date}}">
121 <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> 109 <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
122 <view class="no-data-title">暂无分类</view> 110 <view class="no-data-title">暂无分类</view>
123 <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> 111 <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>
124 - </view> 112 + </view>
125 </block> 113 </block>
126 <block wx:elif="{{is_do}}"> 114 <block wx:elif="{{is_do}}">
127 - <view class="no-data" > 115 + <view class="no-data">
128 <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> 116 <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
129 <view class="no-data-title">商家暂未设置分类</view> 117 <view class="no-data-title">商家暂未设置分类</view>
130 <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> 118 <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>
131 - </view> 119 + </view>
132 </block> 120 </block>
133 </block> 121 </block>
134 <!-- 风格2 --> 122 <!-- 风格2 -->
135 <block wx:elif="{{is_used_share == 1}}"> 123 <block wx:elif="{{is_used_share == 1}}">
136 - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}">  
137 - <!-- 新版分类头部 -->  
138 - <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99">  
139 - <!-- <view class="xc-search-inner "> 124 + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}">
  125 + <!-- 新版分类头部 -->
  126 + <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99">
  127 + <!-- <view class="xc-search-inner ">
140 <view class="search-img left"> 128 <view class="search-img left">
141 <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> 129 <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image>
142 </view> 130 </view>
143 <input bindfocus="goseach" class="search-cont" placeholder="搜索店铺商品" type="text"></input> 131 <input bindfocus="goseach" class="search-cont" placeholder="搜索店铺商品" type="text"></input>
144 </view> --> 132 </view> -->
145 - <!-- 搜索框 -->  
146 - <view class="search-container f1">  
147 - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view>  
148 - </view>  
149 - <view class="pdl30" bindtap="getScancode" >  
150 - <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>  
151 - <!-- <view class="fs24">扫一扫</view> -->  
152 - </view>  
153 -  
154 - </view>  
155 -  
156 -  
157 - <!-- 分类项目内容 22 -->  
158 - <view class="flex project_height" style="height:100%;box-sizing:border-box;padding-bottom:100rpx;padding-top:108rpx;" id="two_type">  
159 - <!-- 分类项目的类型 -->  
160 - <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;">  
161 - <view class="project_type-frame" style="margin-bottom:120rpx;">  
162 - <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}">  
163 - <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->  
164 - <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}" data-index="223" data-name="国家" wx:if="{{is_country}}">  
165 -  
166 - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> -->  
167 - <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view>  
168 -  
169 - </view>  
170 - </view>  
171 -  
172 - <view wx:if="{{is_show_pp}}">  
173 - <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->  
174 - <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}" data-index="220" data-name="品牌">  
175 -  
176 - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> -->  
177 - <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view>  
178 - </view> 133 + <!-- 搜索框 -->
  134 + <view class="search-container f1">
  135 + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view>
  136 + </view>
  137 + <view class="pdl30" bindtap="getScancode">
  138 + <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>
  139 + <!-- <view class="fs24">扫一扫</view> -->
  140 + </view>
  141 +
  142 + </view>
  143 +
  144 +
  145 + <!-- 分类项目内容 22 -->
  146 + <view class="flex project_height" style="height:100%;box-sizing:border-box;padding-bottom:100rpx;padding-top:108rpx;" id="two_type">
  147 + <!-- 分类项目的类型 -->
  148 + <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;">
  149 + <view class="project_type-frame" style="margin-bottom:120rpx;">
  150 + <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}">
  151 + <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->
  152 + <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}" data-index="223" data-name="国家" wx:if="{{is_country}}">
  153 +
  154 + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> -->
  155 + <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view>
  156 +
  157 + </view>
  158 + </view>
  159 +
  160 + <view wx:if="{{is_show_pp}}">
  161 + <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->
  162 + <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}" data-index="220" data-name="品牌">
  163 +
  164 + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> -->
  165 + <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view>
  166 + </view>
  167 + </view>
  168 +
  169 + <!-- 项目 -->
  170 + <view wx:if="{{is_show_xm}}">
  171 + <view bindtap="click_classify" class="fs30 {{select_classify_on==221?'select_classify':''}}" data-index="221" data-name="项目">
  172 + <view class="tab-bar-item sort-name ellipsis-1">项目</view>
  173 + </view>
  174 + </view>
  175 +
  176 +
  177 + <!-- 品类 -->
  178 + <view wx:if="{{is_show_pl}}">
  179 + <view wx:for="{{one_level_classify}}" wx:for-item="ittms">
  180 + <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}">
  181 + <!-- 添加左边红色条 -->
  182 + <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->
  183 + <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}">
  184 + <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view>
  185 + </view>
179 </view> 186 </view>
180 -  
181 - <!-- 项目 -->  
182 - <view wx:if="{{is_show_xm}}">  
183 - <view bindtap="click_classify" class="fs30 {{select_classify_on==221?'select_classify':''}}" data-index="221" data-name="项目">  
184 - <view class="tab-bar-item sort-name ellipsis-1">项目</view>  
185 - </view>  
186 - </view>  
187 -  
188 -  
189 - <!-- 品类 -->  
190 - <view wx:if="{{is_show_pl}}">  
191 - <view wx:for="{{one_level_classify}}" wx:for-item="ittms">  
192 - <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}">  
193 - <!-- 添加左边红色条 -->  
194 - <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->  
195 - <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}">  
196 - <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view>  
197 - </view>  
198 - </view>  
199 - </view>  
200 - </view>  
201 - 187 + </view>
202 </view> 188 </view>
203 189
204 </view> 190 </view>
205 - <!-- 分类项目的内容 -->  
206 - <view class="classify_content" style="padding-left:196rpx;"> 191 +
  192 + </view>
  193 + <!-- 分类项目的内容 -->
  194 + <view class="classify_content" style="padding-left:196rpx;">
207 <!-- 国家的样式 --> 195 <!-- 国家的样式 -->
208 <block wx:if="{{select_classify_on==223&&is_show_gb}}"> 196 <block wx:if="{{select_classify_on==223&&is_show_gb}}">
209 - <view class="classify_name fs28 flex-space-between">  
210 - <view>{{ishaf_three==1?good_list.name:classify_name}}</view> 197 + <view class="classify_name fs28 flex-space-between">
  198 + <view>{{ishaf_three==1?good_list.name:classify_name}}</view>
211 199
212 - </view>  
213 - <view class=" classify_content-frame flex-space-between " >  
214 - <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" >  
215 - <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image>  
216 - <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image>  
217 -  
218 - <view class='nation_box abs box'>  
219 - <view class='nt_1 t-c line-height' style="height:50rpx">  
220 - <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text>  
221 - </view>  
222 - <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx">  
223 - <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text>  
224 - </view>  
225 - </view>  
226 - <!--<view class='nation_box abs box' style="top:20rpx">-->  
227 - <!--</view>-->  
228 - </view>  
229 - </view> 200 + </view>
  201 + <view class=" classify_content-frame flex-space-between ">
  202 + <view bindtap="go_nation" class="country_img-frame rel outer_location" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}">
  203 + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image>
  204 + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image>
  205 +
  206 + <view class='nation_box abs box'>
  207 + <view class='nt_1 t-c line-height' style="height:50rpx">
  208 + <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text>
  209 + </view>
  210 + <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx">
  211 + <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text>
  212 + </view>
  213 + </view>
  214 + <!--<view class='nation_box abs box' style="top:20rpx">-->
  215 + <!--</view>-->
  216 + </view>
  217 + </view>
230 </block> 218 </block>
231 <!-- 品牌 --> 219 <!-- 品牌 -->
232 -<!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> 220 + <!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}">
233 221
234 <view class="classify_name fs28 flex-space-between"> 222 <view class="classify_name fs28 flex-space-between">
235 <view>{{classify_name}}</view> 223 <view>{{classify_name}}</view>
@@ -250,136 +238,134 @@ @@ -250,136 +238,134 @@
250 </block> 238 </block>
251 </view> 239 </view>
252 </block> --> 240 </block> -->
253 - <block wx:if="{{select_classify_on==220&&is_show_pp}}">  
254 - <scroll-view scroll-y="true" class="fenlei-list"  
255 - style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}">  
256 - <view class="classify_name fs28 flex-space-between">  
257 - <view>{{classify_name}}</view>  
258 - </view>  
259 - <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx">  
260 - <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view>  
261 - <view class="classify_content-frame flex flex-wrap">  
262 - <view class="brand_img_frame "wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}" >  
263 - <view class="t-c">  
264 - <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image>  
265 - <view class="brand_img_name ellipsis-1 fs24">{{user.name}}2</view>  
266 - </view>  
267 - </view>  
268 - </view>  
269 - </block>  
270 - </scroll-view>  
271 - <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend" >  
272 - <view class="iconfont icon-shangjiantou"></view>  
273 - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}"  
274 - class="flex box box-align-center box-pack-center letter">  
275 - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text>  
276 - </view>  
277 - </view>  
278 - </block>  
279 -  
280 -  
281 -  
282 -  
283 - <!-- 卡项 -->  
284 - <!-- <block wx:if="{{select_classify_on==220&&is_show_xm}}"> -->  
285 - <block wx:if="{{select_classify_on==221&&is_show_xm}}">  
286 - <block wx:if="{{xmlist && xmlist.length != 0}}">  
287 - <view class="classify_name fs28 flex-space-between">  
288 - <view>{{classify_name}}</view>  
289 - </view>  
290 -  
291 - <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;">  
292 - <block wx:for="{{xmlist}}">  
293 - <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}" >  
294 - <view class="t-c">  
295 - <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image>  
296 - <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image>  
297 - <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view>  
298 - </view>  
299 - </view>  
300 - </block>  
301 - </view>  
302 - </block>  
303 -  
304 - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>  
305 - </block>  
306 -  
307 - <!-- 品类-->  
308 - <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}">  
309 - <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}">  
310 - <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> -->  
311 - <view class="my-container">  
312 - <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'>  
313 - <view class="classify_title ellipsis-1">{{classify_name}}</view>  
314 - <view class="flex select_more ai-center" >  
315 - <view class="red-co fs24" >更多</view>  
316 - <view class="bg_right width_height" style="margin-top: 0;"></view> 241 + <block wx:if="{{select_classify_on==220&&is_show_pp}}">
  242 + <scroll-view scroll-y="true" class="fenlei-list" style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}">
  243 + <view class="classify_name fs28 flex-space-between">
  244 + <view>{{classify_name}}</view>
  245 + </view>
  246 + <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx">
  247 + <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view>
  248 + <view class="classify_content-frame flex flex-wrap">
  249 + <view class="brand_img_frame " wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}">
  250 + <view class="t-c">
  251 + <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image>
  252 + <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view>
  253 + </view>
  254 + </view>
317 </view> 255 </view>
  256 + </block>
  257 + </scroll-view>
  258 + <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend">
  259 + <view class="iconfont icon-shangjiantou"></view>
  260 + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter">
  261 + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text>
318 </view> 262 </view>
319 - <!-- 显示2级列表 -->  
320 - <view class="classify_content-frame flex-wrap">  
321 - <block wx:if="{{goodslist && goodslist.length>0}}">  
322 - <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx">  
323 - <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate">  
324 - <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>  
325 - <view class="brand_img_name fs24 ellipsis-1 pdh10">{{goods.items.name}}</view>  
326 - </view>  
327 - </block>  
328 - </block>  
329 - <block wx:else>  
330 - <view class="no_child_lev fs28">该类别无子级</view>  
331 - </block>  
332 - </view> 263 + </view>
  264 + </block>
  265 +
  266 +
333 267
  268 +
  269 + <!-- 卡项 -->
  270 + <!-- <block wx:if="{{select_classify_on==220&&is_show_xm}}"> -->
  271 + <block wx:if="{{select_classify_on==221&&is_show_xm}}">
  272 + <block wx:if="{{xmlist && xmlist.length != 0}}">
  273 + <view class="classify_name fs28 flex-space-between">
  274 + <view>{{classify_name}}</view>
334 </view> 275 </view>
  276 +
  277 + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;">
  278 + <block wx:for="{{xmlist}}">
  279 + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}">
  280 + <view class="t-c">
  281 + <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image>
  282 + <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image>
  283 + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view>
  284 + </view>
  285 + </view>
  286 + </block>
  287 + </view>
  288 + </block>
  289 +
  290 + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>
335 </block> 291 </block>
336 292
337 - <!-- 商品 含有3级的-->  
338 - <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}">  
339 - <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds">  
340 - <view> 293 + <!-- 品类-->
  294 + <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}">
  295 + <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}">
  296 + <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> -->
  297 + <view class="my-container">
  298 + <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'>
  299 + <view class="classify_title ellipsis-1">{{classify_name}}</view>
  300 + <view class="flex select_more ai-center">
  301 + <view class="red-co fs24">更多</view>
  302 + <view class="bg_right width_height" style="margin-top: 0;"></view>
  303 + </view>
  304 + </view>
  305 + <!-- 显示2级列表 -->
  306 + <view class="classify_content-frame flex-wrap">
  307 + <block wx:if="{{goodslist && goodslist.length>0}}">
  308 + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx">
  309 + <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate">
  310 + <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>
  311 + <view class="brand_img_name fs24 ellipsis-1 pdh10">{{goods.items.name}}</view>
  312 + </view>
  313 + </block>
  314 + </block>
  315 + <block wx:else>
  316 + <view class="no_child_lev fs28">该类别无子级</view>
  317 + </block>
  318 + </view>
  319 +
  320 + </view>
  321 + </block>
341 322
342 - <view class="classify_name fs28 flex-space-between ai-center"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> 323 + <!-- 商品 含有3级的-->
  324 + <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}">
  325 + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds">
  326 + <view>
343 327
344 - <view class="classify_title ellipsis-1">{{goods.items.name}}</view>  
345 - <view class="flex select_more ai-center" >  
346 - <view class="red-co fs24" >更多</view> 328 + <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'>
  329 +
  330 + <view class="classify_title ellipsis-1">{{goods.items.name}}</view>
  331 + <view class="flex select_more ai-center">
  332 + <view class="red-co fs24">更多</view>
347 <view class="bg_right width_height" style="margin-top: 0;"></view> 333 <view class="bg_right width_height" style="margin-top: 0;"></view>
348 - </view>  
349 - </view> 334 + </view>
  335 + </view>
350 336
351 - <block wx:if="{{goods.arrays.length>0}}">  
352 - <view class="classify_content-frame flex-wrap">  
353 - <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate">  
354 - <image class=" type_img"src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>  
355 - <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view>  
356 - </view>  
357 - </view>  
358 - <!-- <view class="divider_line"></view> -->  
359 - </block> 337 + <block wx:if="{{goods.arrays.length>0}}">
  338 + <view class="classify_content-frame flex-wrap">
  339 + <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate">
  340 + <image class=" type_img" src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>
  341 + <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view>
  342 + </view>
  343 + </view>
  344 + <!-- <view class="divider_line"></view> -->
  345 + </block>
360 346
361 - </view>  
362 - </block>  
363 - </block> 347 + </view>
  348 + </block>
  349 + </block>
364 </block> 350 </block>
365 - </view>  
366 - </view>  
367 - </block>  
368 - <block wx:elif="{{is_do}}">  
369 - <view class="no-data" >  
370 - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>  
371 - <view class="no-data-title">商家暂未设置分类</view>  
372 - <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>  
373 - </view>  
374 - </block> 351 + </view>
  352 + </view>
  353 + </block>
  354 + <block wx:elif="{{is_do}}">
  355 + <view class="no-data">
  356 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  357 + <view class="no-data-title">商家暂未设置分类</view>
  358 + <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>
  359 + </view>
  360 + </block>
375 361
376 </block> 362 </block>
377 <!-- 风格3 --> 363 <!-- 风格3 -->
378 <block wx:elif="{{is_used_share == 2}}"> 364 <block wx:elif="{{is_used_share == 2}}">
379 - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}">  
380 - <!-- 头部 -->  
381 - <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99">  
382 - <!-- <view class="share-height t-c" bindtap="getScancode" > 365 + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}">
  366 + <!-- 头部 -->
  367 + <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99">
  368 + <!-- <view class="share-height t-c" bindtap="getScancode" >
383 <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> 369 <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>
384 <view class="fs24"> 370 <view class="fs24">
385 扫一扫 371 扫一扫
@@ -391,50 +377,50 @@ @@ -391,50 +377,50 @@
391 </view> 377 </view>
392 <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input> 378 <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input>
393 </view> --> 379 </view> -->
394 -  
395 - <!-- 搜索框 -->  
396 - <view class="search-container f1">  
397 - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view>  
398 - </view>  
399 - <view class="pdl30" bindtap="getScancode" >  
400 - <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>  
401 - <!-- <view class="fs24">扫一扫</view> -->  
402 - </view> 380 +
  381 + <!-- 搜索框 -->
  382 + <view class="search-container f1">
  383 + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view>
403 </view> 384 </view>
404 - <!-- /头部 -->  
405 - <!-- 分类项目内容 -->  
406 - <view class="flex project_height" style="">  
407 - <!-- 分类项目的类型 -->  
408 - <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3">  
409 - <view class="project_type-frame" style="margin-bottom:120rpx;">  
410 - <view wx:if="{{is_show_gb}}">  
411 - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-index="223" data-name="国家" wx:if="{{is_country}}" data-current="223">  
412 - <text style="">国家</text>  
413 - </view>  
414 - </view>  
415 -  
416 - <view wx:if="{{is_show_pp}}">  
417 - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-index="220" data-name="品牌" data-current="220">  
418 - <text style="">品牌</text>  
419 - </view>  
420 - </view>  
421 -  
422 -  
423 - <!-- 卡项 -->  
424 - <view wx:if="{{is_show_xm}}">  
425 - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on == 221 ? 'active' : ''}}" data-index="221" data-name="项目" data-current="221">  
426 - <text>项目</text>  
427 - </view>  
428 - </view>  
429 -  
430 -  
431 -  
432 - <view wx:if="{{is_show_pl}}">  
433 - <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> -->  
434 - <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> -->  
435 - <!-- 添加左边红色条 -->  
436 - <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->  
437 - <!-- <view bindtap="click_classify" style="{{status_show == 0 && ittms == 0 ?'margin-top:0':'margin-top:0rpx'}}" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs30 t-c {{ittms.items.name.length==2? 'world_sn':''}} {{select_classify_on==index&&ittms.items.name.length==2?'text-indent':''}} {{select_classify_on==index&&ittms.items.name.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> 385 + <view class="pdl30" bindtap="getScancode">
  386 + <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>
  387 + <!-- <view class="fs24">扫一扫</view> -->
  388 + </view>
  389 + </view>
  390 + <!-- /头部 -->
  391 + <!-- 分类项目内容 -->
  392 + <view class="flex project_height" style="">
  393 + <!-- 分类项目的类型 -->
  394 + <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3">
  395 + <view class="project_type-frame" style="margin-bottom:120rpx;">
  396 + <view wx:if="{{is_show_gb}}">
  397 + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-index="223" data-name="国家" wx:if="{{is_country}}" data-current="223">
  398 + <text style="">国家</text>
  399 + </view>
  400 + </view>
  401 +
  402 + <view wx:if="{{is_show_pp}}">
  403 + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-index="220" data-name="品牌" data-current="220">
  404 + <text style="">品牌</text>
  405 + </view>
  406 + </view>
  407 +
  408 +
  409 + <!-- 卡项 -->
  410 + <view wx:if="{{is_show_xm}}">
  411 + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on == 221 ? 'active' : ''}}" data-index="221" data-name="项目" data-current="221">
  412 + <text>项目</text>
  413 + </view>
  414 + </view>
  415 +
  416 +
  417 +
  418 + <view wx:if="{{is_show_pl}}">
  419 + <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> -->
  420 + <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> -->
  421 + <!-- 添加左边红色条 -->
  422 + <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->
  423 + <!-- <view bindtap="click_classify" style="{{status_show == 0 && ittms == 0 ?'margin-top:0':'margin-top:0rpx'}}" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs30 t-c {{ittms.items.name.length==2? 'world_sn':''}} {{select_classify_on==index&&ittms.items.name.length==2?'text-indent':''}} {{select_classify_on==index&&ittms.items.name.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}">
438 <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> 424 <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}">
439 <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> 425 <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index">
440 <view> 426 <view>
@@ -444,11 +430,11 @@ @@ -444,11 +430,11 @@
444 </view> 430 </view>
445 <view wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</view> 431 <view wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</view>
446 </view> --> 432 </view> -->
447 - <!-- </view> -->  
448 - <scroll-view scroll-y scroll-with-animation class="tab-view" scroll-top="{{scrollTop}}" style="height:88%">  
449 - <view wx:for="{{one_level_classify}}" wx:for-item="ittms" wx:key="{{index}}" class="tab-bar-item {{select_classify_on==index ? 'active' : ''}}" data-current="{{index}}" catchtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" data-index="{{index}}"data-name="{{ittms.items.mobile_name}}">  
450 - <text>{{ittms.items.name}}</text>  
451 - <!-- <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> 433 + <!-- </view> -->
  434 + <scroll-view scroll-y scroll-with-animation class="tab-view" scroll-top="{{scrollTop}}" style="height:88%">
  435 + <view wx:for="{{one_level_classify}}" wx:for-item="ittms" wx:key="{{index}}" class="tab-bar-item {{select_classify_on==index ? 'active' : ''}}" data-current="{{index}}" catchtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}">
  436 + <text>{{ittms.items.name}}</text>
  437 + <!-- <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}">
452 <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> 438 <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index">
453 <text> 439 <text>
454 {{name}} 440 {{name}}
@@ -456,45 +442,45 @@ @@ -456,45 +442,45 @@
456 </view> 442 </view>
457 </view> 443 </view>
458 <text wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</text> --> 444 <text wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</text> -->
459 - </view>  
460 - </scroll-view>  
461 -  
462 - <!-- </view> -->  
463 </view> 445 </view>
464 -  
465 -  
466 -  
467 - </view>  
468 - </view>  
469 - <!-- 分类项目的内容 -->  
470 - <view class="classify_content" style="padding-left:26%;padding-top:108rpx;box-sizing: border-box;"> 446 + </scroll-view>
  447 +
  448 + <!-- </view> -->
  449 + </view>
  450 +
  451 +
  452 +
  453 + </view>
  454 + </view>
  455 + <!-- 分类项目的内容 -->
  456 + <view class="classify_content" style="padding-left:26%;padding-top:108rpx;box-sizing: border-box;" bindtouchstart="bScroll" bindtouchend="btouMove">
471 <!-- 国家的样式 --> 457 <!-- 国家的样式 -->
472 <block wx:if="{{select_classify_on==223&&is_show_gb}}"> 458 <block wx:if="{{select_classify_on==223&&is_show_gb}}">
473 - <view class="classify_name fs28 flex-space-between">  
474 - <view>{{ishaf_three==1?good_list.name:classify_name}}</view> 459 + <view class="classify_name fs28 flex-space-between">
  460 + <view>{{ishaf_three==1?good_list.name:classify_name}}</view>
475 461
476 - </view>  
477 - <view class=" classify_content-frame flex-space-between " >  
478 - <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" >  
479 - <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image>  
480 - <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image>  
481 - <view class='nation_box abs box'>  
482 - <view class='nt_1 t-c line-height' style="height:50rpx">  
483 - <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text>  
484 - </view>  
485 - <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx">  
486 - <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text>  
487 - </view>  
488 - </view>  
489 - <!--<view class='nation_box abs box' style="top:20rpx">-->  
490 - <!--</view>-->  
491 - </view>  
492 - </view> 462 + </view>
  463 + <view class=" classify_content-frame flex-space-between ">
  464 + <view bindtap="go_nation" class="country_img-frame rel outer_location" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}">
  465 + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image>
  466 + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image>
  467 + <view class='nation_box abs box'>
  468 + <view class='nt_1 t-c line-height' style="height:50rpx">
  469 + <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text>
  470 + </view>
  471 + <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx">
  472 + <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text>
  473 + </view>
  474 + </view>
  475 + <!--<view class='nation_box abs box' style="top:20rpx">-->
  476 + <!--</view>-->
  477 + </view>
  478 + </view>
493 </block> 479 </block>
494 -  
495 - 480 +
  481 +
496 <!-- 品牌 --> 482 <!-- 品牌 -->
497 -<!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> 483 + <!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}">
498 484
499 <view class="classify_name fs28 flex-space-between"> 485 <view class="classify_name fs28 flex-space-between">
500 <view>{{classify_name}}</view> 486 <view>{{classify_name}}</view>
@@ -513,236 +499,242 @@ @@ -513,236 +499,242 @@
513 </block> 499 </block>
514 </view> 500 </view>
515 </block> --> 501 </block> -->
516 -  
517 - <!-- 品牌 -->  
518 - <block wx:if="{{select_classify_on==220&&is_show_pp}}">  
519 - <scroll-view scroll-y="true" class="fenlei-list"  
520 - style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}">  
521 - <view class="classify_name fs28 flex-space-between">  
522 - <view>{{classify_name}}</view>  
523 - </view>  
524 - <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx">  
525 - <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view>  
526 - <view class="classify_content-frame flex flex-wrap">  
527 - <view class="brand_img_frame "wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}" >  
528 - <view class="t-c">  
529 - <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image>  
530 - <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view>  
531 - </view>  
532 - </view>  
533 - </view>  
534 - </block>  
535 - </scroll-view>  
536 - <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend" >  
537 - <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> -->  
538 - <view class="iconfont icon-shangjiantou"></view>  
539 - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}"  
540 - class="flex box box-align-center box-pack-center letter">  
541 - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text>  
542 - </view>  
543 - </view>  
544 - </block>  
545 -  
546 -  
547 -  
548 -  
549 - <!-- 卡项 -->  
550 - <block wx:if="{{select_classify_on==221&&is_show_xm}}">  
551 - <block wx:if="{{xmlist && xmlist.length != 0}}">  
552 - <view class="classify_name fs28 flex-space-between">  
553 - <view>{{classify_name}}</view>  
554 - </view>  
555 -  
556 - <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;">  
557 - <block wx:for="{{xmlist}}">  
558 - <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}">  
559 - <view class="t-c">  
560 - <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image>  
561 - <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image>  
562 - <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view>  
563 - </view>  
564 - </view>  
565 - </block>  
566 - </view>  
567 - </block>  
568 -  
569 - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>  
570 -  
571 - </block>  
572 -  
573 - 502 +
  503 + <!-- 品牌 -->
  504 + <block wx:if="{{select_classify_on==220&&is_show_pp}}">
  505 + <scroll-view scroll-y="true" class="fenlei-list" style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}">
  506 + <view class="classify_name fs28 flex-space-between">
  507 + <view>{{classify_name}}</view>
  508 + </view>
  509 + <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx">
  510 + <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view>
  511 + <view class="classify_content-frame flex flex-wrap">
  512 + <view class="brand_img_frame " wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}">
  513 + <view class="t-c">
  514 + <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image>
  515 + <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view>
  516 + </view>
  517 + </view>
  518 + </view>
  519 + </block>
  520 + </scroll-view>
  521 + <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend">
  522 + <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> -->
  523 + <view class="iconfont icon-shangjiantou"></view>
  524 + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter">
  525 + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text>
  526 + </view>
  527 + </view>
  528 + </block>
  529 +
  530 +
  531 +
  532 +
  533 + <!-- 卡项 -->
  534 + <block wx:if="{{select_classify_on==221&&is_show_xm}}">
  535 + <block wx:if="{{xmlist && xmlist.length != 0}}">
  536 + <view class="classify_name fs28 flex-space-between">
  537 + <view>{{classify_name}}</view>
  538 + </view>
  539 +
  540 + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;">
  541 + <block wx:for="{{xmlist}}">
  542 + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}">
  543 + <view class="t-c">
  544 + <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image>
  545 + <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image>
  546 + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view>
  547 + </view>
  548 + </view>
  549 + </block>
  550 + </view>
  551 + </block>
  552 +
  553 + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view>
  554 +
  555 + </block>
  556 +
  557 +
574 <!-- 品类--> 558 <!-- 品类-->
575 - <!-- <block wx:if="{{select_classify_on==0&&is_show_pl}}"> -->  
576 - <block wx:if="{{is_show_pl&&select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}">  
577 - <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> --> 559 + <!-- <block wx:if="{{select_classify_on==0&&is_show_pl}}"> -->
  560 + <block wx:if="{{is_show_pl&&select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}" >
  561 + <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> -->
578 <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}"> 562 <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}">
579 - <view style="width:100%;height:100%;position: relative;">  
580 - <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;">  
581 - <view class="classify_title ellipsis-1">{{classify_name}}</view>  
582 - <view class="flex select_more ai-center" >  
583 - <view class="red-co fs24" >更多</view>  
584 - <view class="bg_right width_height" style="margin-top: 0;"></view>  
585 - </view> 563 + <view style="width:100%;height:100%;position: relative;">
  564 + <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;">
  565 + <view class="classify_title ellipsis-1">{{classify_name}}</view>
  566 + <view class="flex select_more ai-center">
  567 + <view class="red-co fs24">更多</view>
  568 + <view class="bg_right width_height" style="margin-top: 0;"></view>
586 </view> 569 </view>
587 - <!-- 显示商品列表开始 -->  
588 - <!-- <view class="classify_content-frame flex-wrap" style="width:100%;overflow:hidden;heigth:100%;"> -->  
589 -  
590 - <!-- <view class="null" style="width:100%;margin-top:70rpx;"></view> -->  
591 - <scroll-view scroll-y scroll-top="{{scrollTop}}" bindscrolltolower='scrollLower' style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:0;bottom:0;left:0;width:100%;"> 570 + </view>
  571 + <!-- 显示商品列表开始 -->
  572 + <!-- <view class="classify_content-frame flex-wrap" style="width:100%;overflow:hidden;heigth:100%;"> -->
  573 +
  574 + <!-- <view class="null" style="width:100%;margin-top:70rpx;"></view> -->
  575 + <scroll-view scroll-y scroll-top="{{scrollTop}}" bindscrolltolower='scrollLower' bindscrolltoupper='scrolltoupper' style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:0;bottom:0;left:0;width:100%;">
592 <view class="null" style="width:100%;height:1px;"></view> 576 <view class="null" style="width:100%;height:1px;"></view>
593 <!-- goodslist --> 577 <!-- goodslist -->
594 - <view class="choice_list" style="height:{{msgStatus != true?'100%':''}}">  
595 - <navigator class="choice_item" style="margin-bottom:{{dataLength -1 == index?'100px':'0'}}" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" data-id="{{index}}" wx:key="{{index}}">  
596 - <view class="img-wrap">  
597 - <image src="{{url+item.original_img}}" binderror="bind_bnerr_t3" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> 578 + <view class="choice_list" style="height:{{msgStatus != true?'100%':''}}">
  579 +
  580 + <navigator class="choice_item" style="margin-bottom:{{dataLength -1 == index?'50px':'0'}}" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" data-id="{{index}}" wx:key="{{index}}">
  581 + <view class="img-wrap">
  582 + <image src="{{url+item.original_img}}" binderror="bind_bnerr_t3" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
  583 + </view>
  584 + <view class="item-cont">
  585 + <view class="title">{{item.goods_name}}</view>
  586 + <!-- 判断是否有活动价 -->
  587 + <block wx:if="{{item.prom_price>0 || item.prom_integral}}">
  588 + <view class="flex ai-center">
  589 + <!-- 活动价 -->
  590 + <view class="price">
  591 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  592 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  593 + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
  594 + </view>
  595 + <!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>-->
  596 + </view>
  597 +
  598 + <view class="comment">
  599 +
  600 + <view class="fs22 pdt10 t-r">
  601 + <span>评论{{item.comment_count}}</span>
  602 + <span class="pdl30">已售{{item.sales_sum}}</span>
  603 + </view>
  604 + </view>
  605 + </block>
  606 + <block wx:else>
  607 +
  608 + <!-- 商品价格,先判断下是后又等级价-->
  609 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
  610 +
  611 +
  612 + <!-- 当会员是等级卡的时候 -->
  613 + <block wx:if="{{card_field}}">
  614 + <!-- 等级价>0 -->
  615 + <block wx:if="{{item[card_field]>0}}">
  616 + <view class="flex ai_and">
  617 + <view class="price rmb">{{item[card_field]}}</view>
  618 + <view class="card_bg ellipsis-1">
  619 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  620 + <view class="card_name">{{card_name}}</view>
  621 + </view>
598 </view> 622 </view>
599 - <view class="item-cont">  
600 - <view class="title">{{item.goods_name}}</view>  
601 - <!-- 判断是否有活动价 -->  
602 - <block wx:if="{{item.prom_price>0 || item.prom_integral}}">  
603 - <view class="flex ai-center">  
604 - <!-- 活动价 -->  
605 - <view class="price">  
606 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
607 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
608 - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>  
609 - </view>  
610 -<!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>-->  
611 - </view>  
612 -  
613 - <view class="comment">  
614 -  
615 - <view class="fs22 pdt10 t-r">  
616 - <span>评论{{item.comment_count}}</span>  
617 - <span class="pdl30">已售{{item.sales_sum}}</span>  
618 - </view>  
619 - </view>  
620 - </block>  
621 - <block wx:else>  
622 -  
623 - <!-- 商品价格,先判断下是后又等级价-->  
624 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">  
625 -  
626 -  
627 - <!-- 当会员是等级卡的时候 -->  
628 - <block wx:if="{{card_field}}">  
629 - <!-- 等级价>0 -->  
630 - <block wx:if="{{item[card_field]>0}}">  
631 - <view class="flex ai_and">  
632 - <view class="price rmb">{{item[card_field]}}</view>  
633 - <view class="card_bg ellipsis-1">  
634 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
635 - <view class="card_name">{{card_name}}</view>  
636 - </view>  
637 - </view>  
638 - <view class="comment flex jc_sb">  
639 -<!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>-->  
640 - <view class="fs22 pdt10 t-r">  
641 - <span>评论{{item.comment_count}}</span>  
642 - <span class="pdl30">已售{{item.sales_sum}}</span>  
643 - </view>  
644 - </view>  
645 - </block>  
646 - <block wx:else>  
647 - <view class="flex ai-center">  
648 - <view class="price rmb">{{item.shop_price}}</view>  
649 -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->  
650 - </view>  
651 -  
652 - <view class="comment">  
653 - <view class="fs22 pdt10 t-r">  
654 - <span>评论{{item.comment_count}}</span>  
655 - <span class="pdl30">已售{{item.sales_sum}}</span>  
656 - </view>  
657 - </view>  
658 - </block>  
659 - </block>  
660 - <block wx:else>  
661 -  
662 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
663 - <view class="flex ai-center">  
664 - <view class="price rmb">{{item.shop_price}}</view>  
665 -<!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>-->  
666 - </view>  
667 - <view class="comment">  
668 - <view class="flex ai-center">  
669 - <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>  
670 - <view class="card_bg ellipsis-1">  
671 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
672 - <view class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</view>  
673 - </view>  
674 - </view>  
675 - </view>  
676 -  
677 - <view class="fs22 t-r" style="color:#999;">  
678 - <span>评论{{item.comment_count}}</span>  
679 - <span class="pdl30">已售{{item.sales_sum}}</span>  
680 - </view>  
681 -  
682 -  
683 - </block>  
684 - <block wx:else>  
685 - <view class="flex ai-center">  
686 - <view class="price rmb">{{item.shop_price}}</view>  
687 -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->  
688 - </view>  
689 - <!-- <view class="price">¥{{item.shop_price}}</view> -->  
690 - <view class="comment">  
691 - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->  
692 - <view class="fs22 pdt10 t-r">  
693 - <span>评论{{item.comment_count}}</span>  
694 - <span class="pdl30">已售{{item.sales_sum}}</span>  
695 - </view>  
696 - </view>  
697 - </block>  
698 - </block>  
699 - </block>  
700 - <block wx:else>  
701 - <view class="flex ai-center">  
702 - <view class="price rmb">{{item.shop_price}}</view>  
703 -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->  
704 - </view>  
705 - <!-- <view class="price">¥{{item.shop_price}}</view> -->  
706 - <view class="comment">  
707 - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->  
708 - <view class="fs22 pdt10 t-r">  
709 - <span>评论{{item.comment_count}}</span>  
710 - <span class="pdl30">已售{{item.sales_sum}}</span>  
711 - </view>  
712 - </view>  
713 - </block>  
714 - </block> 623 + <view class="comment flex jc_sb">
  624 + <!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>-->
  625 + <view class="fs22 pdt10 t-r">
  626 + <span>评论{{item.comment_count}}</span>
  627 + <span class="pdl30">已售{{item.sales_sum}}</span>
715 </view> 628 </view>
716 - </navigator>  
717 - <!-- 暂无更多 -->  
718 - <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;"  
719 - wx:if="{{is_no_more}}">暂无更多</view>  
720 - </view>  
721 - <view class="no-data" wx:if="{{msgStatus == true}}">  
722 - <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> 629 + </view>
  630 + </block>
  631 + <block wx:else>
  632 + <view class="flex ai-center">
  633 + <view class="price rmb">{{item.shop_price}}</view>
  634 + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  635 + </view>
  636 +
  637 + <view class="comment">
  638 + <view class="fs22 pdt10 t-r">
  639 + <span>评论{{item.comment_count}}</span>
  640 + <span class="pdl30">已售{{item.sales_sum}}</span>
  641 + </view>
  642 + </view>
  643 + </block>
  644 + </block>
  645 + <block wx:else>
  646 +
  647 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  648 + <view class="flex ai-center">
  649 + <view class="price rmb">{{item.shop_price}}</view>
  650 + <!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>-->
  651 + </view>
  652 + <view class="comment">
  653 + <view class="flex ai-center">
  654 + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>
  655 + <view class="card_bg ellipsis-1">
  656 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  657 + <view class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</view>
  658 + </view>
  659 + </view>
  660 + </view>
723 661
724 - <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px">  
725 - <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view>  
726 - <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view>  
727 - <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> 662 + <view class="fs22 t-r" style="color:#999;">
  663 + <span>评论{{item.comment_count}}</span>
  664 + <span class="pdl30">已售{{item.sales_sum}}</span>
  665 + </view>
  666 +
  667 +
  668 + </block>
  669 + <block wx:else>
  670 + <view class="flex ai-center">
  671 + <view class="price rmb">{{item.shop_price}}</view>
  672 + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  673 + </view>
  674 + <!-- <view class="price">¥{{item.shop_price}}</view> -->
  675 + <view class="comment">
  676 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
  677 + <view class="fs22 pdt10 t-r">
  678 + <span>评论{{item.comment_count}}</span>
  679 + <span class="pdl30">已售{{item.sales_sum}}</span>
  680 + </view>
  681 + </view>
  682 + </block>
  683 + </block>
  684 + </block>
  685 + <block wx:else>
  686 + <view class="flex ai-center">
  687 + <view class="price rmb">{{item.shop_price}}</view>
  688 + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  689 + </view>
  690 + <!-- <view class="price">¥{{item.shop_price}}</view> -->
  691 + <view class="comment">
  692 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
  693 + <view class="fs22 pdt10 t-r">
  694 + <span>评论{{item.comment_count}}</span>
  695 + <span class="pdl30">已售{{item.sales_sum}}</span>
  696 + </view>
  697 + </view>
  698 + </block>
  699 + </block>
728 </view> 700 </view>
729 -  
730 -  
731 - </scroll-view>  
732 - <!-- /goodslist -->  
733 - </view>  
734 - <!-- 商品列表结束 -->  
735 - 701 + </navigator>
  702 + <!-- 暂无更多 -->
  703 + <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;" wx:if="{{is_no_more}}">暂无更多</view>
  704 + <view id="sview" style="height: 420rpx;width: 100%;text-align: center;" wx:if="{{nextShow}}">
  705 + <view style="display: flex;align-items: center;justify-content: center;height:60rpx;">
  706 + <text class="iconfont icon-arrowup" style="font-size: 25rpx;color: #999;">上滑查看下一个分类</text>
  707 + <!-- <text >上滑查看下一个分类</text> -->
  708 + </view>
  709 + </view>
  710 + </view>
  711 + <view class="no-data" wx:if="{{msgStatus == true}}">
  712 + <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> -->
  713 +
  714 + <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px">
  715 + <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view>
  716 + <view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view>
  717 + </view>
  718 + <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view>
  719 + <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> -->
  720 + </view>
  721 +
  722 +
  723 + </scroll-view>
  724 + <!-- /goodslist -->
  725 + </view>
  726 + <!-- 商品列表结束 -->
  727 +
736 </block> 728 </block>
737 </block> 729 </block>
738 - </view>  
739 - </view>  
740 - </block>  
741 - <block wx:elif="{{is_do}}">  
742 - <view class="no-data" >  
743 - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>  
744 - <view class="no-data-title">商家暂未设置分类</view>  
745 - <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>  
746 - </view>  
747 - </block>  
748 -</block> 730 + </view>
  731 + </view>
  732 + </block>
  733 + <block wx:elif="{{is_do}}">
  734 + <view class="no-data">
  735 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  736 + <view class="no-data-title">商家暂未设置分类</view>
  737 + <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator>
  738 + </view>
  739 + </block>
  740 +</block>
749 \ No newline at end of file 741 \ No newline at end of file
pages/goods/goodsInfo/goodsInfo.js
@@ -286,13 +286,16 @@ Page({ @@ -286,13 +286,16 @@ Page({
286 286
287 if (json_str) { 287 if (json_str) {
288 var json_data = JSON.parse(json_str); 288 var json_data = JSON.parse(json_str);
  289 + console.log('自定义海报参数-------');
  290 + console.log(json_data);
289 if (json_data.bg_img) { 291 if (json_data.bg_img) {
290 - 292 +
291 //-- 把图片那到本地 -- 293 //-- 把图片那到本地 --
292 wx.getImageInfo({ 294 wx.getImageInfo({
293 src: json_data.bg_img, 295 src: json_data.bg_img,
294 success: function (res) { 296 success: function (res) {
295 var path = res.path; 297 var path = res.path;
  298 +
296 th.setData({share_b_img: path}) 299 th.setData({share_b_img: path})
297 }, 300 },
298 fail: function (res) { 301 fail: function (res) {
@@ -5038,13 +5041,18 @@ Page({ @@ -5038,13 +5041,18 @@ Page({
5038 5041
5039 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 5042 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团
5040 var type = this.data.prom_type; 5043 var type = this.data.prom_type;
5041 - if (type == 2) type = -1; 5044 + console.log('商品类型-----');
  5045 + console.log(type);
  5046 + // if (type == 2) type = -1;
  5047 + if (type == 4) type = 0;
  5048 + if (type == 2) type = 0;
5042 if (type == 6) type = 2; // 6拼团 2团购 5049 if (type == 6) type = 2; // 6拼团 2团购
5043 if (type == 10) type = -1; 5050 if (type == 10) type = -1;
5044 - 5051 +
5045 5052
5046 if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; 5053 if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3;
5047 - 5054 + console.log('商品类型。。。。。');
  5055 + console.log(type);
5048 wx.showLoading({title: '生成中...',}) 5056 wx.showLoading({title: '生成中...',})
5049 var that = this, th = that; 5057 var that = this, th = that;
5050 //设置画板显示,才能开始绘图 5058 //设置画板显示,才能开始绘图
@@ -5092,19 +5100,24 @@ Page({ @@ -5092,19 +5100,24 @@ Page({
5092 pg_path = th.data.share_b_img; 5100 pg_path = th.data.share_b_img;
5093 } 5101 }
5094 // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 5102 // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  5103 + console.log('海报类型-----')
  5104 + console.log(type);
5095 5105
5096 -  
5097 - if (type == 0 || type == 1 || type == 2 || type == 3) { // 如果是普通商品,绘制新海报 5106 + if ( !th.data.share_b_img && (type == 0 || type == 1 || type == 2 || type == 3 )){ // 如果是普通商品,绘制新海报
5098 th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); 5107 th.drawPoster(context, unit, th.data.share_goods_img, vpath, type);
5099 } else { 5108 } else {
5100 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 5109 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  5110 + // var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
  5111 + // var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
  5112 + // context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
  5113 + // th.drawPoster(context, unit, th.data.share_goods_img, vpath);
5101 }; 5114 };
5102 - 5115 +
5103 // th.drawPoster(context, unit, th.data.share_goods_img, vpath); 5116 // th.drawPoster(context, unit, th.data.share_goods_img, vpath);
5104 5117
5105 5118
5106 //-- 是自定义海报的情况下 -- 5119 //-- 是自定义海报的情况下 --
5107 - if (type != 0 && type != 1 && type != 2 && type != 3) { 5120 + if (th.data.share_b_img || (type != 0 && type != 1 && type != 2 && type != 3)) {
5108 5121
5109 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 5122 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
5110 //在线上分享人的情况下 5123 //在线上分享人的情况下
@@ -5158,7 +5171,7 @@ Page({ @@ -5158,7 +5171,7 @@ Page({
5158 5171
5159 //---产品名称--- 5172 //---产品名称---
5160 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 5173 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
5161 - if (type != 4 && type != 0 && type != 1 && type != 2 && type != 3) { 5174 + if (th.data.share_b_img || (type != 4 && type != 0 && type != 1 && type != 2 && type != 3)) {
5162 context.setFillStyle("black"); 5175 context.setFillStyle("black");
5163 context.setFontSize(21.3 * unit) 5176 context.setFontSize(21.3 * unit)
5164 getApp().draw_Text(context, share_title, 5177 getApp().draw_Text(context, share_title,
@@ -5195,7 +5208,7 @@ Page({ @@ -5195,7 +5208,7 @@ Page({
5195 context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); 5208 context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit);
5196 context.stroke();--*/ 5209 context.stroke();--*/
5197 5210
5198 - } else if (type == 4 && type != 0 && type != 1 && type != 2 && type != 3) { 5211 + } else if ( ( type == 4 && type != 0 && type != 1 && type != 2 && type != 3)) {
5199 context.setFillStyle("black"); 5212 context.setFillStyle("black");
5200 context.setFontSize(21.3 * unit) 5213 context.setFontSize(21.3 * unit)
5201 getApp().draw_Text(context, share_title, 5214 getApp().draw_Text(context, share_title,
@@ -5223,18 +5236,56 @@ Page({ @@ -5223,18 +5236,56 @@ Page({
5223 } 5236 }
5224 5237
5225 //---中间大图--- 5238 //---中间大图---
5226 - if (type != 0 && type != 1 && type != 2 && type != 3) { 5239 + if ( th.data.share_b_img || (type != 0 && type != 1 && type != 2 && type != 3)) {
5227 context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); 5240 context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
5228 } 5241 }
5229 ; 5242 ;
  5243 +
  5244 + //---自定义海报 产品质量保证
  5245 + if(th.data.share_b_img && th.data.poster.show_quality==1 ){
  5246 + var g_path = "../../../images/share/s_gou.png";
  5247 + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);
  5248 + context.setFillStyle("red")
  5249 + context.setFontSize(18 * unit)
  5250 + context.fillText("正品保证", 84 * unit, 690 * unit);
  5251 +
  5252 + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);
  5253 + context.setFillStyle("red")
  5254 + context.setFontSize(18 * unit)
  5255 + context.fillText("纯实体店", 246 * unit, 690 * unit);
  5256 +
  5257 + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);
  5258 + context.setFillStyle("red")
  5259 + context.setFontSize(18 * unit)
  5260 + context.fillText("官方验证", 420 * unit, 690 * unit);
5230 5261
5231 -  
5232 - //-------大图后面就不一样了----------- 5262 + }
  5263 + //-------大图后面就不一样了-----------
5233 switch (type) { 5264 switch (type) {
5234 case 0: 5265 case 0:
  5266 + if(!th.data.share_b_img){
  5267 + break
  5268 + }
  5269 + //---画线---
  5270 + context.setLineWidth(1 * unit)
  5271 + context.moveTo(32 * unit, 710 * unit)
  5272 + context.lineTo(520 * unit, 710 * unit)
  5273 + context.stroke();
  5274 + //---文字---
  5275 + context.setFillStyle("black")
  5276 + context.setFontSize(22 * unit)
  5277 + // 原来start --->
  5278 + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit);
  5279 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit);
  5280 + // <--- 原来end
  5281 + // context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 816 * unit);
  5282 + // context.setFontSize(18 * unit)
  5283 + // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 850 * unit);
  5284 + //---二维吗图---
  5285 + context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit);
5235 break;//普通商品的展示 5286 break;//普通商品的展示
5236 case 4: 5287 case 4:
5237 - //中间的几个字 5288 + // 中间的几个字
5238 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 5289 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
5239 if (parseInt(th.data.poster.show_quality)) { 5290 if (parseInt(th.data.poster.show_quality)) {
5240 var g_path = "../../../images/share/s_gou.png"; 5291 var g_path = "../../../images/share/s_gou.png";
@@ -5303,7 +5354,7 @@ Page({ @@ -5303,7 +5354,7 @@ Page({
5303 5354
5304 //---二维吗图--- 5355 //---二维吗图---
5305 //-- 自定义海报 -- 5356 //-- 自定义海报 --
5306 - if (th.data.poster) { 5357 + if (th.data.share_b_img || th.data.poster) {
5307 var erm_x = parseFloat(th.data.poster.ewm_x) * 2; 5358 var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
5308 var erm_y = parseFloat(th.data.poster.ewm_y) * 2; 5359 var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
5309 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); 5360 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
@@ -5314,7 +5365,10 @@ Page({ @@ -5314,7 +5365,10 @@ Page({
5314 ; 5365 ;
5315 5366
5316 break; 5367 break;
5317 - case -12: //秒杀商品的展示 5368 + case 1: //秒杀商品的展示
  5369 + if(!th.data.share_b_img){
  5370 + break
  5371 + }
5318 //---画线--- 5372 //---画线---
5319 context.setLineWidth(1 * unit) 5373 context.setLineWidth(1 * unit)
5320 context.moveTo(32 * unit, 670 * unit) 5374 context.moveTo(32 * unit, 670 * unit)
@@ -5337,7 +5391,7 @@ Page({ @@ -5337,7 +5391,7 @@ Page({
5337 5391
5338 //---二维吗图--- 5392 //---二维吗图---
5339 //-- 自定义海报 -- 5393 //-- 自定义海报 --
5340 - if (th.data.poster) { 5394 + if (th.data.share_b_img || th.data.poster) {
5341 var erm_x = parseFloat(th.data.poster.ewm_x) * 2; 5395 var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
5342 var erm_y = parseFloat(th.data.poster.ewm_y) * 2; 5396 var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
5343 context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit); 5397 context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit);
@@ -5347,7 +5401,10 @@ Page({ @@ -5347,7 +5401,10 @@ Page({
5347 } 5401 }
5348 break; 5402 break;
5349 5403
5350 - case -2: //会员团和商家团的展示 5404 + case 2: //会员团和商家团的展示
  5405 + if(!th.data.share_b_img){
  5406 + break
  5407 + }
5351 //---画线--- 5408 //---画线---
5352 context.setLineWidth(1 * unit) 5409 context.setLineWidth(1 * unit)
5353 context.moveTo(32 * unit, 670 * unit) 5410 context.moveTo(32 * unit, 670 * unit)
@@ -5383,7 +5440,7 @@ Page({ @@ -5383,7 +5440,7 @@ Page({
5383 5440
5384 //---二维吗图--- 5441 //---二维吗图---
5385 //-- 自定义海报 -- 5442 //-- 自定义海报 --
5386 - if (th.data.poster) { 5443 + if (th.data.share_b_img || th.data.poster) {
5387 var erm_x = parseFloat(th.data.poster.ewm_x) * 2; 5444 var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
5388 var erm_y = parseFloat(th.data.poster.ewm_y) * 2; 5445 var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
5389 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); 5446 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
@@ -5392,7 +5449,10 @@ Page({ @@ -5392,7 +5449,10 @@ Page({
5392 context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); 5449 context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit);
5393 } 5450 }
5394 break 5451 break
5395 - case -3: //阶梯团的展示 5452 + case 3: //阶梯团的展示
  5453 + if(!th.data.share_b_img){
  5454 + break
  5455 + }
5396 //---画线--- 5456 //---画线---
5397 context.setLineWidth(1 * unit) 5457 context.setLineWidth(1 * unit)
5398 context.moveTo(32 * unit, 670 * unit) 5458 context.moveTo(32 * unit, 670 * unit)
@@ -5428,7 +5488,7 @@ Page({ @@ -5428,7 +5488,7 @@ Page({
5428 5488
5429 5489
5430 //-- 自定义海报 -- 5490 //-- 自定义海报 --
5431 - if (th.data.poster) { 5491 + if (th.data.share_b_img || th.data.poster) {
5432 var erm_x = parseFloat(th.data.poster.ewm_x) * 2; 5492 var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
5433 var erm_y = parseFloat(th.data.poster.ewm_y) * 2; 5493 var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
5434 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); 5494 context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
@@ -5459,7 +5519,7 @@ Page({ @@ -5459,7 +5519,7 @@ Page({
5459 5519
5460 //---二维吗图--- 5520 //---二维吗图---
5461 //-- 自定义海报 -- 5521 //-- 自定义海报 --
5462 - if (th.data.poster) { 5522 + if (th.data.share_b_img || th.data.poster) {
5463 var erm_x = parseFloat(th.data.poster.ewm_x) * 2; 5523 var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
5464 var erm_y = parseFloat(th.data.poster.ewm_y) * 2; 5524 var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
5465 context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit); 5525 context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit);
@@ -5474,7 +5534,7 @@ Page({ @@ -5474,7 +5534,7 @@ Page({
5474 5534
5475 5535
5476 //--- 如果是自定义海报的时候 --- 5536 //--- 如果是自定义海报的时候 ---
5477 - if (type != 0 && type != 1 && type != 2 && type != 3) { 5537 + if ( th.data.share_b_img || (type != 0 && type != 1 && type != 2 && type != 3)) {
5478 5538
5479 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 5539 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
5480 5540
@@ -5676,8 +5736,14 @@ Page({ @@ -5676,8 +5736,14 @@ Page({
5676 tt(); 5736 tt();
5677 }, 5737 },
5678 fail: function (res) { 5738 fail: function (res) {
5679 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
5680 - tt(); 5739 + //获取默认空白图
  5740 + wx.getImageInfo({
  5741 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  5742 + success: function(res) {
  5743 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  5744 + tt();
  5745 + }
  5746 + })
5681 } 5747 }
5682 }); 5748 });
5683 }, 5749 },
pages/goods/goodsInfo/goodsInfo.wxml
@@ -1034,7 +1034,7 @@ @@ -1034,7 +1034,7 @@
1034 <view class="shopping-cart cart-ico new_split"> 1034 <view class="shopping-cart cart-ico new_split">
1035 <navigator open-type="switchTab" url="/pages/cart/cart/cart"> 1035 <navigator open-type="switchTab" url="/pages/cart/cart/cart">
1036 <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> 1036 <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image>
1037 - <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> 1037 + <!-- <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> -->
1038 <view>购物车</view> 1038 <view>购物车</view>
1039 </navigator> 1039 </navigator>
1040 </view> 1040 </view>
pages/index/index/index.js
@@ -14,7 +14,7 @@ var e = function (e) { @@ -14,7 +14,7 @@ var e = function (e) {
14 var regeneratorRuntime = require('../../../utils/runtime.js'); 14 var regeneratorRuntime = require('../../../utils/runtime.js');
15 var api = require('../../../api/api.js'); 15 var api = require('../../../api/api.js');
16 var d = getApp().globalData; 16 var d = getApp().globalData;
17 - 17 +
18 var full_screen = require('full_screen.js'); 18 var full_screen = require('full_screen.js');
19 19
20 20
@@ -78,7 +78,7 @@ Page({ @@ -78,7 +78,7 @@ Page({
78 78
79 showHongbao: false, 79 showHongbao: false,
80 showHongbaoSmall: false, 80 showHongbaoSmall: false,
81 - 81 + goodsGroupArr:[], //商品模块列表
82 is_full_screen_show: 0, //全屏显示 82 is_full_screen_show: 0, //全屏显示
83 sec_show: 3, //倒计时的秒数 83 sec_show: 3, //倒计时的秒数
84 full_ad: null, //全屏广告 84 full_ad: null, //全屏广告
@@ -297,8 +297,34 @@ Page({ @@ -297,8 +297,34 @@ Page({
297 }); 297 });
298 } 298 }
299 }) 299 })
300 - },  
301 - 300 + },
  301 + onReady(){
  302 + console.log('渲染完成----')
  303 + console.log(this.data.template_arr);
  304 + console.log('....................');
  305 + },
  306 +
  307 + //获取商品模块实例
  308 + newGoodsGroup(){
  309 + let arr=[]
  310 + if (this.data.template_arr.length == 0) {
  311 + return
  312 + }
  313 + this.data.template_arr.map((item,index)=>{
  314 + if (item.ename == 'goodsGroup') {
  315 + arr.push(`goodsGroup${index}`)
  316 + }
  317 + })
  318 + if (arr.length > 0) {
  319 + this.setData({
  320 + goodsGroupArr : arr
  321 + })
  322 + arr.map(item=>{
  323 + let a = '.'+item
  324 + this[item] = this.selectComponent(a);
  325 + })
  326 + }
  327 + },
302 328
303 //关闭新用户领取广告 329 //关闭新用户领取广告
304 close_disgraceful: function () { 330 close_disgraceful: function () {
@@ -523,13 +549,17 @@ Page({ @@ -523,13 +549,17 @@ Page({
523 if (data && data.length > 0) { 549 if (data && data.length > 0) {
524 var temp_data = data[0]; 550 var temp_data = data[0];
525 var t_arr = JSON.parse(temp_data.json_str); 551 var t_arr = JSON.parse(temp_data.json_str);
526 - 552 + console.log('商品列表------------1')
  553 + console.log(t_arr)
  554 + console.log('商品列表------------2')
527 th.setData({ 555 th.setData({
528 template_arr: t_arr, 556 template_arr: t_arr,
529 isTemplate: 1, 557 isTemplate: 1,
530 bgcolor_t: temp_data.bkcolor 558 bgcolor_t: temp_data.bkcolor
531 - });  
532 - 559 + });
  560 + setTimeout(()=>{
  561 + th.newGoodsGroup()
  562 + },1000)
533 //---如果有设定顶部的颜色的时候-- 563 //---如果有设定顶部的颜色的时候--
534 if (temp_data.top_color && temp_data.top_color != 'null') { 564 if (temp_data.top_color && temp_data.top_color != 'null') {
535 565
@@ -723,6 +753,8 @@ Page({ @@ -723,6 +753,8 @@ Page({
723 }, 753 },
724 //---加载更多是靠这个函数---- 754 //---加载更多是靠这个函数----
725 onReachBottom: function () { 755 onReachBottom: function () {
  756 + console.log('下拉加载2');
  757 +
726 var goods_list = this.selectComponent("#goods_list"); //组件的id 758 var goods_list = this.selectComponent("#goods_list"); //组件的id
727 if (goods_list) goods_list.get_list(); 759 if (goods_list) goods_list.get_list();
728 760
@@ -731,7 +763,17 @@ Page({ @@ -731,7 +763,17 @@ Page({
731 let item = getApp().globalData.func_list[i]; 763 let item = getApp().globalData.func_list[i];
732 item.re_show(); 764 item.re_show();
733 } 765 }
734 - } 766 + }
  767 +
  768 +
  769 + //自定义时商品自动加载更多
  770 + let goodsGroupArr = this.data.goodsGroupArr
  771 + if (this.data.isTemplate && goodsGroupArr.length >0) {
  772 + goodsGroupArr.map(item=>{
  773 + this[item].automore()
  774 + })
  775 + }
  776 +
735 }, 777 },
736 778
737 onPullDownRefresh: function (e) { 779 onPullDownRefresh: function (e) {
@@ -1226,8 +1268,26 @@ Page({ @@ -1226,8 +1268,26 @@ Page({
1226 getApp().goto(url); 1268 getApp().goto(url);
1227 }, 1269 },
1228 1270
1229 -  
1230 - 1271 + //视频号跳转
  1272 + nv_void(){
  1273 + // getApp().openChannelsActivity()
  1274 + wx.getChannelsLiveInfo({
  1275 + finderUserName:'sphYA5FuPCZxHaw',
  1276 + success:(res)=>{
  1277 + console.log(res)
  1278 + },
  1279 + fail:(error)=>{
  1280 + console.log(error)
  1281 + }
  1282 + })
  1283 + },
  1284 + getchir(){
  1285 + const child = this.selectComponent('.goodsg');
  1286 + console.log('子组件--------111111------')
  1287 + console.log(child)
  1288 + console.log('子组件----------2222----')
  1289 +
  1290 + },
1231 1291
1232 1292
1233 }); 1293 });
pages/index/index/index.json
@@ -26,5 +26,6 @@ @@ -26,5 +26,6 @@
26 "mp-dialog": "weui-miniprogram/dialog/dialog", 26 "mp-dialog": "weui-miniprogram/dialog/dialog",
27 "mp-sticky": "/components/mp-sticky/mp-sticky" 27 "mp-sticky": "/components/mp-sticky/mp-sticky"
28 }, 28 },
29 - "enablePullDownRefresh": false 29 + "enablePullDownRefresh": false,
  30 + "onReachBottomDistance":300
30 } 31 }
31 \ No newline at end of file 32 \ No newline at end of file
pages/index/index/index.wxml
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 209
210 210
211 <!--幸运购--> 211 <!--幸运购-->
212 - <view class="seckill" wx:if="{{luckGo_list && luckGo_list.length != 0}}"> 212 + <view class="seckill" wx:if="{{luckGo_list && luckGo_list.length != 0}}">
213 <navigator bindtap="go_url" data-remark="1" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none"> 213 <navigator bindtap="go_url" data-remark="1" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none">
214 <view class="seckill-time"> 214 <view class="seckill-time">
215 <view class="classname flex ai_c"> 215 <view class="classname flex ai_c">
@@ -375,7 +375,7 @@ @@ -375,7 +375,7 @@
375 <!--是否是自定义--> 375 <!--是否是自定义-->
376 <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}; padding-bottom: 10rpx"> 376 <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}; padding-bottom: 10rpx">
377 <!-- 置顶层 --> 377 <!-- 置顶层 -->
378 - <view class="dis_top"> 378 + <view class="dis_top" style="position:fixed">
379 <!-- 关注公众号的显示 --> 379 <!-- 关注公众号的显示 -->
380 <view id="off_top" wx:if="{{is_gz_h5}}"><official-account ></official-account></view> 380 <view id="off_top" wx:if="{{is_gz_h5}}"><official-account ></official-account></view>
381 381
@@ -392,7 +392,14 @@ @@ -392,7 +392,14 @@
392 </block> 392 </block>
393 </view> 393 </view>
394 <!-- 撑开层 --> 394 <!-- 撑开层 -->
395 - <view></view> 395 + <view>
  396 + <block wx:for="{{template_arr}}" >
  397 + <block wx:if="{{item.content.is_top==1}}">
  398 + <view style="height:100rpx"></view>
  399 + </block>
  400 + </block>
  401 +
  402 + </view>
396 403
397 <block wx:for="{{template_arr}}" wx:key="{{index}}"> 404 <block wx:for="{{template_arr}}" wx:key="{{index}}">
398 <view> 405 <view>
@@ -410,7 +417,7 @@ @@ -410,7 +417,7 @@
410 </block> 417 </block>
411 <!--商品分组--> 418 <!--商品分组-->
412 <block wx:if="{{item.ename=='goodsGroup'}}"> 419 <block wx:if="{{item.ename=='goodsGroup'}}">
413 - <goodsGroup object="{{item.content}}" sticky="{{template_arr[0].content.is_top}}"></goodsGroup> 420 + <goodsGroup class="{{'goodsGroup' + index}}" object="{{item.content}}" sticky="{{template_arr[0].content.is_top}}" ></goodsGroup>
414 421
415 </block> 422 </block>
416 <!--通知--> 423 <!--通知-->
pages/team/team_success/team_success.js
@@ -794,8 +794,14 @@ Page({ @@ -794,8 +794,14 @@ Page({
794 tt(); 794 tt();
795 }, 795 },
796 fail: function (res) { 796 fail: function (res) {
797 - ee.data.share_img_localpath= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的  
798 - tt(); 797 + //获取默认空白图
  798 + wx.getImageInfo({
  799 + src: os.imghost+'/miniapp/images/default_g_img.gif',
  800 + success: function(res) {
  801 + ee.data.share_img_localpath = res.path; //分享的图片不能用网络的
  802 + tt();
  803 + }
  804 + })
799 } 805 }
800 }); 806 });
801 }, 807 },
pages/template/index.js
@@ -11,7 +11,8 @@ var t = getApp(), @@ -11,7 +11,8 @@ var t = getApp(),
11 Page({ 11 Page({
12 data: { 12 data: {
13 url: os.imghost, 13 url: os.imghost,
14 - temp_id:0, 14 + temp_id:0,
  15 + goodsGroupArr:[]
15 }, 16 },
16 17
17 onLoad: function(e) { 18 onLoad: function(e) {
@@ -46,7 +47,27 @@ Page({ @@ -46,7 +47,27 @@ Page({
46 47
47 } 48 }
48 }, 49 },
49 - 50 + //获取商品模块实例
  51 + newGoodsGroup(){
  52 + let arr=[]
  53 + if (this.data.template_arr.length == 0) {
  54 + return
  55 + }
  56 + this.data.template_arr.map((item,index)=>{
  57 + if (item.ename == 'goodsGroup') {
  58 + arr.push(`goodsGroup${index}`)
  59 + }
  60 + })
  61 + if (arr.length > 0) {
  62 + this.setData({
  63 + goodsGroupArr : arr
  64 + })
  65 + arr.map(item=>{
  66 + let a = '.'+item
  67 + this[item] = this.selectComponent(a);
  68 + })
  69 + }
  70 + },
50 //当隐藏的时候就关闭计时器 71 //当隐藏的时候就关闭计时器
51 onHide: function() { 72 onHide: function() {
52 73
@@ -70,6 +91,9 @@ Page({ @@ -70,6 +91,9 @@ Page({
70 isTemplate: 1, 91 isTemplate: 1,
71 bgcolor_t: temp_data.bkcolor 92 bgcolor_t: temp_data.bkcolor
72 }); 93 });
  94 + setTimeout(()=>{
  95 + th.newGoodsGroup()
  96 + },1000)
73 97
74 //---如果有设定顶部的颜色的时候-- 98 //---如果有设定顶部的颜色的时候--
75 if(temp_data.top_color && temp_data.top_color!='null' ){ 99 if(temp_data.top_color && temp_data.top_color!='null' ){
@@ -156,6 +180,14 @@ Page({ @@ -156,6 +180,14 @@ Page({
156 item.re_show(); 180 item.re_show();
157 } 181 }
158 } 182 }
  183 +
  184 + //自定义时商品自动加载更多
  185 + let goodsGroupArr = this.data.goodsGroupArr
  186 + if (this.data.isTemplate && goodsGroupArr.length >0) {
  187 + goodsGroupArr.map(item=>{
  188 + this[item].automore()
  189 + })
  190 + }
159 }, 191 },
160 192
161 193
pages/template/index.json
@@ -22,5 +22,6 @@ @@ -22,5 +22,6 @@
22 "scan": "/components/diy_scan/diy_scan", 22 "scan": "/components/diy_scan/diy_scan",
23 "presell": "/components/diy_pregoods/diy_pregoods" 23 "presell": "/components/diy_pregoods/diy_pregoods"
24 }, 24 },
25 - "enablePullDownRefresh": false 25 + "enablePullDownRefresh": false,
  26 + "onReachBottomDistance":300
26 } 27 }
27 \ No newline at end of file 28 \ No newline at end of file
pages/template/index.wxml
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 </block> 15 </block>
16 <!--商品分组--> 16 <!--商品分组-->
17 <block wx:if="{{item.ename=='goodsGroup'}}"> 17 <block wx:if="{{item.ename=='goodsGroup'}}">
18 - <goodsGroup object="{{item.content}}"></goodsGroup> 18 + <goodsGroup class="{{'goodsGroup' + index}}" object="{{item.content}}"></goodsGroup>
19 </block> 19 </block>
20 <!--通知--> 20 <!--通知-->
21 <block wx:if="{{item.ename=='notice'}}"> 21 <block wx:if="{{item.ename=='notice'}}">
pages/user/assistance/task_assistance.wxml
@@ -59,6 +59,12 @@ @@ -59,6 +59,12 @@
59 style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> 59 style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
60 好友拆一拆 60 好友拆一拆
61 </view> 61 </view>
  62 + <!-- 任务超时失效 -->
  63 + <!-- <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}">
  64 + <text>距离失效</text>
  65 + <view><text>15</text>:<text>45</text>:<text>10</text></view>
  66 + </view> -->
  67 +
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" 68 <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'}};"> 69 style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
64 立即兑换 70 立即兑换
pages/user/cardinfo/cardinfo.js
@@ -673,7 +673,7 @@ Page({ @@ -673,7 +673,7 @@ Page({
673 tt(); 673 tt();
674 }, 674 },
675 fail: function (res) { 675 fail: function (res) {
676 - ee.data.head_pic = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 676 + ee.data.head_pic = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
677 tt(); 677 tt();
678 } 678 }
679 }); 679 });
@@ -707,7 +707,7 @@ Page({ @@ -707,7 +707,7 @@ Page({
707 to_user_money:function(){ 707 to_user_money:function(){
708 //提现小于0的值也不提现 708 //提现小于0的值也不提现
709 if(!this.data.free.VIPRebate || parseFloat(this.data.free.VIPRebate)<=0){ 709 if(!this.data.free.VIPRebate || parseFloat(this.data.free.VIPRebate)<=0){
710 - getApp().my_warnning("您目前没有可提现的金额",0,th); return false; 710 + getApp().my_warnning("您目前没有可提现的金额",0,this); return false;
711 } 711 }
712 this.setData({yu_e_show:1}) 712 this.setData({yu_e_show:1})
713 }, 713 },
pages/user/cardinfo/cardinfo.wxml
1 <import src="../../../utils/wxParse/wxParse.wxml"></import> 1 <import src="../../../utils/wxParse/wxParse.wxml"></import>
2 -<import src="../../../utils/filter.wxs"></import>  
3 <wxs module="filters" src="../../../utils/filter.wxs"></wxs> 2 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
4 3
5 <view> 4 <view>
@@ -63,7 +62,7 @@ @@ -63,7 +62,7 @@
63 62
64 <view class="flex"> 63 <view class="flex">
65 <view class="Detailed flex-center"> 64 <view class="Detailed flex-center">
66 - <navigator url="/pages/user/Detailed/Detailed">明细</navigator> 65 + <navigator url="/packageE/pages/user/Detailed/Detailed">明细</navigator>
67 </view> 66 </view>
68 <view class="Invitation_Cash" bindtap="to_user_money">转到余额</view> 67 <view class="Invitation_Cash" bindtap="to_user_money">转到余额</view>
69 </view> 68 </view>
pages/user/get_user_info/get_user_info.js deleted
1 -var e = getApp();  
2 -  
3 -e.request;  
4 -  
5 -Page({  
6 - data: {  
7 - url: e.globalData.setting.url,  
8 - resourceUrl: e.globalData.setting.resourceUrl,  
9 - requestData: null  
10 - },  
11 - onLoad: function() {},  
12 - onShow: function() {},  
13 - bindGetUserinfo: function(t) {  
14 - if (void 0 != t.detail.userInfo) try {  
15 - wx.setStorageSync("wx_user_info", t.detail.encryptedData), e.globalData.wechatUser = t.detail.userInfo,  
16 - e.auth.login(e.globalData.code, t.detail, function(t) {  
17 - e.showSuccess("登录成功", function() {  
18 - wx.navigateBack();  
19 - });  
20 - });  
21 - } catch (e) {  
22 - console.log(e);  
23 - } else console.log("bindGetUserinfo fail . res.detail.userInfo is undefined");  
24 - }  
25 -});  
26 \ No newline at end of file 0 \ No newline at end of file
pages/user/get_user_info/get_user_info.json deleted
1 -{  
2 - "navigationBarTitleText": "登录"  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/get_user_info/get_user_info.wxml deleted
1 -<view class="no-data">  
2 - <image class="cart-image"></image>  
3 - <view class="no-data-title">请先登录, 以便操作更多功能</view>  
4 - <button bindgetuserinfo="bindGetUserinfo" class="getuse_info" openType="getUserInfo">获取用户信息</button>  
5 - <navigator class="similer" url="/pages/index/index/index">返回首页</navigator>  
6 -</view>  
pages/user/get_user_info/get_user_info.wxss deleted
1 -page {  
2 - background-color: #fff;  
3 -}  
4 -  
5 -.container {  
6 - display: flex;  
7 - height: 100%;  
8 - align-items: center;  
9 - justify-content: center;  
10 - background-color: #fff;  
11 - padding-bottom: 100rpx;  
12 -}  
13 -  
14 -.login-in {  
15 - width: 100%;  
16 - box-sizing: border-box;  
17 -}  
18 -  
19 -.order-item {  
20 - display: flex;  
21 - justify-content: space-around;  
22 - height: 200rpx;  
23 - padding: 10rpx 0;  
24 - border-bottom: 1px solid #ddd;  
25 -}  
26 -  
27 -.goods-ico {  
28 - display: flex;  
29 - align-items: center;  
30 -}  
31 -  
32 -.goods-img {  
33 - width: 180rpx;  
34 - height: 180rpx;  
35 - font-size: 0;  
36 - margin-top: 10rpx;  
37 -}  
38 -  
39 -.goods-cont {  
40 - position: relative;  
41 - width: 430rpx;  
42 - height: 200rpx;  
43 - font-size: 28rpx;  
44 -}  
45 -  
46 -.goods-name {  
47 - width: 370rpx;  
48 - height: 64rpx;  
49 - margin: 8rpx 0;  
50 - line-height: 32rpx;  
51 - color: #333;  
52 -}  
53 -  
54 -.goods-attribute {  
55 - max-height: 52rpx;  
56 - line-height: 26rpx;  
57 - font-size: 24rpx;  
58 - color: #999;  
59 -}  
60 -  
61 -.goods-price {  
62 - height: 40rpx;  
63 - line-height: 40rpx;  
64 - margin-top: 10rpx;  
65 -}  
66 -  
67 -.btn-del {  
68 - position: absolute;  
69 - right: 0;  
70 - top: 8rpx;  
71 - width: 34rpx;  
72 - height: 34rpx;  
73 -}  
74 -  
75 -.count {  
76 - position: absolute;  
77 - right: 0;  
78 - bottom: 5rpx;  
79 - width: 156rpx;  
80 - height: 50rpx;  
81 - border: 1px solid #ddd;  
82 -}  
83 -  
84 -.count>view,.count>input {  
85 - float: left;  
86 - width: 50rpx;  
87 - height: 50rpx;  
88 - line-height: 50rpx;  
89 - text-align: center;  
90 -}  
91 -  
92 -.sub {  
93 - border-right: 1px solid #ddd;  
94 -}  
95 -  
96 -.add {  
97 - border-left: 1px solid #ddd;  
98 -}  
99 -  
100 -.pay-for {  
101 - width: 100%;  
102 - height: 100rpx;  
103 - position: fixed;  
104 - left: 0;  
105 - bottom: 0;  
106 - font-size: 28rpx;  
107 - color: #666;  
108 - background-color: #f0f2f5;  
109 -}  
110 -  
111 -.pay-for .pay-btn {  
112 - float: right;  
113 - width: 200rpx;  
114 - height: 100rpx;  
115 - line-height: 100rpx;  
116 - text-align: center;  
117 - background-color: #f23030;  
118 - color: #fff;  
119 - border-radius: 0;  
120 -}  
121 -  
122 -.pay-for .consumer {  
123 - float: right;  
124 - margin-right: 20rpx;  
125 - line-height: 50rpx;  
126 -}  
127 -  
128 -.pay-for .checkbox {  
129 - float: left;  
130 - padding-left: 40rpx;  
131 - line-height: 100rpx;  
132 - display: flex;  
133 - align-items: center;  
134 -}  
135 -  
136 -.pay-for .ico-check {  
137 - display: flex;  
138 - align-items: center;  
139 - margin-right: 20rpx;  
140 -}  
141 -  
142 -.getuse_info {  
143 - width: 60%;  
144 - background-color: #ff354d;  
145 - color: #fff;  
146 - border: none;  
147 - border-radius: 8rpx;  
148 -}  
149 -  
150 -.similer {  
151 - margin: 0 auto;  
152 - margin-top: 20px;  
153 - width: 60%;  
154 - height: 64rpx;  
155 - line-height: 64rpx;  
156 - font-size: 28rpx;  
157 - border-radius: 8rpx;  
158 - border: 1px solid #999;  
159 -}  
160 \ No newline at end of file 0 \ No newline at end of file
pages/user/index/index.js
@@ -711,7 +711,7 @@ Page({ @@ -711,7 +711,7 @@ Page({
711 url + "&gradeId=" + th.data.gradeId + "&FormId=" + item.Id); 711 url + "&gradeId=" + th.data.gradeId + "&FormId=" + item.Id);
712 break; 712 break;
713 case "02": 713 case "02":
714 - getApp().goto("/pages/user/user_fw/user_fw?gradeId=" + th.data.gradeId + "&FormId=" + item.Id); 714 + getApp().goto("/packageE/pages/user/user_fw/user_fw?gradeId=" + th.data.gradeId + "&FormId=" + item.Id);
715 break; 715 break;
716 case "03": 716 case "03":
717 getApp().goto("/pages/user/user_spsy/user_spsy?img=" + 717 getApp().goto("/pages/user/user_spsy/user_spsy?img=" +
pages/user/order_list/order_list.js
@@ -10,7 +10,7 @@ var t = function(t) { @@ -10,7 +10,7 @@ var t = function(t) {
10 oo = e.globalData, 10 oo = e.globalData,
11 r = e.request, 11 r = e.request,
12 rq = r, 12 rq = r,
13 - a = require("../../../utils/common.js"), 13 + a = require("../../../utils/common.js"),
14 s = new t.default(); 14 s = new t.default();
15 var regeneratorRuntime = require('../../../utils/runtime.js'); 15 var regeneratorRuntime = require('../../../utils/runtime.js');
16 var ut= require('../../../utils/util.js'); 16 var ut= require('../../../utils/util.js');
@@ -481,6 +481,45 @@ Page({ @@ -481,6 +481,45 @@ Page({
481 } 481 }
482 }); 482 });
483 }, 483 },
  484 + //-----删除订单-----
  485 + deleteSerOrderData: function(t) {
  486 + var th = this;
  487 + var order_id = t.currentTarget.dataset.orderid;
  488 + let order_sn = t.currentTarget.dataset.ordersn;
  489 + var index = t.currentTarget.dataset.index;
  490 + // var up_data={order_id: order_id,isdel:1};
  491 + // var order=th.data.orderList[index];
  492 + // if(order.order_status!=6){
  493 + // up_data.order_status=5;
  494 + // }
  495 + wx.showModal({
  496 + title: "是否删除订单?",
  497 + success: function(tt) {
  498 + tt.confirm && rq.put("/api/weshop/recharge/update", {
  499 + data: {
  500 + store_id: os.stoid,
  501 + order_id: order_id,
  502 + order_sn: order_sn,
  503 + order_status: 5,
  504 + },
  505 + success: function(t) {
  506 + let cardList = th.data.cardList
  507 + cardList.splice(index,1)
  508 + th.setData({
  509 + cardList
  510 + })
  511 + // for (var e = 0; e < th.data.orderList.length; e++)
  512 + // if (th.data.orderList[e].order_id == order_id) {
  513 + // th.data.orderList.splice(e, 1), th.setData({
  514 + // orderList: th.data.orderList
  515 + // });
  516 + // break;
  517 + // }
  518 + }
  519 + })
  520 + }
  521 + });
  522 + },
484 523
485 deleteOrderData2: function(order_id) { 524 deleteOrderData2: function(order_id) {
486 var th = this; 525 var th = this;
pages/user/order_list/order_list.wxml
@@ -73,8 +73,12 @@ @@ -73,8 +73,12 @@
73 <block wx:if="{{!(item.is_all_return_status==0 || item.is_all_return_status==1)}}"> 73 <block wx:if="{{!(item.is_all_return_status==0 || item.is_all_return_status==1)}}">
74 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> 74 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view>
75 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> 75 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view>
76 - <view wx:if="{{(item.order_status==2)}}">待评价</view>  
77 - <view wx:if="{{item.order_status==4}}">已评价</view> 76 + <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view>
  77 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  78 + </view>
  79 + <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view>
  80 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  81 + </view>
78 <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> 82 <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view>
79 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> 83 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
80 </view> 84 </view>
@@ -90,8 +94,12 @@ @@ -90,8 +94,12 @@
90 <view wx:if="{{(item.order_status==0&&item.pay_status==0)}}">未支付</view> 94 <view wx:if="{{(item.order_status==0&&item.pay_status==0)}}">未支付</view>
91 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0 && item.team_status == 2)}}">待发货</view> 95 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0 && item.team_status == 2)}}">待发货</view>
92 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1 && item.team_status == 2)}}">待收货</view> 96 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1 && item.team_status == 2)}}">待收货</view>
93 - <view wx:if="{{(item.order_status==2)}}">待评价</view>  
94 - <view wx:if="{{item.order_status==4}}">已评价</view> 97 + <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view>
  98 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  99 + </view>
  100 + <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view>
  101 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  102 + </view>
95 <view wx:if="{{item.pay_status == 0 && item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> 103 <view wx:if="{{item.pay_status == 0 && item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view>
96 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> 104 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
97 </view> 105 </view>
@@ -103,8 +111,12 @@ @@ -103,8 +111,12 @@
103 <block wx:if="{{!(item.is_all_return_status==0 || item.is_all_return_status==1)}}"> 111 <block wx:if="{{!(item.is_all_return_status==0 || item.is_all_return_status==1)}}">
104 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> 112 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view>
105 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> 113 <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view>
106 - <view wx:if="{{(item.order_status==2)}}">待评价</view>  
107 - <view wx:if="{{item.order_status==4}}">已评价</view> 114 + <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view>
  115 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  116 + </view>
  117 + <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view>
  118 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
  119 + </view>
108 <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> 120 <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view>
109 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> 121 <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image>
110 </view> 122 </view>
@@ -294,9 +306,15 @@ @@ -294,9 +306,15 @@
294 <!-- 订单状态 --> 306 <!-- 订单状态 -->
295 <view class="flex-center c-r"> 307 <view class="flex-center c-r">
296 <view wx:if="{{item.order_status == 0}}">待支付</view> 308 <view wx:if="{{item.order_status == 0}}">待支付</view>
297 - <view wx:if="{{item.order_status == 1}}">待评价</view>  
298 - <view wx:if="{{item.order_status == 2}}">已评价</view>  
299 - <view wx:if="{{item.order_status == 3}}" class="c-a9">已取消</view> 309 + <view wx:if="{{item.order_status == 1}}" class="flex-center">待评价 <view class="lin"></view>
  310 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image>
  311 + </view>
  312 + <view wx:if="{{item.order_status == 2}}" class="flex-center">已评价<view class="lin"></view>
  313 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image>
  314 + </view>
  315 + <view wx:if="{{item.order_status == 3}}" class="c-a9" class="flex-center">已取消<view class="lin"></view>
  316 + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image>
  317 + </view>
300 <view wx:if="{{item.order_status == 5}}">已作废</view> 318 <view wx:if="{{item.order_status == 5}}">已作废</view>
301 </view> 319 </view>
302 </view> 320 </view>
@@ -367,7 +385,7 @@ @@ -367,7 +385,7 @@
367 <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> 385 <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image>
368 <view bindtap="cancle" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{tabIndex}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" wx:if="{{(item.order_status==0)}}" data-index="{{tabIndex}}">取消订单</view> 386 <view bindtap="cancle" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{tabIndex}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" wx:if="{{(item.order_status==0)}}" data-index="{{tabIndex}}">取消订单</view>
369 387
370 - 388 +
371 <navigator class="commodity_To_evaluate flex-level View_evaluation" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{item.order_id}}">订单详情</navigator> 389 <navigator class="commodity_To_evaluate flex-level View_evaluation" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{item.order_id}}">订单详情</navigator>
372 390
373 391
pages/user/userqy/userqy.js
@@ -197,7 +197,7 @@ Page({ @@ -197,7 +197,7 @@ Page({
197 +url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id); 197 +url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id);
198 break; 198 break;
199 case "02": 199 case "02":
200 - getApp().goto("/pages/user/user_fw/user_fw?gradeId="+th.data.gradeId+"&FormId="+item.Id); 200 + getApp().goto("/packageE/pages/user/user_fw/user_fw?gradeId="+th.data.gradeId+"&FormId="+item.Id);
201 break; 201 break;
202 case "03": 202 case "03":
203 getApp().goto("/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id); 203 getApp().goto("/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id);
utils/auth.js
@@ -269,7 +269,7 @@ module.exports = { @@ -269,7 +269,7 @@ module.exports = {
269 }, 269 },
270 goGetUserInfo: function() { 270 goGetUserInfo: function() {
271 wx.navigateTo({ 271 wx.navigateTo({
272 - url: "/pages/user/get_user_info/get_user_info" 272 + url: "/packageE/pages/togoin/togoin"
273 }); 273 });
274 } 274 }
275 }; 275 };
utils/wxParse/wxParse.wxss
@@ -178,6 +178,7 @@ view.wxParse view{ @@ -178,6 +178,7 @@ view.wxParse view{
178 .wxParse-li-text { 178 .wxParse-li-text {
179 align-items: center; 179 align-items: center;
180 line-height: 20px; 180 line-height: 20px;
  181 + position: relative;
181 } 182 }
182 183
183 .wxParse-li-circle { 184 .wxParse-li-circle {