Commit d4804ec5a06912601f454ce857324fddefd6d4dd

Authored by 后端研发-苏明海
2 parents 88c0d969 33312c11

Merge branch 'test' into 'qa'

Test

See merge request !1022
Showing 48 changed files with 3262 additions and 2159 deletions
@@ -83,7 +83,7 @@ App({ @@ -83,7 +83,7 @@ App({
83 if(option) this.globalData.scene=option.scene; 83 if(option) this.globalData.scene=option.scene;
84 console.log(option,'登陆场景'); 84 console.log(option,'登陆场景');
85 85
86 - wx.hideTabBar(); 86 + // wx.hideTabBar();
87 this.initExt(); 87 this.initExt();
88 // this.overShare() 88 // this.overShare()
89 89
@@ -250,7 +250,9 @@ App({ @@ -250,7 +250,9 @@ App({
250 //首页的第一次登录 250 //首页的第一次登录
251 getUserFir(t) { 251 getUserFir(t) {
252 var s = this; 252 var s = this;
253 - if (o.isAuth()) "function" == typeof t && t(s.globalData.userInfo, s.globalData.wechatUser); else { 253 + if (o.isAuth()) {
  254 + "function" == typeof t && t(s.globalData.userInfo, s.globalData.wechatUser);
  255 + } else {
254 if (!o.isAuth()) return o.wxLogin_fir(t); 256 if (!o.isAuth()) return o.wxLogin_fir(t);
255 if (null == s.globalData.userInfo) { 257 if (null == s.globalData.userInfo) {
256 return o.wxLogin_fir(t); 258 return o.wxLogin_fir(t);
components/diy_advertising/diy_advertising.wxml
1 <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs> 1 <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs>
2 <!--上下两块--> 2 <!--上下两块-->
3 <block wx:if='{{object.style==0}}'> 3 <block wx:if='{{object.style==0}}'>
4 -<view class="zwp_s1" style="background-color: {{object.bg_color?object.bg_color:'none'}}">  
5 - <block wx:for="{{object.data}}" wx:key="{{index}}">  
6 - <view class='s1' style="padding: 0 {{object.two_side}}px">  
7 - <view class='s1_gk'>  
8 - <block wx:if="{{item.src==''}}">  
9 - <text>建议宽度640</text>  
10 - </block>  
11 - <block wx:if="{{item.src!=''}}">  
12 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1"  
13 - wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}"> 4 + <view class="zwp_s1" style="background-color: {{object.bg_color?object.bg_color:'none'}}">
  5 + <block wx:for="{{object.data}}" wx:key="{{index}}">
  6 + <view class='s1' style="padding: 0 {{object.two_side}}px">
  7 + <view class='s1_gk'>
  8 + <block wx:if="{{item.src==''}}">
  9 + <text>建议宽度640</text>
  10 + </block>
  11 + <block wx:if="{{item.src!=''}}">
  12 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  13 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1">
14 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 14 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
15 - </navigator>  
16 - <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 15 + </navigator>
  16 + </block>
  17 + <block wx:elif="{{item.AppId}}">
  18 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
17 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 19 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
18 - </view>  
19 - </block>  
20 - </view> 20 + </navigator>
  21 + </block>
  22 + <block wx:else>
  23 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
  24 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  25 + </view>
  26 + </block>
  27 + </block>
  28 + </view>
21 29
22 - </view>  
23 - </block>  
24 -</view> 30 + </view>
  31 + </block>
  32 + </view>
25 </block> 33 </block>
26 <view class="clear"></view> 34 <view class="clear"></view>
27 <!--一张图片--> 35 <!--一张图片-->
@@ -34,16 +42,24 @@ @@ -34,16 +42,24 @@
34 <text>建议宽度640</text> 42 <text>建议宽度640</text>
35 </block> 43 </block>
36 <block wx:if="{{item.src!=''}}"> 44 <block wx:if="{{item.src!=''}}">
37 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">  
38 - <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>  
39 - </navigator> 45 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  46 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1">
  47 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  48 + </navigator>
  49 + </block>
  50 + <block wx:elif="{{item.AppId}}">
  51 + <navigator class="s1_gk_a1" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  52 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  53 + </navigator>
  54 + </block>
40 55
41 - <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
42 - <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>  
43 - </view> 56 + <block wx:else>
  57 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
  58 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  59 + </view>
  60 + </block>
44 61
45 </block> 62 </block>
46 -  
47 </view> 63 </view>
48 </view> 64 </view>
49 </block> 65 </block>
@@ -62,13 +78,30 @@ @@ -62,13 +78,30 @@
62 <text>300*300</text> 78 <text>300*300</text>
63 </block> 79 </block>
64 <block wx:if="{{item.src!=''}}"> 80 <block wx:if="{{item.src!=''}}">
65 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}"> 81 + <!-- <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
66 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 82 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
67 </navigator> 83 </navigator>
68 84
69 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 85 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
70 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image> 86 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
71 - </view> 87 + </view> -->
  88 +
  89 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  90 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1">
  91 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  92 + </navigator>
  93 + </block>
  94 + <block wx:elif="{{item.AppId}}">
  95 + <navigator class="s1_gk_a1" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  96 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  97 + </navigator>
  98 + </block>
  99 +
  100 + <block wx:else>
  101 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
  102 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  103 + </view>
  104 + </block>
72 105
73 106
74 </block> 107 </block>
@@ -80,8 +113,7 @@ @@ -80,8 +113,7 @@
80 </view> 113 </view>
81 <view class="clear"></view> 114 <view class="clear"></view>
82 <!--2行三列--> 115 <!--2行三列-->
83 -<view class='s4' wx:if='{{object.style==3}}'  
84 - style="padding:0 {{object.two_side}}px;display: flex; background-color:{{object.bg_color?object.bg_color:'none'}}"> 116 +<view class='s4' wx:if='{{object.style==3}}' style="padding:0 {{object.two_side}}px;display: flex; background-color:{{object.bg_color?object.bg_color:'none'}}">
85 117
86 <block wx:for="{{object.data}}" wx:key="{{index}}"> 118 <block wx:for="{{object.data}}" wx:key="{{index}}">
87 119
@@ -90,8 +122,29 @@ @@ -90,8 +122,29 @@
90 <text>200*200</text> 122 <text>200*200</text>
91 </block> 123 </block>
92 <block wx:if="{{item.src!=''}}"> 124 <block wx:if="{{item.src!=''}}">
93 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}"><image src="{{item.src}}" mode="widthFix" lazy-load="true"></image></navigator>  
94 - <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else><image src="{{item.src}}" mode="widthFix" lazy-load="true"></image></view> 125 + <!-- <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  126 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  127 + </navigator>
  128 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  129 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  130 + </view> -->
  131 +
  132 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  133 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1">
  134 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  135 + </navigator>
  136 + </block>
  137 + <block wx:elif="{{item.AppId}}">
  138 + <navigator class="s1_gk_a1" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  139 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  140 + </navigator>
  141 + </block>
  142 +
  143 + <block wx:else>
  144 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
  145 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  146 + </view>
  147 + </block>
95 </block> 148 </block>
96 </view> 149 </view>
97 150
@@ -100,8 +153,29 @@ @@ -100,8 +153,29 @@
100 <text>200*200</text> 153 <text>200*200</text>
101 </block> 154 </block>
102 <block wx:if="{{item.src!=''}}"> 155 <block wx:if="{{item.src!=''}}">
103 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}"><image src="{{item.src}}" mode="widthFix" lazy-load="true"></image></navigator>  
104 - <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else><image src="{{item.src}}" mode="widthFix" lazy-load="true"></image></view> 156 + <!-- <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  157 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  158 + </navigator>
  159 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  160 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  161 + </view> -->
  162 +
  163 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  164 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1">
  165 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  166 + </navigator>
  167 + </block>
  168 + <block wx:elif="{{item.AppId}}">
  169 + <navigator class="s1_gk_a1" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  170 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  171 + </navigator>
  172 + </block>
  173 +
  174 + <block wx:else>
  175 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url">
  176 + <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
  177 + </view>
  178 + </block>
105 </block> 179 </block>
106 </view> 180 </view>
107 181
@@ -118,12 +192,21 @@ @@ -118,12 +192,21 @@
118 <text>300*300</text> 192 <text>300*300</text>
119 </block> 193 </block>
120 <block wx:if="{{object.data[0].src!=''}}"> 194 <block wx:if="{{object.data[0].src!=''}}">
121 - <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">>  
122 - <image src="{{object.data[0].src}}" lazy-load="true"></image>  
123 - </navigator>  
124 - <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
125 - <image src="{{object.data[0].src}}" lazy-load="true"></image>  
126 - </view> 195 + <block wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  196 + <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1">
  197 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  198 + </navigator>
  199 + </block>
  200 + <block wx:elif="{{object.data[0].AppId}}">
  201 + <navigator target="miniProgram" app-id="{{object.data[0].AppId}}" path="{{object.data[0].wxapp_url}}" class="s1_gk_a1">
  202 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  203 + </navigator>
  204 + </block>
  205 + <block wx:else>
  206 + <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>
  208 + </view>
  209 + </block>
127 </block> 210 </block>
128 </view> 211 </view>
129 212
@@ -133,13 +216,29 @@ @@ -133,13 +216,29 @@
133 <text>300*150</text> 216 <text>300*150</text>
134 </block> 217 </block>
135 <block wx:if="{{object.data[1].src!=''}}"> 218 <block wx:if="{{object.data[1].src!=''}}">
136 - <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">  
137 - <image src="{{object.data[1].src}}" lazy-load="true"></image> 219 + <!-- <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
  220 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
138 </navigator> 221 </navigator>
139 222
140 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 223 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
141 <image src="{{object.data[1].src}}" lazy-load="true"></image> 224 <image src="{{object.data[1].src}}" lazy-load="true"></image>
142 - </view> 225 + </view> -->
  226 +
  227 + <block wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
  228 + <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1">
  229 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  230 + </navigator>
  231 + </block>
  232 + <block wx:elif="{{object.data[1].AppId}}">
  233 + <navigator target="miniProgram" app-id="{{object.data[1].AppId}}" path="{{object.data[1].wxapp_url}}" class="s1_gk_a1">
  234 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  235 + </navigator>
  236 + </block>
  237 + <block wx:else>
  238 + <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>
  240 + </view>
  241 + </block>
143 242
144 243
145 </block> 244 </block>
@@ -149,12 +248,29 @@ @@ -149,12 +248,29 @@
149 <text>300*150</text> 248 <text>300*150</text>
150 </block> 249 </block>
151 <block wx:if="{{object.data[2].src!=''}}"> 250 <block wx:if="{{object.data[2].src!=''}}">
152 - <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}"> 251 + <!-- <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
153 <image src="{{object.data[2].src}}" lazy-load="true"></image> 252 <image src="{{object.data[2].src}}" lazy-load="true"></image>
154 </navigator> 253 </navigator>
155 - <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 254 + <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
156 <image src="{{object.data[2].src}}" lazy-load="true"></image> 255 <image src="{{object.data[2].src}}" lazy-load="true"></image>
157 - </view> 256 + </view> -->
  257 +
  258 + <block wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  259 + <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1">
  260 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  261 + </navigator>
  262 + </block>
  263 + <block wx:elif="{{object.data[2].AppId}}">
  264 + <navigator target="miniProgram" app-id="{{object.data[2].AppId}}" path="{{object.data[2].wxapp_url}}" class="s1_gk_a1">
  265 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  266 + </navigator>
  267 + </block>
  268 + <block wx:else>
  269 + <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>
  271 + </view>
  272 + </block>
  273 +
158 274
159 275
160 </block> 276 </block>
@@ -171,13 +287,28 @@ @@ -171,13 +287,28 @@
171 <text>200*200</text> 287 <text>200*200</text>
172 </block> 288 </block>
173 <block wx:if="{{object.data[0].src!=''}}"> 289 <block wx:if="{{object.data[0].src!=''}}">
174 - <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">  
175 - <image src="{{object.data[0].src}}" lazy-load="true"></image> 290 + <!-- <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  291 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
176 </navigator> 292 </navigator>
177 293
178 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 294 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
179 <image src="{{object.data[0].src}}" lazy-load="true"></image> 295 <image src="{{object.data[0].src}}" lazy-load="true"></image>
180 - </view> 296 + </view> -->
  297 + <block wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  298 + <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1">
  299 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  300 + </navigator>
  301 + </block>
  302 + <block wx:elif="{{object.data[0].AppId}}">
  303 + <navigator target="miniProgram" app-id="{{object.data[0].AppId}}" path="{{object.data[0].wxapp_url}}" class="s1_gk_a1">
  304 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  305 + </navigator>
  306 + </block>
  307 + <block wx:else>
  308 + <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>
  310 + </view>
  311 + </block>
181 312
182 </block> 313 </block>
183 </view> 314 </view>
@@ -186,13 +317,28 @@ @@ -186,13 +317,28 @@
186 <text>400*200</text> 317 <text>400*200</text>
187 </block> 318 </block>
188 <block wx:if="{{object.data[1].src!=''}}"> 319 <block wx:if="{{object.data[1].src!=''}}">
189 - <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}"> 320 + <!-- <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
190 <image src="{{object.data[1].src}}" lazy-load="true"></image> 321 <image src="{{object.data[1].src}}" lazy-load="true"></image>
191 </navigator> 322 </navigator>
192 323
193 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 324 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
194 <image src="{{object.data[1].src}}" lazy-load="true"></image> 325 <image src="{{object.data[1].src}}" lazy-load="true"></image>
195 - </view> 326 + </view> -->
  327 + <block wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
  328 + <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1">
  329 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  330 + </navigator>
  331 + </block>
  332 + <block wx:elif="{{object.data[1].AppId}}">
  333 + <navigator target="miniProgram" app-id="{{object.data[1].AppId}}" path="{{object.data[1].wxapp_url}}" class="s1_gk_a1">
  334 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  335 + </navigator>
  336 + </block>
  337 + <block wx:else>
  338 + <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>
  340 + </view>
  341 + </block>
196 342
197 </block> 343 </block>
198 </view> 344 </view>
@@ -204,13 +350,28 @@ @@ -204,13 +350,28 @@
204 <text>400*200</text> 350 <text>400*200</text>
205 </block> 351 </block>
206 <block wx:if="{{object.data[2].src!=''}}"> 352 <block wx:if="{{object.data[2].src!=''}}">
207 - <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">  
208 - <image src="{{object.data[2].src}}" lazy-load="true"></image>  
209 - </navigator> 353 + <!-- <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  354 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  355 + </navigator>
210 356
211 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 357 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
212 <image src="{{object.data[2].src}}" lazy-load="true"></image> 358 <image src="{{object.data[2].src}}" lazy-load="true"></image>
213 - </view> 359 + </view> -->
  360 + <block wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  361 + <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1">
  362 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  363 + </navigator>
  364 + </block>
  365 + <block wx:elif="{{object.data[2].AppId}}">
  366 + <navigator target="miniProgram" app-id="{{object.data[2].AppId}}" path="{{object.data[2].wxapp_url}}" class="s1_gk_a1">
  367 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  368 + </navigator>
  369 + </block>
  370 + <block wx:else>
  371 + <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>
  373 + </view>
  374 + </block>
214 375
215 </block> 376 </block>
216 </view> 377 </view>
@@ -219,13 +380,28 @@ @@ -219,13 +380,28 @@
219 <text>200*200</text> 380 <text>200*200</text>
220 </block> 381 </block>
221 <block wx:if="{{object.data[3].src!=''}}"> 382 <block wx:if="{{object.data[3].src!=''}}">
222 - <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}"> 383 + <!-- <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">
223 <image src="{{object.data[3].src}}" lazy-load="true"></image> 384 <image src="{{object.data[3].src}}" lazy-load="true"></image>
224 </navigator> 385 </navigator>
225 386
226 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 387 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
227 <image src="{{object.data[3].src}}" lazy-load="true"></image> 388 <image src="{{object.data[3].src}}" lazy-load="true"></image>
228 - </view> 389 + </view> -->
  390 + <block wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">
  391 + <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1">
  392 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  393 + </navigator>
  394 + </block>
  395 + <block wx:elif="{{object.data[3].AppId}}">
  396 + <navigator target="miniProgram" app-id="{{object.data[3].AppId}}" path="{{object.data[3].wxapp_url}}" class="s1_gk_a1">
  397 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  398 + </navigator>
  399 + </block>
  400 + <block wx:else>
  401 + <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>
  403 + </view>
  404 + </block>
229 405
230 </block> 406 </block>
231 </view> 407 </view>
@@ -241,13 +417,28 @@ @@ -241,13 +417,28 @@
241 <text>300*150</text> 417 <text>300*150</text>
242 </block> 418 </block>
243 <block wx:if="{{object.data[0].src!=''}}"> 419 <block wx:if="{{object.data[0].src!=''}}">
244 - <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}"> 420 + <!-- <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
245 <image src="{{object.data[0].src}}" lazy-load="true"></image> 421 <image src="{{object.data[0].src}}" lazy-load="true"></image>
246 </navigator> 422 </navigator>
247 423
248 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 424 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
249 <image src="{{object.data[0].src}}" lazy-load="true"></image> 425 <image src="{{object.data[0].src}}" lazy-load="true"></image>
250 - </view> 426 + </view> -->
  427 + <block wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  428 + <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1">
  429 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  430 + </navigator>
  431 + </block>
  432 + <block wx:elif="{{object.data[0].AppId}}">
  433 + <navigator target="miniProgram" app-id="{{object.data[0].AppId}}" path="{{object.data[0].wxapp_url}}" class="s1_gk_a1">
  434 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  435 + </navigator>
  436 + </block>
  437 + <block wx:else>
  438 + <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>
  440 + </view>
  441 + </block>
251 442
252 </block> 443 </block>
253 </view> 444 </view>
@@ -257,12 +448,27 @@ @@ -257,12 +448,27 @@
257 <text>300*300</text> 448 <text>300*300</text>
258 </block> 449 </block>
259 <block wx:if="{{object.data[1].src!=''}}"> 450 <block wx:if="{{object.data[1].src!=''}}">
260 - <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}"> 451 + <!-- <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
261 <image src="{{object.data[1].src}}" lazy-load="true"></image> 452 <image src="{{object.data[1].src}}" lazy-load="true"></image>
262 </navigator> 453 </navigator>
263 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 454 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
264 <image src="{{object.data[1].src}}" lazy-load="true"></image> 455 <image src="{{object.data[1].src}}" lazy-load="true"></image>
265 - </view> 456 + </view> -->
  457 + <block wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
  458 + <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1">
  459 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  460 + </navigator>
  461 + </block>
  462 + <block wx:elif="{{object.data[1].AppId}}">
  463 + <navigator target="miniProgram" app-id="{{object.data[1].AppId}}" path="{{object.data[1].wxapp_url}}" class="s1_gk_a1">
  464 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  465 + </navigator>
  466 + </block>
  467 + <block wx:else>
  468 + <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>
  470 + </view>
  471 + </block>
266 472
267 </block> 473 </block>
268 474
@@ -275,13 +481,28 @@ @@ -275,13 +481,28 @@
275 <text>300*300</text> 481 <text>300*300</text>
276 </block> 482 </block>
277 <block wx:if="{{object.data[2].src!=''}}"> 483 <block wx:if="{{object.data[2].src!=''}}">
278 - <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">  
279 - <image src="{{object.data[2].src}}" lazy-load="true"></image> 484 + <!-- <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  485 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
280 </navigator> 486 </navigator>
281 487
282 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 488 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
283 <image src="{{object.data[2].src}}" lazy-load="true"></image> 489 <image src="{{object.data[2].src}}" lazy-load="true"></image>
284 - </view> 490 + </view> -->
  491 + <block wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  492 + <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1">
  493 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  494 + </navigator>
  495 + </block>
  496 + <block wx:elif="{{object.data[2].AppId}}">
  497 + <navigator target="miniProgram" app-id="{{object.data[2].AppId}}" path="{{object.data[2].wxapp_url}}" class="s1_gk_a1">
  498 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  499 + </navigator>
  500 + </block>
  501 + <block wx:else>
  502 + <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>
  504 + </view>
  505 + </block>
285 506
286 </block> 507 </block>
287 </view> 508 </view>
@@ -290,13 +511,28 @@ @@ -290,13 +511,28 @@
290 <text>300*150</text> 511 <text>300*150</text>
291 </block> 512 </block>
292 <block wx:if="{{object.data[3].src!=''}}"> 513 <block wx:if="{{object.data[3].src!=''}}">
293 - <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}"> 514 + <!-- <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">
294 <image src="{{object.data[3].src}}" lazy-load="true"></image> 515 <image src="{{object.data[3].src}}" lazy-load="true"></image>
295 </navigator> 516 </navigator>
296 517
297 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 518 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
298 <image src="{{object.data[3].src}}" lazy-load="true"></image> 519 <image src="{{object.data[3].src}}" lazy-load="true"></image>
299 - </view> 520 + </view> -->
  521 + <block wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">
  522 + <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1">
  523 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  524 + </navigator>
  525 + </block>
  526 + <block wx:elif="{{object.data[3].AppId}}">
  527 + <navigator target="miniProgram" app-id="{{object.data[3].AppId}}" path="{{object.data[3].wxapp_url}}" class="s1_gk_a1">
  528 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  529 + </navigator>
  530 + </block>
  531 + <block wx:else>
  532 + <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>
  534 + </view>
  535 + </block>
300 536
301 </block> 537 </block>
302 </view> 538 </view>
@@ -314,13 +550,28 @@ @@ -314,13 +550,28 @@
314 <text>200*200</text> 550 <text>200*200</text>
315 </block> 551 </block>
316 <block wx:if="{{object.data[0].src!=''}}"> 552 <block wx:if="{{object.data[0].src!=''}}">
317 - <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">  
318 - <image src="{{object.data[0].src}}" lazy-load="true"></image> 553 + <!-- <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  554 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
319 </navigator> 555 </navigator>
320 - 556 +
321 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 557 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
322 - <image src="{{object.data[0].src}}" lazy-load="true"></image>  
323 - </view> 558 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  559 + </view> -->
  560 + <block wx:if="{{g_filter.has_char(object.data[0].wxapp_imgurl,'plugin')>=0}}">
  561 + <navigator url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1">
  562 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  563 + </navigator>
  564 + </block>
  565 + <block wx:elif="{{object.data[0].AppId}}">
  566 + <navigator target="miniProgram" app-id="{{object.data[0].AppId}}" path="{{object.data[0].wxapp_url}}" class="s1_gk_a1">
  567 + <image src="{{object.data[0].src}}" lazy-load="true"></image>
  568 + </navigator>
  569 + </block>
  570 + <block wx:else>
  571 + <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>
  573 + </view>
  574 + </block>
324 575
325 </block> 576 </block>
326 </view> 577 </view>
@@ -329,13 +580,28 @@ @@ -329,13 +580,28 @@
329 <text>200*200</text> 580 <text>200*200</text>
330 </block> 581 </block>
331 <block wx:if="{{object.data[1].src!=''}}"> 582 <block wx:if="{{object.data[1].src!=''}}">
332 - <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}"> 583 + <!-- <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
333 <image src="{{object.data[1].src}}" lazy-load="true"></image> 584 <image src="{{object.data[1].src}}" lazy-load="true"></image>
334 </navigator> 585 </navigator>
335 586
336 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 587 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
337 <image src="{{object.data[1].src}}" lazy-load="true"></image> 588 <image src="{{object.data[1].src}}" lazy-load="true"></image>
338 - </view> 589 + </view> -->
  590 + <block wx:if="{{g_filter.has_char(object.data[1].wxapp_imgurl,'plugin')>=0}}">
  591 + <navigator url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1">
  592 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  593 + </navigator>
  594 + </block>
  595 + <block wx:elif="{{object.data[1].AppId}}">
  596 + <navigator target="miniProgram" app-id="{{object.data[1].AppId}}" path="{{object.data[1].wxapp_url}}" class="s1_gk_a1">
  597 + <image src="{{object.data[1].src}}" lazy-load="true"></image>
  598 + </navigator>
  599 + </block>
  600 + <block wx:else>
  601 + <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>
  603 + </view>
  604 + </block>
339 </block> 605 </block>
340 </view> 606 </view>
341 </view> 607 </view>
@@ -347,13 +613,29 @@ @@ -347,13 +613,29 @@
347 <text>200*200</text> 613 <text>200*200</text>
348 </block> 614 </block>
349 <block wx:if="{{object.data[2].src!=''}}"> 615 <block wx:if="{{object.data[2].src!=''}}">
350 - <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}"> 616 + <!-- <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
351 <image src="{{object.data[2].src}}" lazy-load="true"></image> 617 <image src="{{object.data[2].src}}" lazy-load="true"></image>
352 </navigator> 618 </navigator>
353 619
354 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 620 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
355 <image src="{{object.data[2].src}}" lazy-load="true"></image> 621 <image src="{{object.data[2].src}}" lazy-load="true"></image>
356 - </view> 622 + </view> -->
  623 +
  624 + <block wx:if="{{g_filter.has_char(object.data[2].wxapp_imgurl,'plugin')>=0}}">
  625 + <navigator url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1">
  626 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  627 + </navigator>
  628 + </block>
  629 + <block wx:elif="{{object.data[2].AppId}}">
  630 + <navigator target="miniProgram" app-id="{{object.data[2].AppId}}" path="{{object.data[2].wxapp_url}}" class="s1_gk_a1">
  631 + <image src="{{object.data[2].src}}" lazy-load="true"></image>
  632 + </navigator>
  633 + </block>
  634 + <block wx:else>
  635 + <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>
  637 + </view>
  638 + </block>
357 639
358 640
359 </block> 641 </block>
@@ -363,13 +645,22 @@ @@ -363,13 +645,22 @@
363 <text>200*200</text> 645 <text>200*200</text>
364 </block> 646 </block>
365 <block wx:if="{{object.data[3].src!=''}}"> 647 <block wx:if="{{object.data[3].src!=''}}">
366 - <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">  
367 - <image src="{{object.data[3].src}}" lazy-load="true"></image>  
368 - </navigator> 648 + <block wx:if="{{g_filter.has_char(object.data[3].wxapp_imgurl,'plugin')>=0}}">
  649 + <navigator url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1">
  650 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  651 + </navigator>
  652 + </block>
  653 + <block wx:elif="{{object.data[3].AppId}}">
  654 + <navigator target="miniProgram" app-id="{{object.data[3].AppId}}" path="{{object.data[3].wxapp_url}}" class="s1_gk_a1">
  655 + <image src="{{object.data[3].src}}" lazy-load="true"></image>
  656 + </navigator>
  657 + </block>
  658 + <block wx:else>
  659 + <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>
  661 + </view>
  662 + </block>
369 663
370 - <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
371 - <image src="{{object.data[3].src}}" lazy-load="true"></image>  
372 - </view>  
373 </block> 664 </block>
374 </view> 665 </view>
375 </view> 666 </view>
@@ -382,13 +673,21 @@ @@ -382,13 +673,21 @@
382 <text>200*420</text> 673 <text>200*420</text>
383 </block> 674 </block>
384 <block wx:if="{{object.data[4].src!=''}}"> 675 <block wx:if="{{object.data[4].src!=''}}">
385 - <navigator url="{{object.data[4].wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(object.data[4].wxapp_imgurl,'plugin')>=0}}">  
386 - <image src="{{object.data[4].src}}" style='height:492rpx' lazy-load="true"></image>  
387 - </navigator>  
388 -  
389 - <view data-url="{{object.data[4].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
390 - <image src="{{object.data[4].src}}" style='height:492rpx' lazy-load="true"></image>  
391 - </view> 676 + <block wx:if="{{g_filter.has_char(object.data[4].wxapp_imgurl,'plugin')>=0}}">
  677 + <navigator url="{{object.data[4].wxapp_imgurl}}" class="s1_gk_a1">
  678 + <image src="{{object.data[4].src}}" lazy-load="true"></image>
  679 + </navigator>
  680 + </block>
  681 + <block wx:elif="{{object.data[4].AppId}}">
  682 + <navigator target="miniProgram" app-id="{{object.data[4].AppId}}" path="{{object.data[4].wxapp_url}}" class="s1_gk_a1">
  683 + <image src="{{object.data[4].src}}" lazy-load="true"></image>
  684 + </navigator>
  685 + </block>
  686 + <block wx:else>
  687 + <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>
  689 + </view>
  690 + </block>
392 691
393 </block> 692 </block>
394 </view> 693 </view>
@@ -401,34 +700,36 @@ @@ -401,34 +700,36 @@
401 <block wx:if='{{object.style==4 && is_show}}'> 700 <block wx:if='{{object.style==4 && is_show}}'>
402 701
403 702
404 - <swiper class="swiper" circular="true" autoplay="{{autoplay}}" current="{{object.sw_index}}"  
405 - indicator-dots="true"  
406 - indicator-color="{{object.dot_color}}"  
407 - indicator-active-color="{{object.dot_color_act}}"  
408 - interval="{{object.swiper_time?object.swiper_time*1000:interval}}" duration="{{duration}}"  
409 - style="height:{{max_sw_height}}rpx" >  
410 - <block wx:for="{{object.data}}" wx:for-index="index" >  
411 - 703 + <swiper class="swiper" circular="true" autoplay="{{autoplay}}" current="{{object.sw_index}}" indicator-dots="true" indicator-color="{{object.dot_color}}" indicator-active-color="{{object.dot_color_act}}" interval="{{object.swiper_time?object.swiper_time*1000:interval}}" duration="{{duration}}" style="height:{{max_sw_height}}rpx">
  704 + <block wx:for="{{object.data}}" wx:for-index="index">
412 <block wx:if="{{(!item.begin_date || g_filter.beg_time(item.begin_date) ) && (!item.end_date || g_filter.end_time(item.end_date) )}}"> 705 <block wx:if="{{(!item.begin_date || g_filter.beg_time(item.begin_date) ) && (!item.end_date || g_filter.end_time(item.end_date) )}}">
413 - <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">  
414 - <swiper-item>  
415 - <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>  
416 - <view class="title" wx:if="{{item.title}}">{{item.title}}</view>  
417 - </swiper-item>  
418 - </navigator> 706 + <block wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
  707 + <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx">
  708 + <swiper-item>
  709 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
  710 + <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
  711 + </swiper-item>
  712 + </navigator>
  713 + </block>
419 714
420 - <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" bindtap="go_url" wx:else>  
421 - <swiper-item>  
422 - <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/> 715 + <block wx:elif="{{item.AppId}}">
  716 + <navigator target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  717 + <swiper-item>
  718 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
423 <view class="title" wx:if="{{item.title}}">{{item.title}}</view> 719 <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
424 - </swiper-item>  
425 - </view>  
426 - </block> 720 + </swiper-item>
  721 + </navigator>
  722 + </block>
427 723
  724 + <block wx:else>
  725 + <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" bindtap="go_url">
  726 + <swiper-item>
  727 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
  728 + <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
  729 + </swiper-item>
  730 + </view>
  731 + </block>
  732 + </block>
428 </block> 733 </block>
429 </swiper> 734 </swiper>
430 -  
431 -  
432 -  
433 -  
434 -</block> 735 +</block>
435 \ No newline at end of file 736 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.js
@@ -14,7 +14,14 @@ Component({ @@ -14,7 +14,14 @@ Component({
14 type: Object, 14 type: Object,
15 value: null, 15 value: null,
16 }, 16 },
17 - 17 + sticky: {
  18 + type: Number,
  19 + value: 0,
  20 + },
  21 + container: {
  22 + type: Function,
  23 + value: null,
  24 + },
18 }, 25 },
19 data: { 26 data: {
20 // 这里是一些组件内部数据 27 // 这里是一些组件内部数据
@@ -47,14 +54,17 @@ Component({ @@ -47,14 +54,17 @@ Component({
47 swiper_hei: 0, 54 swiper_hei: 0,
48 title_class: "", 55 title_class: "",
49 is_no_plus: 1, 56 is_no_plus: 1,
  57 + container: null,
50 }, 58 },
51 59
52 - ready: function () { },  
53 -  
54 lifetimes: { 60 lifetimes: {
  61 + ready: function () {
  62 + this.setData({
  63 + container: () => wx.createSelectorQuery().select('#container')
  64 + })
  65 + },
  66 +
55 attached: function () { 67 attached: function () {
56 -  
57 -  
58 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法 68 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法
59 var nav_item = this.data.object; 69 var nav_item = this.data.object;
60 var nav_list = this.data.object.nav_list; 70 var nav_list = this.data.object.nav_list;
components/diy_goodsGroup/diy_goodsGroup.json
1 { 1 {
2 "component": true, 2 "component": true,
3 "usingComponents": { 3 "usingComponents": {
4 - "mp-loading": "weui-miniprogram/loading/loading" 4 + "mp-loading": "weui-miniprogram/loading/loading",
  5 + "mp-sticky": "../mp-sticky/mp-sticky"
5 } 6 }
6 } 7 }
7 \ No newline at end of file 8 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -4,13 +4,27 @@ @@ -4,13 +4,27 @@
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 +
  8 +<view id="container">
  9 +
  10 +
7 <block wx:if="{{is_nav}}"> 11 <block wx:if="{{is_nav}}">
  12 + <mp-sticky wx:if="{{sticky == 1}}" container="{{container}}">
8 <view class="flex gr_title_list" style="overflow-x: auto;"> 13 <view class="flex gr_title_list" style="overflow-x: auto;">
9 <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}"> 14 <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}">
10 <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text> 15 <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text>
11 </view> 16 </view>
12 </view> 17 </view>
  18 + </mp-sticky>
  19 +
  20 + <view class="flex gr_title_list" style="overflow-x: auto;" wx:else>
  21 + <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}">
  22 + <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text>
  23 + </view>
  24 + </view>
13 </block> 25 </block>
  26 +
  27 +
14 <view style="background-color: {{bg_color}};"> 28 <view style="background-color: {{bg_color}};">
15 <!--1个列表的时候--> 29 <!--1个列表的时候-->
16 <view class="zs_goods_wai" wx:if='{{object.column==1}}'> 30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
@@ -885,4 +899,6 @@ @@ -885,4 +899,6 @@
885 </view> 899 </view>
886 </swiper> 900 </swiper>
887 901
  902 +</view>
  903 +
888 </view> 904 </view>
889 \ No newline at end of file 905 \ No newline at end of file
components/diy_nav/diy_nav.wxml
@@ -3,13 +3,21 @@ @@ -3,13 +3,21 @@
3 <block wx:if="{{object.style==1}}"> 3 <block wx:if="{{object.style==1}}">
4 <view class="{{object.seticon==1?'big':object.seticon==2?'big_one_two':'big_border_three'}}"> 4 <view class="{{object.seticon==1?'big':object.seticon==2?'big_one_two':'big_border_three'}}">
5 <block wx:for="{{nav_list}}"> 5 <block wx:for="{{nav_list}}">
6 - <navigator style="width:{{100/nav_list.length}}%;" url="{{item.wxapp_url}}" class="s1_gk_a1"  
7 - wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}">  
8 - <include src="diy_nav_part1.wxml" />  
9 - </navigator>  
10 - <view style="width:{{100/nav_list.length}}%;" data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
11 - <include src="diy_nav_part1.wxml" />  
12 - </view> 6 + <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}">
  7 + <navigator style="width:{{100/nav_list.length}}%;" url="{{item.wxapp_url}}" class="s1_gk_a1">
  8 + <include src="diy_nav_part1.wxml" />
  9 + </navigator>
  10 + </block>
  11 + <block wx:elif="{{item.AppId}}">
  12 + <navigator style="width:{{100/nav_list.length}}%;" target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  13 + <include src="diy_nav_part1.wxml" />
  14 + </navigator>
  15 + </block>
  16 + <block wx:else>
  17 + <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" />
  19 + </view>
  20 + </block>
13 </block> 21 </block>
14 </view> 22 </view>
15 </block> 23 </block>
@@ -18,14 +26,21 @@ @@ -18,14 +26,21 @@
18 <view class="big_two"> 26 <view class="big_two">
19 <!-- 图片一 --> 27 <!-- 图片一 -->
20 <block wx:for="{{nav_list}}"> 28 <block wx:for="{{nav_list}}">
21 - <navigator data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url"  
22 - wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}">  
23 - <include src="diy_nav_part2.wxml" />  
24 - </navigator>  
25 - <view data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" wx:else>  
26 - <include src="diy_nav_part2.wxml" />  
27 - </view> 29 + <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}">
  30 + <navigator data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url">
  31 + <include src="diy_nav_part2.wxml" />
  32 + </navigator>
  33 + </block>
  34 + <block wx:elif="{{item.AppId}}">
  35 + <navigator target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  36 + <include src="diy_nav_part2.wxml" />
  37 + </navigator>
  38 + </block>
  39 + <block wx:else>
  40 + <view data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url">
  41 + <include src="diy_nav_part2.wxml" />
  42 + </view>
  43 + </block>
28 </block> 44 </block>
29 </view> 45 </view>
30 -</block>  
31 - 46 +</block>
32 \ No newline at end of file 47 \ No newline at end of file
components/diy_picMax/diy_picMax.wxml
@@ -9,6 +9,11 @@ @@ -9,6 +9,11 @@
9 <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> 9 <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
10 </navigator> 10 </navigator>
11 </block> 11 </block>
  12 + <block wx:elif="{{item.AppId}}">
  13 + <navigator target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  14 + <image src="{{item.src}}" mode="widthFix" style="display: block; height: 100%; width: 100%;"></image>
  15 + </navigator>
  16 + </block>
12 <block wx:else> 17 <block wx:else>
13 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> 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>
14 <image bindtap='previewImage' wx:else data-src="{{item.src}}" 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>
@@ -24,6 +29,11 @@ @@ -24,6 +29,11 @@
24 <image src="{{item.src}}" mode="widthFix" style="display: block;"></image> 29 <image src="{{item.src}}" mode="widthFix" style="display: block;"></image>
25 </navigator> 30 </navigator>
26 </block> 31 </block>
  32 + <block wx:elif="{{item.AppId}}">
  33 + <navigator target="miniProgram" app-id="{{item.AppId}}" path="{{item.wxapp_url}}">
  34 + <image src="{{item.src}}" mode="widthFix" style="display: block;"></image>
  35 + </navigator>
  36 + </block>
27 <block wx:else> 37 <block wx:else>
28 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image> 38 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image>
29 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block;" mode="widthFix"></image> 39 <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block;" mode="widthFix"></image>
components/diy_serviceCard/diy_serviceCard.js
@@ -17,7 +17,14 @@ Component({ @@ -17,7 +17,14 @@ Component({
17 type: Object, 17 type: Object,
18 value: null, 18 value: null,
19 }, 19 },
20 - 20 + sticky: {
  21 + type: Number,
  22 + value: 0,
  23 + },
  24 + container: {
  25 + type: Function,
  26 + value: null,
  27 + },
21 }, 28 },
22 data: { 29 data: {
23 // 这里是一些组件内部数据 30 // 这里是一些组件内部数据
@@ -49,12 +56,19 @@ Component({ @@ -49,12 +56,19 @@ Component({
49 title_index: 0, 56 title_index: 0,
50 swiper_hei: 0, 57 swiper_hei: 0,
51 title_class: "", 58 title_class: "",
  59 + container: null,
52 }, 60 },
53 61
54 - ready: function() {}, 62 +
55 63
56 lifetimes: { 64 lifetimes: {
  65 + ready: function() {
  66 + this.setData({
  67 + container: () => wx.createSelectorQuery().select('#container')
  68 + });
  69 + },
57 attached: function() { 70 attached: function() {
  71 +
58 let myStyle = ''; 72 let myStyle = '';
59 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法 73 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法
60 var nav_item = this.data.object; 74 var nav_item = this.data.object;
components/diy_serviceCard/diy_serviceCard.json
1 { 1 {
2 "component": true, 2 "component": true,
3 - "usingComponents": {} 3 + "usingComponents": {
  4 + "mp-sticky": "../mp-sticky/mp-sticky"
  5 + }
4 } 6 }
5 \ No newline at end of file 7 \ No newline at end of file
components/diy_serviceCard/diy_serviceCard.wxml
@@ -10,361 +10,219 @@ @@ -10,361 +10,219 @@
10 </view> 10 </view>
11 </view> 11 </view>
12 </block> --> 12 </block> -->
13 -  
14 -<!-- 服务卡项顶部标题 -->  
15 -<!-- class="scroll-view-item {{index == title_index ? 'active':''}}" -->  
16 -<scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">  
17 - <view class="flex" style="{{myStyle}}">  
18 - <view  
19 - wx:for="{{nav_list}}"  
20 - data-index="{{index}}"  
21 - data-idlist="{{item.idlist}}"  
22 - data-wgroup="{{item.wgroup}}"  
23 - data-classstyle="{{item.classstyle}}"  
24 - bindtap="gr_set_nav"  
25 - class="scroll-view-item {{index == title_index ? 'active':''}}"  
26 - style="{{title_class}}">{{item.title}}</view>  
27 - </view>  
28 -</scroll-view>  
29 -  
30 -  
31 -<!--1个列表的时候-->  
32 -<view class="zs_goods_wai" wx:if='{{object.column==1}}'>  
33 - <block wx:for="{{goods_array}}">  
34 - <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>  
35 - <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> -->  
36 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
37 - <view class='zs_top rel'>  
38 -  
39 - <block wx:if="{{object.big_order_type==3}}">  
40 - <view style="position: relative; width: 100%; height: 100%">  
41 - <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image>  
42 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>  
43 - </view>  
44 - </block>  
45 - <block wx:else>  
46 - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img"  
47 - binderror="bind_bnerr3" lazy-load="true" ></image>  
48 - </block>  
49 -  
50 - <block wx:if="{{object.goodicon==3}}">  
51 - <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image>  
52 - </block>  
53 - <block wx:if="{{object.goodicon==1}}">  
54 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
55 - </block>  
56 - <block wx:if="{{object.goodicon==2}}">  
57 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
58 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
59 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}"  
60 - src='{{imghost}}/miniapp/images/hot.png'></image>  
61 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
62 - src='{{imghost}}/miniapp/images/new.png'></image>  
63 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}"  
64 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
65 - </block>  
66 - </view>  
67 - <view class='zs_center'>  
68 - <!-- <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> -->  
69 - <view class='zs_wz1'>{{item.goods_name}}</view>  
70 - <!--如果有显示价格 -->  
71 - <view class='zs_wz2' wx:if="{{object.goodsprice}}">  
72 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
73 - <view class='wz_red'>  
74 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
75 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
76 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
77 - </view>  
78 - <view class='del'>¥{{item.market_price}}</view>  
79 - </block>  
80 - <block wx:else>  
81 -  
82 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
83 - <!-- 当会员是等级卡的时候 -->  
84 - <block wx:if="{{card_field}}">  
85 - <!-- 等级价>0 -->  
86 - <block wx:if="{{item[card_field]>0}}">  
87 - <view class="money flex ai_and">  
88 - <!-- 办卡价 -->  
89 - <view class="flex xc-wc ai_and">  
90 - <view class="fs24 wz_red">¥</view>  
91 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
92 - <view class="card_bg ellipsis-1">  
93 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
94 - <text class="card_name">{{card_name}}</text>  
95 - </view>  
96 - </view>  
97 - </view>  
98 - <view class="flex" style="line-height: 28rpx;" >  
99 - <!-- 原价 -->  
100 - <view class="price flex xc-ash line_th">  
101 - <view class="fs22">¥</view>  
102 - <view class="fs22">{{item.market_price}}</view>  
103 - </view>  
104 - </view>  
105 - </block>  
106 - <blocK wx:else>  
107 - <view class="money flex" >  
108 - <!-- 办卡价 -->  
109 - <view class="flex xc-wc">  
110 - <view class="fs24 wz_red">¥</view>  
111 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
112 - </view>  
113 - </view>  
114 - <view class="flex" style="line-height: 28rpx;" >  
115 - <!-- 原价 -->  
116 - <view class="price flex xc-ash line_th">  
117 - <view class="fs22">¥</view>  
118 - <view class="fs22">{{item.market_price}}</view>  
119 - </view>  
120 - </view>  
121 - </blocK>  
122 - </block>  
123 - <block wx:else>  
124 - <!-- 如果商品有设置等级价大于0的 -->  
125 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
126 - <view class="money flex" >  
127 - <!-- 办卡价 -->  
128 - <view class="flex xc-wc">  
129 - <view class="fs24 wz_red">¥</view>  
130 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
131 - </view>  
132 - <!-- 原价 -->  
133 - <view class="price flex xc-ash line_th">  
134 - <view class="fs22">¥</view>  
135 - <view class="fs22">{{item.market_price}}</view>  
136 - </view>  
137 -  
138 - </view>  
139 - <view class="flex" style="line-height: 28rpx;" >  
140 - <!-- 等级价 -->  
141 - <view class="price flex ai_and">  
142 - <view class="fs22">¥</view>  
143 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
144 - <view class="card_bg ellipsis-1">  
145 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
146 - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>  
147 - </view>  
148 - </view>  
149 - </view>  
150 - </block>  
151 - <block wx:else>  
152 - <view class="money flex" >  
153 - <!-- 办卡价 -->  
154 - <view class="flex xc-wc">  
155 - <view class="fs24 wz_red">¥</view>  
156 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
157 - </view>  
158 - </view>  
159 - <view class="flex" style="line-height: 28rpx;" >  
160 - <!-- 原价 -->  
161 - <view class="price flex xc-ash line_th">  
162 - <view class="fs22">¥</view>  
163 - <view class="fs22">{{item.market_price}}</view>  
164 - </view>  
165 - </view>  
166 - </block>  
167 - </block>  
168 - </block>  
169 -  
170 - <block wx:else>  
171 - <view class='wz_red'>¥{{item.shop_price}}</view>  
172 - <view class='del'>¥{{item.market_price}}</view>  
173 - </block>  
174 -  
175 - </block>  
176 -  
177 - </view>  
178 - <view class='zs_wz4 c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
179 - <!-- <view style="height: 10rpx;"></view> -->  
180 - </view>  
181 - </navigator>  
182 - </view>  
183 - <!-- <view style="height:20rpx"></view> -->  
184 - </block>  
185 -  
186 -</view>  
187 -<!--2个一列-->  
188 -<view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;">  
189 - <block wx:for="{{goods_array}}" >  
190 - <view class="nav-container">  
191 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}">  
192 - <view class="zs_goods_wai_ban">  
193 - <!-- <view class="zs_goods_ban"> -->  
194 - <!-- <view class='zs_goods_2l'> -->  
195 - <view class='zs_top_2l rel'>  
196 -  
197 - <block wx:if="{{object.big_order_type==3}}">  
198 - <view style="position: relative; width: 100%; height: 100%">  
199 - <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
200 - binderror="bind_bnerr3"></image>  
201 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
202 - binderror="bind_bnerr3"></image>  
203 - </view>  
204 - </block>  
205 - <block wx:else>  
206 - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
207 - binderror="bind_bnerr3"></image>  
208 - </block>  
209 -  
210 - <block wx:if="{{object.goodicon==3}}">  
211 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
212 - src='{{object.customicon}}'></image>  
213 - </block>  
214 - <block wx:if="{{object.goodicon==1}}">  
215 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
216 - </block>  
217 - <block wx:if="{{object.goodicon==2}}">  
218 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
219 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
220 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
221 - src='{{imghost}}/miniapp/images/hot.png'></image>  
222 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
223 - src='{{imghost}}/miniapp/images/new.png'></image>  
224 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
225 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
226 - </block>  
227 - </view>  
228 -  
229 - <view class='zs_center_2l'>  
230 - <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
231 - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}">  
232 -  
233 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
234 - <view class='wz_red'>  
235 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
236 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
237 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
238 - </view>  
239 - <view class='del'>¥{{item.market_price}}</view>  
240 - </block>  
241 - <block wx:else>  
242 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
243 - <!-- 当会员是等级卡的时候 -->  
244 - <block wx:if="{{card_field}}">  
245 - <!-- 等级价>0 -->  
246 - <block wx:if="{{item[card_field]>0}}">  
247 - <view class="money flex" >  
248 - <!-- 办卡价 -->  
249 - <view class="flex xc-wc ai_and">  
250 - <view class="fs24 wz_red">¥</view>  
251 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
252 - <view class="card_bg ellipsis-1">  
253 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
254 - <view class="card_name">{{card_name}}</view>  
255 - </view>  
256 - </view>  
257 - </view>  
258 - <view class="flex" style="line-height: 28rpx;" >  
259 - <!-- 原价 -->  
260 - <view class="price flex xc-ash line_th">  
261 - <view class="fs22">¥</view>  
262 - <view class="fs22">{{item.market_price}}</view>  
263 - </view>  
264 - </view>  
265 - </block>  
266 - <blocK wx:else>  
267 - <view class="money flex" >  
268 - <!-- 办卡价 -->  
269 - <view class="flex xc-wc">  
270 - <view class="fs24 wz_red">¥</view>  
271 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
272 - </view>  
273 - </view>  
274 - <view class="flex" style="line-height: 28rpx;" >  
275 - <!-- 原价 -->  
276 - <view class="price flex xc-ash line_th">  
277 - <view class="fs22">¥</view>  
278 - <view class="fs22">{{item.market_price}}</view>  
279 - </view>  
280 - </view>  
281 - </blocK>  
282 - </block>  
283 - <block wx:else>  
284 - <!-- 如果商品有设置等级价大于0的 -->  
285 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
286 - <view class="money flex" >  
287 - <!-- 办卡价 -->  
288 - <view class="flex xc-wc">  
289 - <view class="fs24 wz_red">¥</view>  
290 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
291 - </view>  
292 - <!-- 原价 -->  
293 - <view class="price flex xc-ash line_th">  
294 - <view class="fs22">¥</view>  
295 - <view class="fs22">{{item.market_price}}</view>  
296 - </view>  
297 -  
298 - </view>  
299 - <view class="flex" style="line-height: 28rpx;" >  
300 - <!-- 等级价 -->  
301 - <view class="price flex ai_and">  
302 - <view class="fs22">¥</view>  
303 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
304 - <view class="card_bg ellipsis-1">  
305 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
306 - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> 13 +<view id="container">
  14 +
  15 + <mp-sticky wx:if="{{sticky == 1}}" container="{{container}}">
  16 + <scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">
  17 + <view class="flex" style="{{myStyle}};">
  18 + <view
  19 + wx:for="{{nav_list}}"
  20 + data-index="{{index}}"
  21 + data-idlist="{{item.idlist}}"
  22 + data-wgroup="{{item.wgroup}}"
  23 + data-classstyle="{{item.classstyle}}"
  24 + bindtap="gr_set_nav"
  25 + class="scroll-view-item {{index == title_index ? 'active':''}}"
  26 + style="{{title_class}}">{{item.title}}</view>
  27 + </view>
  28 + </scroll-view>
  29 + </mp-sticky>
  30 +
  31 + <block wx:else>
  32 + <scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">
  33 + <view class="flex" style="{{myStyle}};">
  34 + <view
  35 + wx:for="{{nav_list}}"
  36 + data-index="{{index}}"
  37 + data-idlist="{{item.idlist}}"
  38 + data-wgroup="{{item.wgroup}}"
  39 + data-classstyle="{{item.classstyle}}"
  40 + bindtap="gr_set_nav"
  41 + class="scroll-view-item {{index == title_index ? 'active':''}}"
  42 + style="{{title_class}}">{{item.title}}</view>
  43 + </view>
  44 + </scroll-view>
  45 + </block>
  46 +
  47 +
  48 +
  49 +
  50 + <!--1个列表的时候-->
  51 + <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
  52 + <block wx:for="{{goods_array}}">
  53 + <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>
  54 + <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> -->
  55 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  56 + <view class='zs_top rel'>
  57 +
  58 + <block wx:if="{{object.big_order_type==3}}">
  59 + <view style="position: relative; width: 100%; height: 100%">
  60 + <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image>
  61 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  62 + </view>
  63 + </block>
  64 + <block wx:else>
  65 + <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img"
  66 + binderror="bind_bnerr3" lazy-load="true" ></image>
  67 + </block>
  68 +
  69 + <block wx:if="{{object.goodicon==3}}">
  70 + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image>
  71 + </block>
  72 + <block wx:if="{{object.goodicon==1}}">
  73 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  74 + </block>
  75 + <block wx:if="{{object.goodicon==2}}">
  76 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  77 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  78 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}"
  79 + src='{{imghost}}/miniapp/images/hot.png'></image>
  80 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  81 + src='{{imghost}}/miniapp/images/new.png'></image>
  82 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}"
  83 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  84 + </block>
  85 + </view>
  86 + <view class='zs_center'>
  87 + <!-- <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> -->
  88 + <view class='zs_wz1'>{{item.goods_name}}</view>
  89 + <!--如果有显示价格 -->
  90 + <view class='zs_wz2' wx:if="{{object.goodsprice}}">
  91 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  92 + <view class='wz_red'>
  93 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  94 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  95 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  96 + </view>
  97 + <view class='del'>¥{{item.market_price}}</view>
  98 + </block>
  99 + <block wx:else>
  100 +
  101 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  102 + <!-- 当会员是等级卡的时候 -->
  103 + <block wx:if="{{card_field}}">
  104 + <!-- 等级价>0 -->
  105 + <block wx:if="{{item[card_field]>0}}">
  106 + <view class="money flex ai_and">
  107 + <!-- 办卡价 -->
  108 + <view class="flex xc-wc ai_and">
  109 + <view class="fs24 wz_red">¥</view>
  110 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  111 + <view class="card_bg ellipsis-1">
  112 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  113 + <text class="card_name">{{card_name}}</text>
  114 + </view>
  115 + </view>
  116 + </view>
  117 + <view class="flex" style="line-height: 28rpx;" >
  118 + <!-- 原价 -->
  119 + <view class="price flex xc-ash line_th">
  120 + <view class="fs22">¥</view>
  121 + <view class="fs22">{{item.market_price}}</view>
  122 + </view>
  123 + </view>
  124 + </block>
  125 + <blocK wx:else>
  126 + <view class="money flex" >
  127 + <!-- 办卡价 -->
  128 + <view class="flex xc-wc">
  129 + <view class="fs24 wz_red">¥</view>
  130 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  131 + </view>
  132 + </view>
  133 + <view class="flex" style="line-height: 28rpx;" >
  134 + <!-- 原价 -->
  135 + <view class="price flex xc-ash line_th">
  136 + <view class="fs22">¥</view>
  137 + <view class="fs22">{{item.market_price}}</view>
  138 + </view>
  139 + </view>
  140 + </blocK>
  141 + </block>
  142 + <block wx:else>
  143 + <!-- 如果商品有设置等级价大于0的 -->
  144 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  145 + <view class="money flex" >
  146 + <!-- 办卡价 -->
  147 + <view class="flex xc-wc">
  148 + <view class="fs24 wz_red">¥</view>
  149 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  150 + </view>
  151 + <!-- 原价 -->
  152 + <view class="price flex xc-ash line_th">
  153 + <view class="fs22">¥</view>
  154 + <view class="fs22">{{item.market_price}}</view>
  155 + </view>
  156 +
  157 + </view>
  158 + <view class="flex" style="line-height: 28rpx;" >
  159 + <!-- 等级价 -->
  160 + <view class="price flex ai_and">
  161 + <view class="fs22">¥</view>
  162 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  163 + <view class="card_bg ellipsis-1">
  164 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  165 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
307 </view> 166 </view>
308 - </view>  
309 - </view>  
310 - </block>  
311 - <block wx:else>  
312 - <view class="money flex" >  
313 - <!-- 办卡价 -->  
314 - <view class="flex xc-wc">  
315 - <view class="fs24 wz_red">¥</view>  
316 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
317 - </view>  
318 - </view>  
319 - <view class="flex" style="line-height: 28rpx;" >  
320 - <!-- 原价 -->  
321 - <view class="price flex xc-ash line_th">  
322 - <view class="fs22">¥</view>  
323 - <view class="fs22">{{item.market_price}}</view>  
324 - </view>  
325 - </view>  
326 - </block>  
327 - </block>  
328 - </block>  
329 - <block wx:else>  
330 - <view class='wz_red'>¥{{item.shop_price}}</view>  
331 - <view class='del'>¥{{item.market_price}}</view>  
332 - </block>  
333 - </block>  
334 - </view>  
335 - <view class='zs_wz5_2l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
336 - <!-- <view style="height: 10rpx;"></view> -->  
337 - </view>  
338 - <!-- </view> -->  
339 - <!-- </view> -->  
340 -  
341 - </view>  
342 - </navigator>  
343 - </view>  
344 -  
345 -</block>  
346 - <!-- <view class="clear"></view> -->  
347 -</view>  
348 -<!--3个一列-->  
349 -<block wx:if='{{object.column==3}}'>  
350 - <view class="flex wrap pdh10">  
351 - <block wx:for="{{goods_array}}" >  
352 - <view class="nav-box">  
353 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
354 - <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" >  
355 - <view class="zs_goods_san">  
356 - <view class='zs_goods_3l'>  
357 - <view class='zs_top_3l rel'> 167 + </view>
  168 + </view>
  169 + </block>
  170 + <block wx:else>
  171 + <view class="money flex" >
  172 + <!-- 办卡价 -->
  173 + <view class="flex xc-wc">
  174 + <view class="fs24 wz_red">¥</view>
  175 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  176 + </view>
  177 + </view>
  178 + <view class="flex" style="line-height: 28rpx;" >
  179 + <!-- 原价 -->
  180 + <view class="price flex xc-ash line_th">
  181 + <view class="fs22">¥</view>
  182 + <view class="fs22">{{item.market_price}}</view>
  183 + </view>
  184 + </view>
  185 + </block>
  186 + </block>
  187 + </block>
  188 +
  189 + <block wx:else>
  190 + <view class='wz_red'>¥{{item.shop_price}}</view>
  191 + <view class='del'>¥{{item.market_price}}</view>
  192 + </block>
  193 +
  194 + </block>
  195 +
  196 + </view>
  197 + <view class='zs_wz4 c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  198 + <!-- <view style="height: 10rpx;"></view> -->
  199 + </view>
  200 + </navigator>
  201 + </view>
  202 + <!-- <view style="height:20rpx"></view> -->
  203 + </block>
  204 +
  205 + </view>
  206 + <!--2个一列-->
  207 + <view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;">
  208 + <block wx:for="{{goods_array}}" >
  209 + <view class="nav-container">
  210 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}">
  211 + <view class="zs_goods_wai_ban">
  212 + <!-- <view class="zs_goods_ban"> -->
  213 + <!-- <view class='zs_goods_2l'> -->
  214 + <view class='zs_top_2l rel'>
  215 +
358 <block wx:if="{{object.big_order_type==3}}"> 216 <block wx:if="{{object.big_order_type==3}}">
359 <view style="position: relative; width: 100%; height: 100%"> 217 <view style="position: relative; width: 100%; height: 100%">
360 - <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" 218 + <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
361 binderror="bind_bnerr3"></image> 219 binderror="bind_bnerr3"></image>
362 <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" 220 <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
363 binderror="bind_bnerr3"></image> 221 binderror="bind_bnerr3"></image>
364 </view> 222 </view>
365 </block> 223 </block>
366 <block wx:else> 224 <block wx:else>
367 - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" 225 + <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
368 binderror="bind_bnerr3"></image> 226 binderror="bind_bnerr3"></image>
369 </block> 227 </block>
370 228
@@ -386,17 +244,17 @@ @@ -386,17 +244,17 @@
386 src='{{imghost}}/miniapp/images/Promotion.png'></image> 244 src='{{imghost}}/miniapp/images/Promotion.png'></image>
387 </block> 245 </block>
388 </view> 246 </view>
389 - <view class='zs_center_3l'>  
390 247
  248 + <view class='zs_center_2l'>
  249 + <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  250 + <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}">
391 251
392 - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
393 - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">  
394 <block wx:if="{{item.prom_price || item.prom_integral}}"> 252 <block wx:if="{{item.prom_price || item.prom_integral}}">
395 <view class='wz_red'> 253 <view class='wz_red'>
396 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
397 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
398 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
399 - </view> 254 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  255 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  256 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  257 + </view>
400 <view class='del'>¥{{item.market_price}}</view> 258 <view class='del'>¥{{item.market_price}}</view>
401 </block> 259 </block>
402 <block wx:else> 260 <block wx:else>
@@ -412,7 +270,7 @@ @@ -412,7 +270,7 @@
412 <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> 270 <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
413 <view class="card_bg ellipsis-1"> 271 <view class="card_bg ellipsis-1">
414 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> 272 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
415 - <text class="card_name">{{card_name}}</text> 273 + <view class="card_name">{{card_name}}</view>
416 </view> 274 </view>
417 </view> 275 </view>
418 </view> 276 </view>
@@ -488,364 +346,529 @@ @@ -488,364 +346,529 @@
488 </block> 346 </block>
489 </block> 347 </block>
490 <block wx:else> 348 <block wx:else>
491 - <view class='wz_red'>¥{{item.shop_price}}</view>  
492 - <view class='del'>¥{{item.market_price}}</view> 349 + <view class='wz_red'>¥{{item.shop_price}}</view>
  350 + <view class='del'>¥{{item.market_price}}</view>
493 </block> 351 </block>
494 </block> 352 </block>
495 </view> 353 </view>
496 - <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
497 - <!-- <view style="height: 10rpx;"></view> --> 354 + <view class='zs_wz5_2l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  355 + <!-- <view style="height: 10rpx;"></view> -->
498 </view> 356 </view>
499 - </view>  
500 - </view> 357 + <!-- </view> -->
  358 + <!-- </view> -->
  359 +
501 </view> 360 </view>
502 </navigator> 361 </navigator>
503 </view> 362 </view>
504 -  
505 - </block>  
506 -</view>  
507 - <!-- <view class="clear"></view> -->  
508 -</block>  
509 -<!-- 列表显示 -->  
510 -<view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'>  
511 - <block wx:for="{{goods_array}}" >  
512 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
513 - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >  
514 - <view class='zs_top_x'>  
515 - <block wx:if="{{object.big_order_type==3}}">  
516 - <view style="position: relative; width: 100%; height: 100%">  
517 - <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
518 - binderror="bind_bnerr3"></image>  
519 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%;" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
520 - binderror="bind_bnerr3"></image>  
521 - </view>  
522 - </block>  
523 -  
524 - <block wx:else>  
525 - <!-- 原来的 -->  
526 - <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"  
527 - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
528 - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> -->  
529 -  
530 - <!-- 2021.11.27修改 -->  
531 - <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"  
532 - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
533 - binderror="bind_bnerr3"></image>  
534 - </block>  
535 -  
536 - <block wx:if="{{object.goodicon==3}}">  
537 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
538 - src='{{object.customicon}}'></image>  
539 - </block>  
540 - <block wx:if="{{object.goodicon==1}}">  
541 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
542 - </block>  
543 - <block wx:if="{{object.goodicon==2}}">  
544 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
545 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
546 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
547 - src='{{imghost}}/miniapp/images/hot.png'></image>  
548 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
549 - src='{{imghost}}/miniapp/images/new.png'></image>  
550 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
551 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
552 - </block>  
553 - </view>  
554 -  
555 - <view class='zs_center_x'>  
556 - <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
557 - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}">  
558 -  
559 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
560 - <view class='wz_red'>  
561 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
562 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
563 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
564 - </view>  
565 - <view class='del'>¥{{item.market_price}}</view>  
566 - </block>  
567 - <!-- 不是活动的情况 -->  
568 - <block wx:else>  
569 -  
570 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
571 - <!-- 当会员是等级卡的时候 -->  
572 - <block wx:if="{{card_field}}">  
573 - <!-- 等级价>0 -->  
574 - <block wx:if="{{item[card_field]>0}}">  
575 - <view class="money flex" >  
576 - <!-- 办卡价 -->  
577 - <view class="flex xc-wc ai_and">  
578 - <view class="fs24 wz_red">¥</view>  
579 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
580 - <view class="card_bg ellipsis-1">  
581 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
582 - <text class="card_name">{{card_name}}</text>  
583 - </view>  
584 - </view>  
585 - </view>  
586 - <view class="flex" style="line-height: 28rpx;" >  
587 - <!-- 原价 -->  
588 - <view class="price flex xc-ash line_th">  
589 - <view class="fs22">¥</view>  
590 - <view class="fs22">{{item.market_price}}</view>  
591 - </view>  
592 - </view>  
593 - </block>  
594 - <blocK wx:else>  
595 - <view class="money flex" >  
596 - <!-- 办卡价 -->  
597 - <view class="flex xc-wc">  
598 - <view class="fs24">¥</view>  
599 - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>  
600 - </view>  
601 - </view>  
602 - <view class="flex" style="line-height: 28rpx;" >  
603 - <!-- 原价 -->  
604 - <view class="price flex xc-ash line_th">  
605 - <view class="fs22">¥</view>  
606 - <view class="fs22">{{item.market_price}}</view>  
607 - </view>  
608 - </view>  
609 - </blocK>  
610 - </block>  
611 - <block wx:else>  
612 - <!-- 如果商品有设置等级价大于0的 -->  
613 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
614 - <view class="money flex" >  
615 - <!-- 办卡价 -->  
616 - <view class="flex xc-wc">  
617 - <view class="fs24">¥</view>  
618 - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>  
619 - </view>  
620 - <!-- 原价 -->  
621 - <view class="price flex xc-ash line_th">  
622 - <view class="fs22">¥</view>  
623 - <view class="fs22">{{item.market_price}}</view>  
624 - </view> 363 +
  364 + </block>
  365 + <!-- <view class="clear"></view> -->
  366 + </view>
  367 + <!--3个一列-->
  368 + <block wx:if='{{object.column==3}}'>
  369 + <view class="flex wrap pdh10">
  370 + <block wx:for="{{goods_array}}" >
  371 + <view class="nav-box">
  372 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  373 + <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" >
  374 + <view class="zs_goods_san">
  375 + <view class='zs_goods_3l'>
  376 + <view class='zs_top_3l rel'>
  377 + <block wx:if="{{object.big_order_type==3}}">
  378 + <view style="position: relative; width: 100%; height: 100%">
  379 + <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  380 + binderror="bind_bnerr3"></image>
  381 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  382 + binderror="bind_bnerr3"></image>
  383 + </view>
  384 + </block>
  385 + <block wx:else>
  386 + <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  387 + binderror="bind_bnerr3"></image>
  388 + </block>
  389 +
  390 + <block wx:if="{{object.goodicon==3}}">
  391 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  392 + src='{{object.customicon}}'></image>
  393 + </block>
  394 + <block wx:if="{{object.goodicon==1}}">
  395 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  396 + </block>
  397 + <block wx:if="{{object.goodicon==2}}">
  398 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  399 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  400 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  401 + src='{{imghost}}/miniapp/images/hot.png'></image>
  402 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  403 + src='{{imghost}}/miniapp/images/new.png'></image>
  404 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  405 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  406 + </block>
  407 + </view>
  408 + <view class='zs_center_3l'>
  409 +
  410 +
  411 + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  412 + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
  413 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  414 + <view class='wz_red'>
  415 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  416 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  417 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  418 + </view>
  419 + <view class='del'>¥{{item.market_price}}</view>
  420 + </block>
  421 + <block wx:else>
  422 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  423 + <!-- 当会员是等级卡的时候 -->
  424 + <block wx:if="{{card_field}}">
  425 + <!-- 等级价>0 -->
  426 + <block wx:if="{{item[card_field]>0}}">
  427 + <view class="money flex" >
  428 + <!-- 办卡价 -->
  429 + <view class="flex xc-wc ai_and">
  430 + <view class="fs24 wz_red">¥</view>
  431 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  432 + <view class="card_bg ellipsis-1">
  433 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  434 + <text class="card_name">{{card_name}}</text>
  435 + </view>
  436 + </view>
  437 + </view>
  438 + <view class="flex" style="line-height: 28rpx;" >
  439 + <!-- 原价 -->
  440 + <view class="price flex xc-ash line_th">
  441 + <view class="fs22">¥</view>
  442 + <view class="fs22">{{item.market_price}}</view>
  443 + </view>
  444 + </view>
  445 + </block>
  446 + <blocK wx:else>
  447 + <view class="money flex" >
  448 + <!-- 办卡价 -->
  449 + <view class="flex xc-wc">
  450 + <view class="fs24 wz_red">¥</view>
  451 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  452 + </view>
  453 + </view>
  454 + <view class="flex" style="line-height: 28rpx;" >
  455 + <!-- 原价 -->
  456 + <view class="price flex xc-ash line_th">
  457 + <view class="fs22">¥</view>
  458 + <view class="fs22">{{item.market_price}}</view>
  459 + </view>
  460 + </view>
  461 + </blocK>
  462 + </block>
  463 + <block wx:else>
  464 + <!-- 如果商品有设置等级价大于0的 -->
  465 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  466 + <view class="money flex" >
  467 + <!-- 办卡价 -->
  468 + <view class="flex xc-wc">
  469 + <view class="fs24 wz_red">¥</view>
  470 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  471 + </view>
  472 + <!-- 原价 -->
  473 + <view class="price flex xc-ash line_th">
  474 + <view class="fs22">¥</view>
  475 + <view class="fs22">{{item.market_price}}</view>
  476 + </view>
  477 +
  478 + </view>
  479 + <view class="flex" style="line-height: 28rpx;" >
  480 + <!-- 等级价 -->
  481 + <view class="price flex ai_and">
  482 + <view class="fs22">¥</view>
  483 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  484 + <view class="card_bg ellipsis-1">
  485 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  486 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
  487 + </view>
  488 + </view>
  489 + </view>
  490 + </block>
  491 + <block wx:else>
  492 + <view class="money flex" >
  493 + <!-- 办卡价 -->
  494 + <view class="flex xc-wc">
  495 + <view class="fs24 wz_red">¥</view>
  496 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  497 + </view>
  498 + </view>
  499 + <view class="flex" style="line-height: 28rpx;" >
  500 + <!-- 原价 -->
  501 + <view class="price flex xc-ash line_th">
  502 + <view class="fs22">¥</view>
  503 + <view class="fs22">{{item.market_price}}</view>
  504 + </view>
  505 + </view>
  506 + </block>
  507 + </block>
  508 + </block>
  509 + <block wx:else>
  510 + <view class='wz_red'>¥{{item.shop_price}}</view>
  511 + <view class='del'>¥{{item.market_price}}</view>
  512 + </block>
  513 + </block>
  514 + </view>
  515 + <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  516 + <!-- <view style="height: 10rpx;"></view> -->
  517 + </view>
  518 + </view>
  519 + </view>
  520 + </view>
  521 + </navigator>
  522 + </view>
  523 +
  524 + </block>
  525 + </view>
  526 + <!-- <view class="clear"></view> -->
  527 + </block>
  528 + <!-- 列表显示 -->
  529 + <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'>
  530 + <block wx:for="{{goods_array}}" >
  531 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  532 + <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >
  533 + <view class='zs_top_x'>
  534 + <block wx:if="{{object.big_order_type==3}}">
  535 + <view style="position: relative; width: 100%; height: 100%">
  536 + <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  537 + binderror="bind_bnerr3"></image>
  538 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%;" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  539 + binderror="bind_bnerr3"></image>
  540 + </view>
  541 + </block>
  542 +
  543 + <block wx:else>
  544 + <!-- 原来的 -->
  545 + <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"
  546 + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  547 + binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> -->
  548 +
  549 + <!-- 2021.11.27修改 -->
  550 + <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"
  551 + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  552 + binderror="bind_bnerr3"></image>
  553 + </block>
  554 +
  555 + <block wx:if="{{object.goodicon==3}}">
  556 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  557 + src='{{object.customicon}}'></image>
  558 + </block>
  559 + <block wx:if="{{object.goodicon==1}}">
  560 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  561 + </block>
  562 + <block wx:if="{{object.goodicon==2}}">
  563 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  564 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  565 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  566 + src='{{imghost}}/miniapp/images/hot.png'></image>
  567 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  568 + src='{{imghost}}/miniapp/images/new.png'></image>
  569 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  570 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  571 + </block>
  572 + </view>
  573 +
  574 + <view class='zs_center_x'>
  575 + <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  576 + <view class='zs_wz2_x' wx:if="{{object.goodsprice}}">
625 577
626 - </view>  
627 - <view class="flex" style="line-height: 28rpx;" >  
628 - <!-- 等级价 -->  
629 - <view class="price flex ai_and">  
630 - <view class="fs22">¥</view>  
631 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
632 - <view class="card_bg">  
633 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view>  
634 - </view>  
635 - </view>  
636 - </block>  
637 - <block wx:else>  
638 - <view class="money flex" >  
639 - <!-- 办卡价 -->  
640 - <view class="flex xc-wc">  
641 - <view class="fs24 wz_red">¥</view>  
642 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
643 - </view>  
644 - </view>  
645 - <view class="flex" style="line-height: 28rpx;" >  
646 - <!-- 原价 -->  
647 - <view class="price flex xc-ash line_th">  
648 - <view class="fs22">¥</view>  
649 - <view class="fs22">{{item.market_price}}</view>  
650 - </view>  
651 - </view>  
652 - </block>  
653 - </block> 578 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  579 + <view class='wz_red'>
  580 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  581 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  582 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  583 + </view>
  584 + <view class='del'>¥{{item.market_price}}</view>
654 </block> 585 </block>
655 - 586 + <!-- 不是活动的情况 -->
656 <block wx:else> 587 <block wx:else>
657 - <view class='wz_red'>¥{{item.shop_price}}</view>  
658 - <view class='del'>¥{{item.market_price}}</view> 588 +
  589 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  590 + <!-- 当会员是等级卡的时候 -->
  591 + <block wx:if="{{card_field}}">
  592 + <!-- 等级价>0 -->
  593 + <block wx:if="{{item[card_field]>0}}">
  594 + <view class="money flex" >
  595 + <!-- 办卡价 -->
  596 + <view class="flex xc-wc ai_and">
  597 + <view class="fs24 wz_red">¥</view>
  598 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  599 + <view class="card_bg ellipsis-1">
  600 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  601 + <text class="card_name">{{card_name}}</text>
  602 + </view>
  603 + </view>
  604 + </view>
  605 + <view class="flex" style="line-height: 28rpx;" >
  606 + <!-- 原价 -->
  607 + <view class="price flex xc-ash line_th">
  608 + <view class="fs22">¥</view>
  609 + <view class="fs22">{{item.market_price}}</view>
  610 + </view>
  611 + </view>
  612 + </block>
  613 + <blocK wx:else>
  614 + <view class="money flex" >
  615 + <!-- 办卡价 -->
  616 + <view class="flex xc-wc">
  617 + <view class="fs24">¥</view>
  618 + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
  619 + </view>
  620 + </view>
  621 + <view class="flex" style="line-height: 28rpx;" >
  622 + <!-- 原价 -->
  623 + <view class="price flex xc-ash line_th">
  624 + <view class="fs22">¥</view>
  625 + <view class="fs22">{{item.market_price}}</view>
  626 + </view>
  627 + </view>
  628 + </blocK>
  629 + </block>
  630 + <block wx:else>
  631 + <!-- 如果商品有设置等级价大于0的 -->
  632 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  633 + <view class="money flex" >
  634 + <!-- 办卡价 -->
  635 + <view class="flex xc-wc">
  636 + <view class="fs24">¥</view>
  637 + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
  638 + </view>
  639 + <!-- 原价 -->
  640 + <view class="price flex xc-ash line_th">
  641 + <view class="fs22">¥</view>
  642 + <view class="fs22">{{item.market_price}}</view>
  643 + </view>
  644 +
  645 + </view>
  646 + <view class="flex" style="line-height: 28rpx;" >
  647 + <!-- 等级价 -->
  648 + <view class="price flex ai_and">
  649 + <view class="fs22">¥</view>
  650 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  651 + <view class="card_bg">
  652 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view>
  653 + </view>
  654 + </view>
  655 + </block>
  656 + <block wx:else>
  657 + <view class="money flex" >
  658 + <!-- 办卡价 -->
  659 + <view class="flex xc-wc">
  660 + <view class="fs24 wz_red">¥</view>
  661 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  662 + </view>
  663 + </view>
  664 + <view class="flex" style="line-height: 28rpx;" >
  665 + <!-- 原价 -->
  666 + <view class="price flex xc-ash line_th">
  667 + <view class="fs22">¥</view>
  668 + <view class="fs22">{{item.market_price}}</view>
  669 + </view>
  670 + </view>
  671 + </block>
  672 + </block>
  673 + </block>
  674 +
  675 + <block wx:else>
  676 + <view class='wz_red'>¥{{item.shop_price}}</view>
  677 + <view class='del'>¥{{item.market_price}}</view>
  678 + </block>
  679 +
659 </block> 680 </block>
660 -  
661 - </block>  
662 - </view>  
663 - <view class='zs_wz5_x c-5' wx:if="{{object.goodsnum}}" style="font-size: 26rpx;">销量:{{item.sales_sum}}件</view>  
664 - </view>  
665 -  
666 - </view>  
667 - </navigator>  
668 - </block>  
669 - <view class="clear"></view> 681 + </view>
  682 + <view class='zs_wz5_x c-5' wx:if="{{object.goodsnum}}" style="font-size: 26rpx;">销量:{{item.sales_sum}}件</view>
  683 + </view>
  684 +
  685 + </view>
  686 + </navigator>
  687 + </block>
  688 + <view class="clear"></view>
  689 + </view>
  690 +
  691 +
  692 + <!-- 商品的显示不是左右 -->
  693 + <block wx:if="{{object.column!=5}}">
  694 + <block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}">
  695 + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" class="c-5">
  696 + {{loadText}}
  697 + </button>
  698 + </view></block>
  699 + <block wx:if="{{classstyle_id!='1' }}">
  700 + <view class="button-wrapper pd20" wx:if="{{object.goodscount * page <total }}">
  701 + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);color: #555;">{{loadText}}</button>
  702 + </view>
  703 + <view class="fs22" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">—— 宝贝已经全部加载 —— </view>
  704 +
  705 + </block>
  706 + </block>
  707 +
  708 +
  709 + <!--商品展示-->
  710 + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">
  711 + <view class="sp">
  712 + <swiper-item class="s_it" wx:for="{{goods_array}}">
  713 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  714 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >
  715 + <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}">
  716 + <view class='sp_top'>
  717 + <view class='s_img' style="position: relative; width: 100%">
  718 +
  719 + <block wx:if="{{object.big_order_type==3}}">
  720 + <view style="position: relative; width: 100%; height: 100%">
  721 + <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  722 + binderror="bind_bnerr3"></image>
  723 +
  724 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  725 + </view>
  726 + </block>
  727 +
  728 + <block wx:else>
  729 + <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"
  730 + binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>
  731 + </block>
  732 +
  733 +
  734 + <block wx:if="{{object.goodicon==3}}">
  735 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  736 + src='{{object.customicon}}'></image>
  737 + </block>
  738 + <block wx:if="{{object.goodicon==1}}">
  739 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  740 + </block>
  741 + <block wx:if="{{object.goodicon==2}}">
  742 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  743 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  744 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  745 + src='{{imghost}}/miniapp/images/hot.png'></image>
  746 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  747 + src='{{imghost}}/miniapp/images/new.png'></image>
  748 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  749 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  750 + </block>
  751 +
  752 + </view>
  753 + <view class='clear'></view>
  754 + </view>
  755 +
  756 + <view class='pd10'>
  757 + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view>
  758 + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
  759 + <block wx:if="{{aitem.prom_price || aitem.prom_integral }}">
  760 + <view class='wz_red'>
  761 + <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text>
  762 + <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>
  763 + <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>
  764 + </view>
  765 + <view class='del'>¥{{aitem.market_price}}</view>
  766 + </block>
  767 + <block wx:else>
  768 + <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}" >
  769 + <!-- 当会员是等级卡的时候 -->
  770 + <block wx:if="{{card_field}}">
  771 + <!-- 等级价>0 -->
  772 + <block wx:if="{{aitem[card_field]>0}}">
  773 + <view class="money flex" >
  774 + <!-- 办卡价 -->
  775 + <view class="flex xc-wc ai_and">
  776 + <view class="fs24 wz_red">¥</view>
  777 + <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view>
  778 + <view class="card_bg ellipsis-1">
  779 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  780 + <text class="card_name">{{card_name}}</text>
  781 + </view>
  782 + </view>
  783 + </view>
  784 + <view class="flex" style="line-height: 28rpx;" >
  785 + <!-- 原价 -->
  786 + <view class="price flex xc-ash line_th">
  787 + <view class="fs22">¥</view>
  788 + <view class="fs22">{{aitem.market_price}}</view>
  789 + </view>
  790 + </view>
  791 + </block>
  792 + <blocK wx:else>
  793 + <view class="money flex" >
  794 + <!-- 办卡价 -->
  795 + <view class="flex xc-wc">
  796 + <view class="fs24 wz_red">¥</view>
  797 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  798 + </view>
  799 + </view>
  800 + <view class="flex" style="line-height: 28rpx;" >
  801 + <!-- 原价 -->
  802 + <view class="price flex xc-ash line_th">
  803 + <view class="fs22">¥</view>
  804 + <view class="fs22">{{aitem.market_price}}</view>
  805 + </view>
  806 + </view>
  807 + </blocK>
  808 + </block>
  809 + <block wx:else>
  810 + <!-- 如果商品有设置等级价大于0的 -->
  811 + <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}">
  812 + <view class="money flex" >
  813 + <!-- 办卡价 -->
  814 + <view class="flex xc-wc">
  815 + <view class="fs24 wz_red">¥</view>
  816 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  817 + </view>
  818 + <!-- 原价 -->
  819 + <view class="price flex xc-ash line_th">
  820 + <view class="fs22">¥</view>
  821 + <view class="fs22">{{aitem.market_price}}</view>
  822 + </view>
  823 +
  824 + </view>
  825 + <view class="flex" style="line-height: 28rpx;" >
  826 + <!-- 等级价 -->
  827 + <view class="price flex ai_and">
  828 + <view class="fs22">¥</view>
  829 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view>
  830 + <view class="card_bg ellipsis-1">
  831 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  832 + <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text>
  833 + </view>
  834 + </view>
  835 + </view>
  836 + </block>
  837 + <block wx:else>
  838 + <view class="money flex" >
  839 + <!-- 办卡价 -->
  840 + <view class="flex xc-wc">
  841 + <view class="fs24 wz_red">¥</view>
  842 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  843 + </view>
  844 + </view>
  845 + <view class="flex" style="line-height: 28rpx;" >
  846 + <!-- 原价 -->
  847 + <view class="price flex xc-ash line_th">
  848 + <view class="fs22">¥</view>
  849 + <view class="fs22">{{aitem.market_price}}</view>
  850 + </view>
  851 + </view>
  852 + </block>
  853 + </block>
  854 + </block>
  855 + <block wx:else>
  856 + <view class='wz_red'>¥{{aitem.shop_price}}</view>
  857 + <view class='del'>¥{{aitem.market_price}}</view>
  858 + </block>
  859 + </block>
  860 + </view>
  861 + <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view>
  862 + <!-- <view style="height: 10rpx;"></view> -->
  863 + </view>
  864 +
  865 + </view>
  866 + </navigator>
  867 + </block>
  868 + </swiper-item>
  869 + </view>
  870 + </swiper>
  871 +
670 </view> 872 </view>
671 -  
672 -  
673 -<!-- 商品的显示不是左右 -->  
674 -<block wx:if="{{object.column!=5}}">  
675 -<block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}">  
676 - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" class="c-5">  
677 - {{loadText}}  
678 - </button>  
679 -</view></block>  
680 -<block wx:if="{{classstyle_id!='1' }}">  
681 - <view class="button-wrapper pd20" wx:if="{{object.goodscount * page <total }}">  
682 - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);color: #555;">{{loadText}}</button>  
683 - </view>  
684 - <view class="fs22" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">—— 宝贝已经全部加载 —— </view>  
685 -  
686 -</block>  
687 -</block>  
688 -  
689 -  
690 -<!--商品展示-->  
691 -<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">  
692 - <view class="sp">  
693 - <swiper-item class="s_it" wx:for="{{goods_array}}">  
694 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">  
695 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >  
696 - <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}">  
697 - <view class='sp_top'>  
698 - <view class='s_img' style="position: relative; width: 100%">  
699 -  
700 - <block wx:if="{{object.big_order_type==3}}">  
701 - <view style="position: relative; width: 100%; height: 100%">  
702 - <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
703 - binderror="bind_bnerr3"></image>  
704 -  
705 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>  
706 - </view>  
707 - </block>  
708 -  
709 - <block wx:else>  
710 - <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"  
711 - binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>  
712 - </block>  
713 -  
714 -  
715 - <block wx:if="{{object.goodicon==3}}">  
716 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
717 - src='{{object.customicon}}'></image>  
718 - </block>  
719 - <block wx:if="{{object.goodicon==1}}">  
720 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
721 - </block>  
722 - <block wx:if="{{object.goodicon==2}}">  
723 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
724 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
725 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
726 - src='{{imghost}}/miniapp/images/hot.png'></image>  
727 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
728 - src='{{imghost}}/miniapp/images/new.png'></image>  
729 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
730 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
731 - </block>  
732 -  
733 - </view>  
734 - <view class='clear'></view>  
735 - </view>  
736 -  
737 - <view class='pd10'>  
738 - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view>  
739 - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">  
740 - <block wx:if="{{aitem.prom_price || aitem.prom_integral }}">  
741 - <view class='wz_red'>  
742 - <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text>  
743 - <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>  
744 - <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>  
745 - </view>  
746 - <view class='del'>¥{{aitem.market_price}}</view>  
747 - </block>  
748 - <block wx:else>  
749 - <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}" >  
750 - <!-- 当会员是等级卡的时候 -->  
751 - <block wx:if="{{card_field}}">  
752 - <!-- 等级价>0 -->  
753 - <block wx:if="{{aitem[card_field]>0}}">  
754 - <view class="money flex" >  
755 - <!-- 办卡价 -->  
756 - <view class="flex xc-wc ai_and">  
757 - <view class="fs24 wz_red">¥</view>  
758 - <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view>  
759 - <view class="card_bg ellipsis-1">  
760 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
761 - <text class="card_name">{{card_name}}</text>  
762 - </view>  
763 - </view>  
764 - </view>  
765 - <view class="flex" style="line-height: 28rpx;" >  
766 - <!-- 原价 -->  
767 - <view class="price flex xc-ash line_th">  
768 - <view class="fs22">¥</view>  
769 - <view class="fs22">{{aitem.market_price}}</view>  
770 - </view>  
771 - </view>  
772 - </block>  
773 - <blocK wx:else>  
774 - <view class="money flex" >  
775 - <!-- 办卡价 -->  
776 - <view class="flex xc-wc">  
777 - <view class="fs24 wz_red">¥</view>  
778 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
779 - </view>  
780 - </view>  
781 - <view class="flex" style="line-height: 28rpx;" >  
782 - <!-- 原价 -->  
783 - <view class="price flex xc-ash line_th">  
784 - <view class="fs22">¥</view>  
785 - <view class="fs22">{{aitem.market_price}}</view>  
786 - </view>  
787 - </view>  
788 - </blocK>  
789 - </block>  
790 - <block wx:else>  
791 - <!-- 如果商品有设置等级价大于0的 -->  
792 - <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}">  
793 - <view class="money flex" >  
794 - <!-- 办卡价 -->  
795 - <view class="flex xc-wc">  
796 - <view class="fs24 wz_red">¥</view>  
797 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
798 - </view>  
799 - <!-- 原价 -->  
800 - <view class="price flex xc-ash line_th">  
801 - <view class="fs22">¥</view>  
802 - <view class="fs22">{{aitem.market_price}}</view>  
803 - </view>  
804 -  
805 - </view>  
806 - <view class="flex" style="line-height: 28rpx;" >  
807 - <!-- 等级价 -->  
808 - <view class="price flex ai_and">  
809 - <view class="fs22">¥</view>  
810 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view>  
811 - <view class="card_bg ellipsis-1">  
812 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
813 - <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text>  
814 - </view>  
815 - </view>  
816 - </view>  
817 - </block>  
818 - <block wx:else>  
819 - <view class="money flex" >  
820 - <!-- 办卡价 -->  
821 - <view class="flex xc-wc">  
822 - <view class="fs24 wz_red">¥</view>  
823 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
824 - </view>  
825 - </view>  
826 - <view class="flex" style="line-height: 28rpx;" >  
827 - <!-- 原价 -->  
828 - <view class="price flex xc-ash line_th">  
829 - <view class="fs22">¥</view>  
830 - <view class="fs22">{{aitem.market_price}}</view>  
831 - </view>  
832 - </view>  
833 - </block>  
834 - </block>  
835 - </block>  
836 - <block wx:else>  
837 - <view class='wz_red'>¥{{aitem.shop_price}}</view>  
838 - <view class='del'>¥{{aitem.market_price}}</view>  
839 - </block>  
840 - </block>  
841 - </view>  
842 - <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view>  
843 - <!-- <view style="height: 10rpx;"></view> -->  
844 - </view>  
845 -  
846 - </view>  
847 - </navigator>  
848 - </block>  
849 - </swiper-item>  
850 - </view>  
851 - </swiper>  
852 \ No newline at end of file 873 \ No newline at end of file
  874 +<!-- 服务卡项顶部标题 -->
  875 +<!-- class="scroll-view-item {{index == title_index ? 'active':''}}" -->
components/mp-sticky/mp-sticky.js 0 → 100644
  1 +const selectQuery = require('./selectQuery')
  2 +const target = '.weui-sticky'
  3 +
  4 +Component({
  5 + options: {
  6 + addGlobalClass: true,
  7 + // 指定所有 _ 开头的数据字段为纯数据字段
  8 + pureDataPattern: /^_/,
  9 + multipleSlots: true // 在组件定义时的选项中启用多slot支持
  10 + },
  11 + behaviors: [selectQuery],
  12 + properties: {
  13 + offsetTop: {
  14 + type: Number,
  15 + value: 0
  16 + },
  17 + zIndex: {
  18 + type: Number,
  19 + value: 99
  20 + },
  21 + disabled: {
  22 + type: Boolean,
  23 + value: false,
  24 + },
  25 + container: {
  26 + type: null
  27 + }
  28 + },
  29 + data: {
  30 + fixed: false,
  31 + height: 0,
  32 + _attached: false,
  33 + _containerHeight: 0,
  34 + },
  35 +
  36 + observers: {
  37 + disabled: function(newVal) {
  38 + if (!this.data._attached) return
  39 + newVal ? this.disconnectObserver() : this.initObserver()
  40 + },
  41 +
  42 + container: function(newVal) {
  43 + if (typeof newVal !== 'function' || !this.data.height) return
  44 + this.observerContainer()
  45 + },
  46 +
  47 + offsetTop: function(newVal){
  48 + if(typeof newVal !== 'number' || !this.data._attached) return
  49 + this.initObserver()
  50 + }
  51 +
  52 + },
  53 +
  54 + lifetimes: {
  55 + attached() {
  56 + this.data._attached = true
  57 + if (!this.data.disabled) this.initObserver()
  58 + },
  59 +
  60 + detached() {
  61 + this.data._attached = false
  62 + this.disconnectObserver()
  63 + }
  64 +
  65 + },
  66 +
  67 + methods: {
  68 + getContainerRect () {
  69 + const nodesRef = this.data.container()
  70 + return new Promise(resolve => nodesRef.boundingClientRect(resolve).exec())
  71 + },
  72 +
  73 + initObserver() {
  74 + this.disconnectObserver()
  75 + this.getRect(target).then(rect => {
  76 + this.setData({
  77 + height: rect.height
  78 + })
  79 + this.observerContent()
  80 + this.observerContainer()
  81 + })
  82 + },
  83 +
  84 + disconnectObserver(observerName) {
  85 + if (observerName) {
  86 + const observer = this[observerName]
  87 + observer && observer.disconnect()
  88 + } else {
  89 + this.contentObserver && this.contentObserver.disconnect()
  90 + this.containerObserver && this.containerObserver.disconnect()
  91 + }
  92 + },
  93 +
  94 + observerContent() {
  95 + const {offsetTop} = this.data
  96 + this.disconnectObserver('contentObserver')
  97 +
  98 + const contentObserver = this.createIntersectionObserver({
  99 + thresholds: [1],
  100 + initialRatio: 1
  101 + })
  102 + contentObserver.relativeToViewport({
  103 + top: -offsetTop
  104 + })
  105 + contentObserver.observe(target, res => {
  106 + if (this.data.disabled) return
  107 + this.setFixed(res.boundingClientRect.top)
  108 + })
  109 + this.contentObserver = contentObserver
  110 + },
  111 +
  112 + observerContainer() {
  113 + const {container, height, offsetTop} = this.data
  114 + if (typeof container !== 'function') return
  115 +
  116 + this.disconnectObserver('containerObserver')
  117 + this.getContainerRect().then(rect => {
  118 + this.getRect(target).then(contentRect => {
  119 + const _contentTop = contentRect.top
  120 + const _containerTop = rect.top
  121 + const _containerHeight = rect.height
  122 + const _relativeTop = _contentTop - _containerTop
  123 + const containerObserver = this.createIntersectionObserver({
  124 + thresholds: [1],
  125 + initialRatio: 1
  126 + })
  127 + containerObserver.relativeToViewport({
  128 + top: _containerHeight - height - offsetTop - _relativeTop
  129 + })
  130 + containerObserver.observe(target, (res) => {
  131 + if (this.data.disabled) return
  132 + this.setFixed(res.boundingClientRect.top);
  133 + })
  134 + this.data._relativeTop = _relativeTop
  135 + this.data._containerHeight = _containerHeight
  136 + this.containerObserver = containerObserver
  137 + })
  138 + })
  139 + },
  140 +
  141 + setFixed(top) {
  142 + const {height, _containerHeight, _relativeTop, offsetTop} = this.data
  143 + const fixed = _containerHeight && height
  144 + ? (top >= height + offsetTop + _relativeTop - _containerHeight) && (top < offsetTop)
  145 + : top < offsetTop
  146 + this.triggerEvent('scroll', {
  147 + scrollTop: top,
  148 + isFixed: fixed
  149 + })
  150 +
  151 + this.setData({fixed})
  152 + }
  153 + }
  154 +})
  155 +
components/mp-sticky/mp-sticky.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/mp-sticky/mp-sticky.wxml 0 → 100644
  1 +<wxs src="./mp-sticky.wxs" module="computed" />
  2 +
  3 +<view class="weui-sticky" style="{{computed.containerStyle({fixed, height, zIndex})}}">
  4 + <view class="{{fixed ? 'weui-sticky__fixed' : ''}}" style="{{computed.wrapStyle({fixed, offsetTop})}}">
  5 + <slot ></slot>
  6 + </view>
  7 +</view>
components/mp-sticky/mp-sticky.wxs 0 → 100644
  1 +
  2 +/* eslint-disable */
  3 +function wrapStyle(data) {
  4 + if (data.fixed) {
  5 + return 'top: ' + data.offsetTop + 'px;'
  6 + }
  7 + return ''
  8 +}
  9 +
  10 +function containerStyle(data) {
  11 + if (data.fixed) {
  12 + return 'height: ' + data.height + 'px; z-index: ' + data.zIndex + ';'
  13 + }
  14 + return ''
  15 +}
  16 +
  17 +module.exports = {
  18 + wrapStyle: wrapStyle,
  19 + containerStyle: containerStyle
  20 +}
components/mp-sticky/mp-sticky.wxss 0 → 100644
  1 +.weui-sticky {
  2 + position: relative;
  3 +}
  4 +
  5 +.weui-sticky__fixed {
  6 + position: fixed;
  7 + left: 0;
  8 + top: 0;
  9 + width: 100%;
  10 + background-color: white;
  11 +}
0 \ No newline at end of file 12 \ No newline at end of file
components/mp-sticky/selectQuery.js 0 → 100644
  1 +module.exports = Behavior({
  2 + methods: {
  3 + getRect(selector) {
  4 + return new Promise((resolve, reject) => {
  5 + this.createSelectorQuery()
  6 + .select(selector)
  7 + .boundingClientRect(rect => {
  8 + if (rect) {
  9 + resolve(rect)
  10 + } else {
  11 + reject(new Error(`can not find selector: ${selector}`))
  12 + }
  13 + }).exec()
  14 + })
  15 + },
  16 +
  17 + getAllRects(selector) {
  18 + return new Promise((resolve, reject) => {
  19 + this.createSelectorQuery()
  20 + .selectAll(selector)
  21 + .boundingClientRect(rects => {
  22 + if (rects && rects.lenght > 0) {
  23 + resolve(rects)
  24 + } else {
  25 + reject(new Error(`can not find selector: ${selector}`))
  26 + }
  27 + }).exec()
  28 + })
  29 + }
  30 + }
  31 +})
packageA/pages/myGift/myGift.js
@@ -61,7 +61,8 @@ Page({ @@ -61,7 +61,8 @@ Page({
61 /** 61 /**
62 * 生命周期函数--监听页面初次渲染完成 62 * 生命周期函数--监听页面初次渲染完成
63 */ 63 */
64 - onReady: function () {}, 64 + onReady: function () {
  65 + },
65 66
66 /** 67 /**
67 * 生命周期函数--监听页面显示 68 * 生命周期函数--监听页面显示
@@ -75,6 +76,7 @@ Page({ @@ -75,6 +76,7 @@ Page({
75 userInfo: app.globalData.userInfo, 76 userInfo: app.globalData.userInfo,
76 imghost: app.globalData.setting.imghost, 77 imghost: app.globalData.setting.imghost,
77 isLogin: true, 78 isLogin: true,
  79 + now:Date.parse(new Date()) / 1000,
78 }); 80 });
79 81
80 var index=this.data.currentIndex; 82 var index=this.data.currentIndex;
@@ -91,7 +93,7 @@ Page({ @@ -91,7 +93,7 @@ Page({
91 93
92 if(index == 0) { 94 if(index == 0) {
93 url = '/api/weshop/libao/libaoForm/page'; 95 url = '/api/weshop/libao/libaoForm/page';
94 - data.timetype=1; 96 + data.timetype=2;
95 } else if(index == 1) { 97 } else if(index == 1) {
96 url = '/api/weshop/libao/libaoFormvip/page'; 98 url = '/api/weshop/libao/libaoFormvip/page';
97 }; 99 };
packageA/pages/myGift/myGift.wxml
@@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
5 </view> 5 </view>
6 <view class="tab-content"> 6 <view class="tab-content">
7 <block wx:if="{{currentIndex == 0}}"> 7 <block wx:if="{{currentIndex == 0}}">
8 - <view class="tab-item" wx:for="{{list.pageData}}"> 8 + <view class="tab-item" wx:for="{{list.pageData}}" wx:if="{{now > item.startime || (item.is_show && now > item.show_time)}}">
9 <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=0&id=' + item.id}}"> 9 <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=0&id=' + item.id}}">
10 <!-- 图片 --> 10 <!-- 图片 -->
11 <view class="img-container rel"> 11 <view class="img-container rel">
12 - <image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/> 12 + <image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix" />
13 <view catchtap="show_remark" data-index="{{index}}" class="lb_remark ellipsis-1" wx:if="{{item.lbintro}}">活动说明:{{item.lbintro}}</view> 13 <view catchtap="show_remark" data-index="{{index}}" class="lb_remark ellipsis-1" wx:if="{{item.lbintro}}">活动说明:{{item.lbintro}}</view>
14 </view> 14 </view>
15 <view class="desc-container"> 15 <view class="desc-container">
@@ -23,11 +23,11 @@ @@ -23,11 +23,11 @@
23 <text class="rmb">{{filter.toFix(item.lbprice,2)}}</text>/{{item.lbintegral}}积分 23 <text class="rmb">{{filter.toFix(item.lbprice,2)}}</text>/{{item.lbintegral}}积分
24 </block> 24 </block>
25 <block wx:elif="{{item.lbprice>0 || item.lbintegral}}"> 25 <block wx:elif="{{item.lbprice>0 || item.lbintegral}}">
26 - <block wx:if="{{item.lbprice>0}}" >  
27 - <text class="rmb">{{filter.toFix(item.lbprice,2) }}</text> 26 + <block wx:if="{{item.lbprice>0}}">
  27 + <text class="rmb">{{filter.toFix(item.lbprice,2) }}</text>
28 </block> 28 </block>
29 <block wx:if="{{item.lbintegral>0}}"> 29 <block wx:if="{{item.lbintegral>0}}">
30 - {{item.lbintegral}}积分 30 + {{item.lbintegral}}积分
31 </block> 31 </block>
32 </block> 32 </block>
33 </view> 33 </view>
@@ -36,20 +36,28 @@ @@ -36,20 +36,28 @@
36 <view class="fs24 c-a4">已售{{item.salenum+item.virtualsales}}件</view> 36 <view class="fs24 c-a4">已售{{item.salenum+item.virtualsales}}件</view>
37 </view> 37 </view>
38 <!-- 时间 --> 38 <!-- 时间 -->
39 - <view class="date">活动结束日期 {{filter.format_time(item.endtime)}}</view> 39 + <view class="date" wx:if="{{item.is_show && now < item.startime}}">活动开始日期 {{filter.format_time(item.startime)}}</view>
  40 + <view class="date" wx:else>活动结束日期 {{filter.format_time(item.endtime)}}</view>
40 <!-- 按钮 --> 41 <!-- 按钮 -->
41 </view> 42 </view>
42 </view> 43 </view>
43 - <view class="btn-container pd20">  
44 - <view wx:if="{{item.lbintegral>0}}" bindtap="GetBuyIntegral" data-index="{{index}}" class="btn red">立即兑换</view>  
45 - <view wx:if="{{item.lbprice>0}}" bindtap="GetBuyPrice" data-index="{{index}}" class="btn pink">立即购买</view>  
46 - </view> 44 + <block wx:if="{{now < item.startime}}">
  45 + <view class="btn1 gray">活动还未开始</view>
  46 + </block>
  47 + <block wx:else>
  48 + <view class="btn-container pd20">
  49 + <view wx:if="{{item.lbintegral>0}}" bindtap="GetBuyIntegral" data-index="{{index}}" class="btn red">立即兑换</view>
  50 + <view wx:if="{{item.lbprice>0}}" bindtap="GetBuyPrice" data-index="{{index}}" class="btn pink">立即购买</view>
  51 + </view>
  52 + </block>
47 </view> 53 </view>
48 </block> 54 </block>
49 - 55 +
50 <block wx:else> 56 <block wx:else>
51 <view class="tab-item flex pd20" wx:for="{{list.pageData}}" bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=1&id=' + item.lbvipid}}"> 57 <view class="tab-item flex pd20" wx:for="{{list.pageData}}" bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=1&id=' + item.lbvipid}}">
52 - <view class="img-container2"><image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix" data-index="{{index}}"/></view> 58 + <view class="img-container2">
  59 + <image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix" data-index="{{index}}" />
  60 + </view>
53 <view class="flex fdc jc_sb"> 61 <view class="flex fdc jc_sb">
54 <view> 62 <view>
55 <!-- 标题 --> 63 <!-- 标题 -->
@@ -63,7 +71,7 @@ @@ -63,7 +71,7 @@
63 </view> 71 </view>
64 </view> 72 </view>
65 </block> 73 </block>
66 - 74 +
67 <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata> 75 <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
68 <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view> 76 <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view>
69 </view> 77 </view>
@@ -75,7 +83,7 @@ @@ -75,7 +83,7 @@
75 <view wx:if="{{show_rem_pop}}"> 83 <view wx:if="{{show_rem_pop}}">
76 <view class="cover-layer" bindtap="close_remark"></view> 84 <view class="cover-layer" bindtap="close_remark"></view>
77 <view class="rem_pop;"> 85 <view class="rem_pop;">
78 - <view style="text-align: right;"bindtap="close_remark"><text class="iconfont icon-close" style="font-size: 40rpx;"></text></view> 86 + <view style="text-align: right;" bindtap="close_remark"><text class="iconfont icon-close" style="font-size: 40rpx;"></text></view>
79 <view style="padding: 0 16rpx;"> 87 <view style="padding: 0 16rpx;">
80 <view class="fs32">活动说明:</view> 88 <view class="fs32">活动说明:</view>
81 <view class="fs30">{{pop_remark_text}}</view> 89 <view class="fs30">{{pop_remark_text}}</view>
packageA/pages/myGift/myGift.wxss
@@ -52,6 +52,16 @@ page { @@ -52,6 +52,16 @@ page {
52 font-weight: bold; 52 font-weight: bold;
53 53
54 } 54 }
  55 +.btn1 {
  56 + padding: 20rpx;
  57 + flex: 1;
  58 + text-align: center;
  59 +}
  60 +
  61 +.btn1.gray{
  62 + background-color: #cccccc;
  63 + color:#fff
  64 +}
55 65
56 .tab-title-item::after { 66 .tab-title-item::after {
57 position: absolute; 67 position: absolute;
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -1555,10 +1555,8 @@ Page({ @@ -1555,10 +1555,8 @@ Page({
1555 if (!title) title = th.data.prom_act.title; 1555 if (!title) title = th.data.prom_act.title;
1556 if (th.data.prom_type == 4) title = th.data.prom_act.name; 1556 if (th.data.prom_type == 4) title = th.data.prom_act.name;
1557 1557
1558 - if (th.data.presellForm.share_img)  
1559 - img = th.data.iurl + th.data.presellForm.share_img;  
1560 -  
1561 - 1558 + //if (th.data.presellForm.share_img)
  1559 + // img = th.data.iurl + th.data.presellForm.share_img;
1562 1560
1563 var url = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + th.data.gid+"&pre_id="+th.data.pre_arr.id; 1561 var url = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + th.data.gid+"&pre_id="+th.data.pre_arr.id;
1564 if (getApp().globalData.user_id) { 1562 if (getApp().globalData.user_id) {
@@ -3133,13 +3131,9 @@ Page({ @@ -3133,13 +3131,9 @@ Page({
3133 tt(); 3131 tt();
3134 return false; 3132 return false;
3135 } 3133 }
3136 - // var img_url = ee.data.data.original_img;  
3137 - var img_url = ee.data.presellForm.share_img;  
3138 - img_url?img_url:ee.data.data.original_img;  
3139 -  
3140 - if (img_url) {  
3141 - img_url = this.data.iurl + img_url;  
3142 - } 3134 + var img_url = ee.data.data.original_img;
  3135 + //var img_url = ee.data.presellForm.share_img;
  3136 + //img_url?img_url:ee.data.data.original_img;
3143 3137
3144 //获取商品是分享图信息 3138 //获取商品是分享图信息
3145 wx.getImageInfo({ 3139 wx.getImageInfo({
packageC/pages/presell/list/list.js
@@ -58,6 +58,24 @@ Page({ @@ -58,6 +58,24 @@ Page({
58 }else{ 58 }else{
59 getApp().goto("/pages/togoin/togoin"); 59 getApp().goto("/pages/togoin/togoin");
60 } 60 }
  61 +
  62 + var room_id = t.room_id;
  63 + var room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
  64 + //-- 如果有房间号 --
  65 + if (room_id) {
  66 + getApp().globalData.room_id = room_id;
  67 + //如果是会员分享过来的要记录
  68 + if (room_user_share) getApp().globalData.room_user_share = room_user_share;
  69 + }
  70 +
  71 +
  72 + if(this.data.act_id){
  73 + getApp().promiseGet("/api/weshop/marketing/marketingPresellForm/get/"+os.stoid+"/"+this.data.act_id,{}).then(res=>{
  74 + if(res.data.code==0)
  75 + th.data.pre_act=res.data.data
  76 + })
  77 + }
  78 +
61 }, 79 },
62 onShow: function (t) { 80 onShow: function (t) {
63 var userInfo=getApp().globalData.userInfo; 81 var userInfo=getApp().globalData.userInfo;
@@ -235,4 +253,54 @@ Page({ @@ -235,4 +253,54 @@ Page({
235 } 253 }
236 }, 254 },
237 255
238 -}); 256 + onShareAppMessage: async function (t) {
  257 + getApp().globalData.no_clear=1;
  258 + var img="";
  259 + if(this.data.ad_data && this.data.ad_data.length ){
  260 + img= this.data.ad_data[0];
  261 + }else{
  262 + var url="/api/weshop/store/get/"+os.stoid;
  263 + await getApp().promiseGet(url,{}).then(res=>{
  264 + if(res.data.code==0){
  265 + img= os.imghost+res.data.data.store_logo
  266 + }
  267 + })
  268 + }
  269 +
  270 + var url = "/packageC/pages/presell/list/list";
  271 +
  272 + if(this.data.act_id){
  273 + url += "?act_id=" + this.data.act_id;
  274 + }
  275 + if (getApp().globalData.user_id) {
  276 +
  277 + if(url.indexOf("?")==-1)
  278 + url += "?first_leader=" + getApp().globalData.user_id;
  279 + else
  280 + url += "&first_leader=" + getApp().globalData.user_id;
  281 + }
  282 + //-- 如果房间分享,且不是会员分享的 --
  283 + if (getApp().globalData.room_id &&
  284 + this.data.data.goods_id == getApp().globalData.room_goods_id &&
  285 + !getApp().globalData.room_user_share
  286 + ) {
  287 + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";
  288 + }
  289 +
  290 + var ob={};
  291 + if(this.data.pre_act){
  292 + ob = { title: this.data.pre_act.share_title, path: url,imageUrl:os.imghost+this.data.pre_act.share_img };
  293 + }else{
  294 +
  295 + ob = { title: "预售列表", path: url, };
  296 + if(img){
  297 + ob.imageUrl=img;
  298 + }
  299 + }
  300 +
  301 +
  302 + return ob;
  303 + }
  304 +
  305 +
  306 + });
packageD/pages/user/coupons/filter.wxs
@@ -39,11 +39,11 @@ var numFr = { @@ -39,11 +39,11 @@ var numFr = {
39 break; 39 break;
40 }; 40 };
41 case 1: { 41 case 1: {
42 - return '已过从我的专享礼包,期'; 42 + return '从我的专享礼包获取';
43 break; 43 break;
44 }; 44 };
45 case 2: { 45 case 2: {
46 - return '从我的幸运大转盘,'; 46 + return '从我的幸运大转盘获取,';
47 break; 47 break;
48 }; 48 };
49 default: { 49 default: {
packageD/pages/user/deposit/deposit.js
  1 +/*
  2 + * @Author: your name
  3 + * @Date: 2022-03-26 11:41:08
  4 + * @LastEditTime: 2022-04-13 14:28:30
  5 + * @LastEditors: your name
  6 + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7 + * @FilePath: \MShopWeApp\packageD\pages\user\deposit\deposit.js
  8 + */
1 var t = getApp(), 9 var t = getApp(),
2 a = t.request, 10 a = t.request,
3 o = t.globalData.setting, 11 o = t.globalData.setting,
@@ -24,7 +32,7 @@ Page({ @@ -24,7 +32,7 @@ Page({
24 return false; 32 return false;
25 } 33 }
26 wx.setNavigationBarTitle({ 34 wx.setNavigationBarTitle({
27 - title: "预存款", 35 + title: "储值款",
28 }) 36 })
29 37
30 var th = this; 38 var th = this;
packageD/pages/user/deposit/deposit.wxml
1 <image class="pictuer" src='{{iurl}}/miniapp/images/usermoney/100.jpg'> 1 <image class="pictuer" src='{{iurl}}/miniapp/images/usermoney/100.jpg'>
2 <view class="big"> 2 <view class="big">
3 - <view class="font-one">预存款</view> 3 + <view class="font-one">储值款</view>
4 <view class="deposit"> 4 <view class="deposit">
5 <view class="rmb" >¥</view><view class="font-two">{{yucun_money}}</view> 5 <view class="rmb" >¥</view><view class="font-two">{{yucun_money}}</view>
6 </view> 6 </view>
@@ -9,20 +9,20 @@ @@ -9,20 +9,20 @@
9 <view class="big-rim"> 9 <view class="big-rim">
10 <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'> 10 <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'>
11 <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/recharge.png"></image> 11 <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/recharge.png"></image>
12 - <view class="ldzj-font">预存款充值</view> 12 + <view class="ldzj-font">储值款充值</view>
13 <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image> 13 <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image>
14 </view> 14 </view>
15 </view> 15 </view>
16 16
17 <view class="min-rim-one" type='primary'> 17 <view class="min-rim-one" type='primary'>
18 <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/deposit.png"></image> 18 <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/deposit.png"></image>
19 - <view class="ldzj-font">预存款余额</view> 19 + <view class="ldzj-font">储值款余额</view>
20 </view> 20 </view>
21 21
22 22
23 <view wx:if="{{parameter}}"> 23 <view wx:if="{{parameter}}">
24 24
25 - <view class="mysj">暂无任何预存款</view> 25 + <view class="mysj">暂无任何储值款</view>
26 </view> 26 </view>
27 <view wx:else> 27 <view wx:else>
28 <block wx:for="{{list}}" wx:for-index="idx" wx:for-item="list"> 28 <block wx:for="{{list}}" wx:for-index="idx" wx:for-item="list">
pages/cart/cart2/cart2.js
@@ -130,8 +130,9 @@ Page({ @@ -130,8 +130,9 @@ Page({
130 ladder_map: {}, //阶梯促销的map表 130 ladder_map: {}, //阶梯促销的map表
131 is_no_past: 1, 131 is_no_past: 1,
132 state: 0, //阶梯促销的的立即购买也走购物车流程state=1 132 state: 0, //阶梯促销的的立即购买也走购物车流程state=1
133 - show_duo_gift:0,  
134 - send_gf:{}, //多赠品的计算 133 + show_duo_gift: 0,
  134 + send_gf: {}, //多赠品的计算
  135 + send_lb: {},
135 }, 136 },
136 onLoad: function (t) { 137 onLoad: function (t) {
137 wx.setNavigationBarTitle({ title: "填写订单", }) 138 wx.setNavigationBarTitle({ title: "填写订单", })
@@ -171,7 +172,8 @@ Page({ @@ -171,7 +172,8 @@ Page({
171 isget_by_quan: {}, 172 isget_by_quan: {},
172 is_no_by: {}, 173 is_no_by: {},
173 is_by: {}, 174 is_by: {},
174 - send_gf:{} 175 + send_gf: {},
  176 + send_lb: {},
175 }) 177 })
176 }, 178 },
177 179
@@ -188,7 +190,6 @@ Page({ @@ -188,7 +190,6 @@ Page({
188 190
189 } else { 191 } else {
190 this.getuser_addr(function (ie) { 192 this.getuser_addr(function (ie) {
191 -  
192 console.log("getuser_addr") 193 console.log("getuser_addr")
193 console.log(ie) 194 console.log(ie)
194 //地址切换要把包邮券清空 195 //地址切换要把包邮券清空
@@ -381,7 +382,7 @@ Page({ @@ -381,7 +382,7 @@ Page({
381 to.get_allsto(function (e) { 382 to.get_allsto(function (e) {
382 th.setData({ allsto: e }); 383 th.setData({ allsto: e });
383 //-------获取购物车已经选择的商品-------- 384 //-------获取购物车已经选择的商品--------
384 - console.log('购物车结算'); 385 + console.log('购物车结算');
385 386
386 th.get_cart(); 387 th.get_cart();
387 }) 388 })
@@ -408,7 +409,7 @@ Page({ @@ -408,7 +409,7 @@ Page({
408 409
409 //-----真的获取购物车,入口-------- 410 //-----真的获取购物车,入口--------
410 get_cart: function () { 411 get_cart: function () {
411 - var th = this, app = getApp(); 412 + var th = this, app = getApp();
412 var state = 0; 413 var state = 0;
413 if (th.data.state) state = 1; 414 if (th.data.state) state = 1;
414 a.get("/api/weshop/cart/list", { 415 a.get("/api/weshop/cart/list", {
@@ -452,6 +453,7 @@ Page({ @@ -452,6 +453,7 @@ Page({
452 453
453 //要把优惠活动加入,prom_goods_map中,赠品不要运算 454 //要把优惠活动加入,prom_goods_map中,赠品不要运算
454 if (item1.prom_type == 3 && item1.is_gift != 1) { 455 if (item1.prom_type == 3 && item1.is_gift != 1) {
  456 + // th.check_is_youhui(item1.goods_id, item1.pick_id);
455 await th.add_prom_goods_map(item1); 457 await th.add_prom_goods_map(item1);
456 } 458 }
457 459
@@ -719,7 +721,7 @@ Page({ @@ -719,7 +721,7 @@ Page({
719 ie.wind = parseInt(th.data.cartlist[kj].wind); 721 ie.wind = parseInt(th.data.cartlist[kj].wind);
720 722
721 //-- 是不是全部自提清空 -- 723 //-- 是不是全部自提清空 --
722 - if(ie.exp_type==0) th.setData({ is_all_zt: 0 }); 724 + if (ie.exp_type == 0) th.setData({ is_all_zt: 0 });
723 725
724 break; 726 break;
725 } 727 }
@@ -859,7 +861,6 @@ Page({ @@ -859,7 +861,6 @@ Page({
859 et = th.data.bn_exp_type; 861 et = th.data.bn_exp_type;
860 m_wind = th.data.index; 862 m_wind = th.data.index;
861 } 863 }
862 -  
863 //---是不是购买等级卡成功的返回---等级卡显示的判断--- 864 //---是不是购买等级卡成功的返回---等级卡显示的判断---
864 var is_card_back = getApp().globalData.is_card_back; 865 var is_card_back = getApp().globalData.is_card_back;
865 if (is_card_back) { 866 if (is_card_back) {
@@ -915,12 +916,13 @@ Page({ @@ -915,12 +916,13 @@ Page({
915 t.data.data.prom_id = gg.prom_id; 916 t.data.data.prom_id = gg.prom_id;
916 t.data.data.prom_type = 3; 917 t.data.data.prom_type = 3;
917 //如果是优惠活动,就要调用活动,计算价格 918 //如果是优惠活动,就要调用活动,计算价格
  919 + // th.check_is_youhui(gg.goods_id, gg.pick_id);
918 th.buy_now_prom_goods(gg.prom_id, t.data.data, function (data) { 920 th.buy_now_prom_goods(gg.prom_id, t.data.data, function (data) {
919 //判断一下购买商品的数量是不是超过 921 //判断一下购买商品的数量是不是超过
920 - if (data.gift_goods_id && (!data.zp_mode || parseInt(data.zp_mode)==0) ) {  
921 - var num =data.zp_num?data.zp_num:1; 922 + if (data.gift_goods_id && (!data.zp_mode || parseInt(data.zp_mode) == 0)) {
  923 + var num = data.zp_num ? data.zp_num : 1;
922 if (data.is_bz == 1) { 924 if (data.is_bz == 1) {
923 - num = num*data.bs; 925 + num = num * data.bs;
924 if (num > data.gift_limit_num) num = 0; 926 if (num > data.gift_limit_num) num = 0;
925 } 927 }
926 //如果赠品数量超出礼品库存,就取消 928 //如果赠品数量超出礼品库存,就取消
@@ -943,9 +945,9 @@ Page({ @@ -943,9 +945,9 @@ Page({
943 ob.exp_sum_type = data.gift_exp_sum_type; //商品的物流计算方式 945 ob.exp_sum_type = data.gift_exp_sum_type; //商品的物流计算方式
944 ob.uniform_exp_sum = data.gift_uniform_exp_sum //统一运费的金额 946 ob.uniform_exp_sum = data.gift_uniform_exp_sum //统一运费的金额
945 947
946 - var arr_gf=[]; 948 + var arr_gf = [];
947 arr_gf.push(ob); 949 arr_gf.push(ob);
948 - th.setData({ buy_now_gift_goods: arr_gf}); 950 + th.setData({ buy_now_gift_goods: arr_gf });
949 } 951 }
950 } 952 }
951 953
@@ -1174,8 +1176,8 @@ Page({ @@ -1174,8 +1176,8 @@ Page({
1174 }, 1176 },
1175 1177
1176 calc_per: async function (c_arr) { 1178 calc_per: async function (c_arr) {
1177 - var send_gf={};  
1178 - var duo_zp_num_arr={}; 1179 + var send_gf = {};
  1180 + var duo_zp_num_arr = {};
1179 var th = this; 1181 var th = this;
1180 //-- 循环处理 -- 1182 //-- 循环处理 --
1181 for (var i in c_arr) { 1183 for (var i in c_arr) {
@@ -1197,7 +1199,7 @@ Page({ @@ -1197,7 +1199,7 @@ Page({
1197 //等待,获取一下优惠活动的信息 1199 //等待,获取一下优惠活动的信息
1198 await getApp().request.promiseGet("/api/weshop/goods/getDiscount", { 1200 await getApp().request.promiseGet("/api/weshop/goods/getDiscount", {
1199 data: { 1201 data: {
1200 - price:parseFloat(item_map.price).toFixed(2),prom_id:item_map.prom_id, 1202 + price: parseFloat(item_map.price).toFixed(2), prom_id: item_map.prom_id,
1201 goods_num: item_map.goods_num, user_id: getApp().globalData.user_id, 1203 goods_num: item_map.goods_num, user_id: getApp().globalData.user_id,
1202 is_bz: item_map.is_bz 1204 is_bz: item_map.is_bz
1203 } 1205 }
@@ -1211,12 +1213,13 @@ Page({ @@ -1211,12 +1213,13 @@ Page({
1211 item_map.s_intValue = get_data.intValue; 1213 item_map.s_intValue = get_data.intValue;
1212 item_map.s_coupon_id = get_data.coupon_id; 1214 item_map.s_coupon_id = get_data.coupon_id;
1213 item_map.s_coupon_num = get_data.coupon_num; 1215 item_map.s_coupon_num = get_data.coupon_num;
  1216 + item_map.lbtitle = get_data.lbtitle;
  1217 + item_map.zxlbtitle = get_data.zxlbtitle;
1214 1218
1215 -  
1216 - if (get_data.gift_id && parseInt(get_data.zp_mode)!=1  
1217 - && get_data.zp_num* item_map.bs<=get_data.limit_num  
1218 - && get_data.zp_num* item_map.bs<=get_data.gift_storecount  
1219 - ){ 1219 + if (get_data.gift_id && parseInt(get_data.zp_mode) != 1
  1220 + && get_data.zp_num * item_map.bs <= get_data.limit_num
  1221 + && get_data.zp_num * item_map.bs <= get_data.gift_storecount
  1222 + ) {
1220 1223
1221 item_map.gift_id = get_data.gift_id; 1224 item_map.gift_id = get_data.gift_id;
1222 item_map.gift_goods_id = get_data.goods_id; 1225 item_map.gift_goods_id = get_data.goods_id;
@@ -1238,21 +1241,21 @@ Page({ @@ -1238,21 +1241,21 @@ Page({
1238 item_map.zx_libao = get_data.zxlibao; 1241 item_map.zx_libao = get_data.zxlibao;
1239 item_map.zx_lb_num = get_data.zxlb_num; 1242 item_map.zx_lb_num = get_data.zxlb_num;
1240 1243
1241 - if(parseInt(get_data.zp_mode)==1){  
1242 - if(!send_gf[pickid]) send_gf[pickid]=[]; 1244 + if (parseInt(get_data.zp_mode) == 1) {
  1245 + if (!send_gf[pickid]) send_gf[pickid] = [];
1243 1246
1244 - var can_zp_num=0;  
1245 - for(let iy in get_data.giftsinfo){  
1246 - let item=get_data.giftsinfo[iy];  
1247 - can_zp_num+= parseInt(item.gift_storecount)>parseInt(item.limit_num)?parseInt(item.limit_num):parseInt(item.gift_storecount); 1247 + var can_zp_num = 0;
  1248 + for (let iy in get_data.giftsinfo) {
  1249 + let item = get_data.giftsinfo[iy];
  1250 + can_zp_num += parseInt(item.gift_storecount) > parseInt(item.limit_num) ? parseInt(item.limit_num) : parseInt(item.gift_storecount);
1248 } 1251 }
1249 1252
1250 - var t_zp_num=parseInt(get_data.zp_num)*parseInt(get_data.bs);  
1251 - if(duo_zp_num_arr[item_map.prom_id]){  
1252 - t_zp_num+=duo_zp_num_arr[item_map.prom_id]; 1253 + var t_zp_num = parseInt(get_data.zp_num) * parseInt(get_data.bs);
  1254 + if (duo_zp_num_arr[item_map.prom_id]) {
  1255 + t_zp_num += duo_zp_num_arr[item_map.prom_id];
1253 } 1256 }
1254 1257
1255 - if(can_zp_num>=t_zp_num) { 1258 + if (can_zp_num >= t_zp_num) {
1256 send_gf[pickid].push({ 1259 send_gf[pickid].push({
1257 pickup_id: pickid, 1260 pickup_id: pickid,
1258 giftsinfo: get_data.giftsinfo, 1261 giftsinfo: get_data.giftsinfo,
@@ -1261,7 +1264,7 @@ Page({ @@ -1261,7 +1264,7 @@ Page({
1261 prom_id: item_map.prom_id 1264 prom_id: item_map.prom_id
1262 }); 1265 });
1263 1266
1264 - duo_zp_num_arr[item_map.prom_id]=t_zp_num; 1267 + duo_zp_num_arr[item_map.prom_id] = t_zp_num;
1265 } 1268 }
1266 } 1269 }
1267 } 1270 }
@@ -1325,7 +1328,7 @@ Page({ @@ -1325,7 +1328,7 @@ Page({
1325 for (var j = 0; j < ord_goods.length; j++) { 1328 for (var j = 0; j < ord_goods.length; j++) {
1326 if (ord_goods[j].is_gift) continue; 1329 if (ord_goods[j].is_gift) continue;
1327 if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) { 1330 if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) {
1328 - ord_goods[j].is_xz_yh =ord_goods[j].is_xz_yh?ord_goods[j].is_xz_yh:item_map.is_xz_yh; 1331 + ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh;
1329 ord_goods[j].is_past = item_map.is_past; 1332 ord_goods[j].is_past = item_map.is_past;
1330 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir; 1333 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir;
1331 ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir; 1334 ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir;
@@ -1362,22 +1365,22 @@ Page({ @@ -1362,22 +1365,22 @@ Page({
1362 if (item_map.s_libao) { 1365 if (item_map.s_libao) {
1363 if (!cart_item.s_libao) { 1366 if (!cart_item.s_libao) {
1364 cart_item.s_libao = item_map.s_libao + ""; 1367 cart_item.s_libao = item_map.s_libao + "";
1365 - cart_item.g_lb_num = [{ 'l_id': item_map.s_libao, "num": item_map.s_lb_num }]; 1368 + cart_item.g_lb_num = [{ 'l_id': item_map.s_libao, "num": item_map.s_lb_num, 'lbtitle': item_map.lbtitle }];
1366 } 1369 }
1367 else { 1370 else {
1368 cart_item.s_libao += "," + item_map.s_libao; 1371 cart_item.s_libao += "," + item_map.s_libao;
1369 - cart_item.g_lb_num.push({ 'l_id': item_map.s_libao, "num": item_map.s_lb_num }) 1372 + cart_item.g_lb_num.push({ 'l_id': item_map.s_libao, "num": item_map.s_lb_num, 'lbtitle': item_map.lbtitle })
1370 } 1373 }
1371 } 1374 }
1372 1375
1373 if (item_map.zx_libao) { 1376 if (item_map.zx_libao) {
1374 if (!cart_item.zx_libao) { 1377 if (!cart_item.zx_libao) {
1375 cart_item.zx_libao = item_map.zx_libao + ""; 1378 cart_item.zx_libao = item_map.zx_libao + "";
1376 - cart_item.g_zxlb_num = [{'l_id': item_map.zx_libao, "num": item_map.zx_lb_num}]; 1379 + cart_item.g_zxlb_num = [{ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num, 'zxlbtitle': item_map.zxlbtitle }];
1377 } 1380 }
1378 else { 1381 else {
1379 cart_item.zx_libao += "," + item_map.zx_libao; 1382 cart_item.zx_libao += "," + item_map.zx_libao;
1380 - cart_item.g_zxlb_num.push({'l_id': item_map.zx_libao, "num": item_map.zx_lb_num}) 1383 + cart_item.g_zxlb_num.push({ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num, 'zxlbtitle': item_map.zxlbtitle })
1381 } 1384 }
1382 } 1385 }
1383 } 1386 }
@@ -1387,15 +1390,69 @@ Page({ @@ -1387,15 +1390,69 @@ Page({
1387 1390
1388 var arr = Object.keys(send_gf); 1391 var arr = Object.keys(send_gf);
1389 var arr2 = Object.keys(th.data.send_gf); 1392 var arr2 = Object.keys(th.data.send_gf);
1390 - if(arr2.length>0) return false;  
1391 -  
1392 - if(arr.length>0){  
1393 - th.setData({send_gf:send_gf})  
1394 - }else{  
1395 - th.setData({send_gf:{}}) 1393 + if (arr2.length > 0) return false;
  1394 + th.calclate_lbNum(c_arr);
  1395 + if (arr.length > 0) {
  1396 + th.setData({ send_gf: send_gf })
  1397 + } else {
  1398 + th.setData({ send_gf: {} })
1396 } 1399 }
1397 1400
1398 }, 1401 },
  1402 + calclate_lbNum(r_data) {
  1403 + let send_lb = this.data.send_lb;
  1404 + //g_lb_num我的礼包 g_zxlb_num专享礼包
  1405 + r_data.forEach(r_d => {
  1406 + let arr = [];
  1407 + if (r_d.g_zxlb_num) {
  1408 + let g_lb = r_d.g_zxlb_num;
  1409 + for (let i = 0; i < g_lb.length; i++) {
  1410 + let item = g_lb[i];
  1411 + let new_lb = g_lb.filter(lb => {
  1412 + return item.l_id === lb.l_id;
  1413 + });
  1414 + if (new_lb.length == 1) {
  1415 + arr.push(item);
  1416 + } else {
  1417 + item.num = new_lb.reduce((pre, next) => {
  1418 + return pre + next.num;
  1419 + }, 0);
  1420 + arr.push(item);
  1421 + g_lb = g_lb.filter(ii => {
  1422 + return ii.l_id !== item.l_id;
  1423 + });
  1424 + }
  1425 + send_lb[r_d.pickup_id] = arr;
  1426 + }
  1427 + }
  1428 + if (r_d.g_lb_num) {
  1429 + let zx_lb = r_d.g_lb_num;
  1430 + for (let i = 0; i < zx_lb.length; i++) {
  1431 + let item = zx_lb[i];
  1432 + item.flag = 1;
  1433 + let new_lb = zx_lb.filter(lb => {
  1434 + return item.l_id === lb.l_id;
  1435 + });
  1436 + if (new_lb.length == 1) {
  1437 + arr.push(item);
  1438 + } else {
  1439 + item.num = new_lb.reduce((pre, next) => {
  1440 + return pre + next.num;
  1441 + }, 0);
  1442 + arr.push(item);
  1443 + zx_lb = zx_lb.filter(ii => {
  1444 + return ii.l_id !== item.l_id;
  1445 + });
  1446 + }
  1447 + send_lb[r_d.pickup_id] = arr;
  1448 + }
  1449 + }
  1450 + })
  1451 + this.setData({
  1452 + send_lb,
  1453 + })
  1454 +
  1455 + },
1399 1456
1400 //-------------------计算订单价格------------------- 1457 //-------------------计算订单价格-------------------
1401 calculatePrice: function (t, s) { 1458 calculatePrice: function (t, s) {
@@ -1404,12 +1461,12 @@ Page({ @@ -1404,12 +1461,12 @@ Page({
1404 to.getwuliuprice(async function (rs) { 1461 to.getwuliuprice(async function (rs) {
1405 wx.showLoading({ title: "处理中." }) 1462 wx.showLoading({ title: "处理中." })
1406 //是不是区域包邮 1463 //是不是区域包邮
1407 - th.data.is_area_by=0; 1464 + th.data.is_area_by = 0;
1408 //当不是区域不包邮的时候,没有不包邮商品的时候 1465 //当不是区域不包邮的时候,没有不包邮商品的时候
1409 - th.data.free1=0;  
1410 - th.data.cut_o_shipping_price=0;  
1411 - th.data.cut_goods_piece=0;  
1412 - th.data.cut_goods_weight=0; 1466 + th.data.free1 = 0;
  1467 + th.data.cut_o_shipping_price = 0;
  1468 + th.data.cut_goods_piece = 0;
  1469 + th.data.cut_goods_weight = 0;
1413 1470
1414 var all_price = 0; //所有的商品总价 1471 var all_price = 0; //所有的商品总价
1415 var all_shipping_m = 0; //所有的物流总价 1472 var all_shipping_m = 0; //所有的物流总价
@@ -1424,7 +1481,7 @@ Page({ @@ -1424,7 +1481,7 @@ Page({
1424 1481
1425 var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0); 1482 var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
1426 var freight_free = ee.freight_free; //全场满多少包邮 1483 var freight_free = ee.freight_free; //全场满多少包邮
1427 - var free1=freight_free; 1484 + var free1 = freight_free;
1428 1485
1429 var weight_free = ee.weight_free; //多少kg内包邮 1486 var weight_free = ee.weight_free; //多少kg内包邮
1430 var no_ex_id = ee.no_ex_id; 1487 var no_ex_id = ee.no_ex_id;
@@ -1596,7 +1653,7 @@ Page({ @@ -1596,7 +1653,7 @@ Page({
1596 if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) { 1653 if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
1597 if (th.check_by_area(by_qc.region_list)) { 1654 if (th.check_by_area(by_qc.region_list)) {
1598 freight_free = 0; 1655 freight_free = 0;
1599 - th.data.is_area_by=1; 1656 + th.data.is_area_by = 1;
1600 //goods_weight = -1; 1657 //goods_weight = -1;
1601 //out_of_weight = 0; 1658 //out_of_weight = 0;
1602 th.data.is_no_by[pickid] = 1; 1659 th.data.is_no_by[pickid] = 1;
@@ -1615,36 +1672,36 @@ Page({ @@ -1615,36 +1672,36 @@ Page({
1615 1672
1616 1673
1617 1674
1618 - var is_in_no_ex_goods_arr=0;  
1619 - var by_g_weight=0; 1675 + var is_in_no_ex_goods_arr = 0;
  1676 + var by_g_weight = 0;
1620 //--------循环计算商品总物流----------- 1677 //--------循环计算商品总物流-----------
1621 for (var jo = 0; jo < item.length; jo++) { 1678 for (var jo = 0; jo < item.length; jo++) {
1622 //----------------如果是选择了物流--------------------- 1679 //----------------如果是选择了物流---------------------
1623 - if (cart_item.exp_type == 0 && item[jo].is_free_shipping == 0 && th.data.user_addr != null){ 1680 + if (cart_item.exp_type == 0 && item[jo].is_free_shipping == 0 && th.data.user_addr != null) {
1624 1681
1625 //判断是否有设置限制重量包邮,先看商品有没有包邮 1682 //判断是否有设置限制重量包邮,先看商品有没有包邮
1626 - if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[jo].goods_id + '')== -1){  
1627 - if(!th.data.is_area_by) th.data.free1=free1; 1683 + if (!no_ex_good_arr || no_ex_good_arr.indexOf(item[jo].goods_id + '') == -1) {
  1684 + if (!th.data.is_area_by) th.data.free1 = free1;
1628 //此时是 模板里面没有不包邮商品列表或者是 该商品没有再不包邮商品列表礼包 1685 //此时是 模板里面没有不包邮商品列表或者是 该商品没有再不包邮商品列表礼包
1629 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) { 1686 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
1630 if (goods_weight < 0) goods_weight = 0; 1687 if (goods_weight < 0) goods_weight = 0;
1631 //累积商品重量 每种商品的重量 * 数量 1688 //累积商品重量 每种商品的重量 * 数量
1632 goods_weight += item[jo]['weight'] * item[jo]['goods_num']; 1689 goods_weight += item[jo]['weight'] * item[jo]['goods_num'];
1633 - by_g_weight+=item[jo]['weight'] * item[jo]['goods_num']; 1690 + by_g_weight += item[jo]['weight'] * item[jo]['goods_num'];
1634 1691
1635 - if(free1>0){ 1692 + if (free1 > 0) {
1636 if (weight_free > 0) { 1693 if (weight_free > 0) {
1637 out_of_weight = (weight_free * 1000) - by_g_weight; 1694 out_of_weight = (weight_free * 1000) - by_g_weight;
1638 - }else{  
1639 - out_of_weight= -by_g_weight; 1695 + } else {
  1696 + out_of_weight = -by_g_weight;
1640 } 1697 }
1641 } 1698 }
1642 1699
1643 } 1700 }
1644 } 1701 }
1645 //这个是在不包邮列表礼包 1702 //这个是在不包邮列表礼包
1646 - else if(no_ex_good_arr.indexOf(item[jo].goods_id + '') > -1){  
1647 - is_in_no_ex_goods_arr=1; 1703 + else if (no_ex_good_arr.indexOf(item[jo].goods_id + '') > -1) {
  1704 + is_in_no_ex_goods_arr = 1;
1648 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) { 1705 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
1649 if (goods_weight < 0) goods_weight = 0; 1706 if (goods_weight < 0) goods_weight = 0;
1650 //累积商品重量 每种商品的重量 * 数量 1707 //累积商品重量 每种商品的重量 * 数量
@@ -1655,7 +1712,7 @@ Page({ @@ -1655,7 +1712,7 @@ Page({
1655 } 1712 }
1656 } 1713 }
1657 1714
1658 - if(free1>0) { 1715 + if (free1 > 0) {
1659 //当商品没有超出的时候 1716 //当商品没有超出的时候
1660 if (out_of_weight >= 0) { 1717 if (out_of_weight >= 0) {
1661 out_of_weight = -by_g_weight; 1718 out_of_weight = -by_g_weight;
@@ -1665,7 +1722,7 @@ Page({ @@ -1665,7 +1722,7 @@ Page({
1665 } 1722 }
1666 1723
1667 //所有的商品都不在不包邮商品列表,freight_free为0的时候,以及不是区域包邮 1724 //所有的商品都不在不包邮商品列表,freight_free为0的时候,以及不是区域包邮
1668 - if(!is_in_no_ex_goods_arr && !freight_free && !th.data.is_area_by) freight_free=free1; 1725 + if (!is_in_no_ex_goods_arr && !freight_free && !th.data.is_area_by) freight_free = free1;
1669 1726
1670 //--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额-- 1727 //--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额--
1671 if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) { 1728 if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) {
@@ -1751,7 +1808,7 @@ Page({ @@ -1751,7 +1808,7 @@ Page({
1751 if (no_ex_good) { 1808 if (no_ex_good) {
1752 is_good_no_by = th.check_by_goods(no_ex_good, item[j].goods_id); 1809 is_good_no_by = th.check_by_goods(no_ex_good, item[j].goods_id);
1753 } 1810 }
1754 - 1811 +
1755 //--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算-- 1812 //--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算--
1756 if (th.data.using_quan[pickid] && th.data.using_quan[pickid].isby == 1 && !is_good_no_by) { 1813 if (th.data.using_quan[pickid] && th.data.using_quan[pickid].isby == 1 && !is_good_no_by) {
1757 continue; 1814 continue;
@@ -1777,7 +1834,7 @@ Page({ @@ -1777,7 +1834,7 @@ Page({
1777 } 1834 }
1778 1835
1779 1836
1780 - if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id + '')== -1){ 1837 + if (!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id + '') == -1) {
1781 switch (item[j]['exp_sum_type']) { 1838 switch (item[j]['exp_sum_type']) {
1782 case 1: 1839 case 1:
1783 //统一运费 1840 //统一运费
@@ -1791,7 +1848,7 @@ Page({ @@ -1791,7 +1848,7 @@ Page({
1791 } 1848 }
1792 1849
1793 1850
1794 - }else{ 1851 + } else {
1795 /*-- 1852 /*--
1796 if(item[j]['exp_sum_type']==2 && out_of_weight!==0){ 1853 if(item[j]['exp_sum_type']==2 && out_of_weight!==0){
1797 goods_weight = -1; 1854 goods_weight = -1;
@@ -1839,7 +1896,7 @@ Page({ @@ -1839,7 +1896,7 @@ Page({
1839 var order_m = 0; 1896 var order_m = 0;
1840 //---判断是不是有订单优惠--- 1897 //---判断是不是有订单优惠---
1841 await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { 1898 await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
1842 - data: { store_id: os.stoid, orderAmount: o_condition,user_id:getApp().globalData.user_id} 1899 + data: { store_id: os.stoid, orderAmount: o_condition, user_id: getApp().globalData.user_id }
1843 }).then(res => { 1900 }).then(res => {
1844 if (res.data.code == 0) { 1901 if (res.data.code == 0) {
1845 var ord_prom = res.data.data; 1902 var ord_prom = res.data.data;
@@ -2284,9 +2341,9 @@ Page({ @@ -2284,9 +2341,9 @@ Page({
2284 var l_txt = "formData.give_zxlb_id"; 2341 var l_txt = "formData.give_zxlb_id";
2285 //这个是json格式的 2342 //这个是json格式的
2286 var l_txt1 = "formData.g_zxlb_num"; 2343 var l_txt1 = "formData.g_zxlb_num";
2287 - var ob = [{"num": good.zx_lb_num, "l_id": good.zx_libao}]; 2344 + var ob = [{ "num": good.zx_lb_num, "l_id": good.zx_libao }];
2288 ob = JSON.stringify(ob); 2345 ob = JSON.stringify(ob);
2289 - th.setData({[l_txt]: good.zx_libao, [l_txt1]: ob}); 2346 + th.setData({ [l_txt]: good.zx_libao, [l_txt1]: ob });
2290 } 2347 }
2291 }) 2348 })
2292 } else { 2349 } else {
@@ -2343,7 +2400,7 @@ Page({ @@ -2343,7 +2400,7 @@ Page({
2343 var l_txt1 = "formData.g_lb_num"; 2400 var l_txt1 = "formData.g_lb_num";
2344 var ob = [{ "num": good.s_lb_num, "l_id": good.s_libao }]; 2401 var ob = [{ "num": good.s_lb_num, "l_id": good.s_libao }];
2345 ob = JSON.stringify(ob); 2402 ob = JSON.stringify(ob);
2346 - th.setData({[l_txt]: good.s_libao, [l_txt1]: ob}); 2403 + th.setData({ [l_txt]: good.s_libao, [l_txt1]: ob });
2347 } 2404 }
2348 2405
2349 //专享礼包 2406 //专享礼包
@@ -2351,9 +2408,9 @@ Page({ @@ -2351,9 +2408,9 @@ Page({
2351 var l_txt = "formData.give_zxlb_id"; 2408 var l_txt = "formData.give_zxlb_id";
2352 //这个是json格式的 2409 //这个是json格式的
2353 var l_txt1 = "formData.g_zxlb_num"; 2410 var l_txt1 = "formData.g_zxlb_num";
2354 - var ob = [{"num": good.zx_lb_num, "l_id": good.zx_libao}]; 2411 + var ob = [{ "num": good.zx_lb_num, "l_id": good.zx_libao }];
2355 ob = JSON.stringify(ob); 2412 ob = JSON.stringify(ob);
2356 - th.setData({[l_txt]: good.zx_libao, [l_txt1]: ob}); 2413 + th.setData({ [l_txt]: good.zx_libao, [l_txt1]: ob });
2357 2414
2358 } 2415 }
2359 } 2416 }
@@ -2388,7 +2445,7 @@ Page({ @@ -2388,7 +2445,7 @@ Page({
2388 } 2445 }
2389 }) 2446 })
2390 this.setData({ 2447 this.setData({
2391 - submit:1, 2448 + submit: 1,
2392 }) 2449 })
2393 }, 2450 },
2394 2451
@@ -2523,8 +2580,8 @@ Page({ @@ -2523,8 +2580,8 @@ Page({
2523 'prom_id': th.data.bn_goods.prom_id, //促销活动id 2580 'prom_id': th.data.bn_goods.prom_id, //促销活动id
2524 }; 2581 };
2525 2582
2526 - if(getApp().globalData.skinface_id){  
2527 - goods.skinface_id=getApp().globalData.skinface_id; 2583 + if (getApp().globalData.skinface_id) {
  2584 + goods.skinface_id = getApp().globalData.skinface_id;
2528 } 2585 }
2529 2586
2530 //-- 把导购的信息填入-- 2587 //-- 把导购的信息填入--
@@ -2613,8 +2670,8 @@ Page({ @@ -2613,8 +2670,8 @@ Page({
2613 //--如果有赠品的时候,赠品也要提交--- 2670 //--如果有赠品的时候,赠品也要提交---
2614 if (th.data.buy_now_gift_goods) { 2671 if (th.data.buy_now_gift_goods) {
2615 var gift_gg_arr = th.data.buy_now_gift_goods; 2672 var gift_gg_arr = th.data.buy_now_gift_goods;
2616 - for(let i in gift_gg_arr){  
2617 - let gift_gg=gift_gg_arr[i]; 2673 + for (let i in gift_gg_arr) {
  2674 + let gift_gg = gift_gg_arr[i];
2618 var g_goods = { 2675 var g_goods = {
2619 'goods_id': gift_gg.goods_id, 2676 'goods_id': gift_gg.goods_id,
2620 'goods_name': gift_gg.goods_name, 2677 'goods_name': gift_gg.goods_name,
@@ -2759,11 +2816,11 @@ Page({ @@ -2759,11 +2816,11 @@ Page({
2759 order_prom_list.g_zxlb_num = JSON.stringify(t_item.g_zxlb_num); 2816 order_prom_list.g_zxlb_num = JSON.stringify(t_item.g_zxlb_num);
2760 } 2817 }
2761 2818
2762 - if (Object.keys(order_prom_list).length > 0){  
2763 - if(order_prom_list.discount_amount)  
2764 - order_prom_list.discount_amount= parseFloat(order_prom_list.discount_amount).toFixed(2);  
2765 - if(order_prom_list.order_prom_amount)  
2766 - order_prom_list.order_prom_amount= parseFloat(order_prom_list.order_prom_amount).toFixed(2); 2819 + if (Object.keys(order_prom_list).length > 0) {
  2820 + if (order_prom_list.discount_amount)
  2821 + order_prom_list.discount_amount = parseFloat(order_prom_list.discount_amount).toFixed(2);
  2822 + if (order_prom_list.order_prom_amount)
  2823 + order_prom_list.order_prom_amount = parseFloat(order_prom_list.order_prom_amount).toFixed(2);
2767 2824
2768 item.order_prom_list = order_prom_list; 2825 item.order_prom_list = order_prom_list;
2769 } 2826 }
@@ -2809,8 +2866,8 @@ Page({ @@ -2809,8 +2866,8 @@ Page({
2809 'store_id': oo.stoid, 2866 'store_id': oo.stoid,
2810 }; 2867 };
2811 2868
2812 - if(getApp().globalData.skinface_id){  
2813 - goods.skinface_id=getApp().globalData.skinface_id; 2869 + if (getApp().globalData.skinface_id) {
  2870 + goods.skinface_id = getApp().globalData.skinface_id;
2814 } 2871 }
2815 2872
2816 //-- 线下取价也要写入,组合购的商品不能去线下价格 -- 2873 //-- 线下取价也要写入,组合购的商品不能去线下价格 --
@@ -2913,7 +2970,7 @@ Page({ @@ -2913,7 +2970,7 @@ Page({
2913 if (pdata.length == 0) return; 2970 if (pdata.length == 0) return;
2914 var str = JSON.stringify(pdata); 2971 var str = JSON.stringify(pdata);
2915 2972
2916 - 2973 +
2917 wx.showLoading({ title: "加载中" }); 2974 wx.showLoading({ title: "加载中" });
2918 wx.request({ 2975 wx.request({
2919 url: oo.url + '/api/weshop/order/createWxdOrder', 2976 url: oo.url + '/api/weshop/order/createWxdOrder',
@@ -3036,7 +3093,7 @@ Page({ @@ -3036,7 +3093,7 @@ Page({
3036 }, 3093 },
3037 complete: function () { 3094 complete: function () {
3038 th.setData({ 3095 th.setData({
3039 - submit:0, 3096 + submit: 0,
3040 }) 3097 })
3041 } 3098 }
3042 }) 3099 })
@@ -3232,8 +3289,8 @@ Page({ @@ -3232,8 +3289,8 @@ Page({
3232 3289
3233 //------超出重量---------- 3290 //------超出重量----------
3234 if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) { 3291 if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) {
3235 - goods_weight=goods_weight+ out_of_weight;  
3236 - if(goods_weight==0) goods_weight=-1; 3292 + goods_weight = goods_weight + out_of_weight;
  3293 + if (goods_weight == 0) goods_weight = -1;
3237 } 3294 }
3238 3295
3239 3296
@@ -3247,12 +3304,12 @@ Page({ @@ -3247,12 +3304,12 @@ Page({
3247 } 3304 }
3248 } 3305 }
3249 3306
3250 - if(th.data.free1 && freight_free<=0) freight_free=th.data.free1; 3307 + if (th.data.free1 && freight_free <= 0) freight_free = th.data.free1;
3251 3308
3252 3309
3253 //当有包邮和不包邮混合在一起的时候,件数要重新计算 3310 //当有包邮和不包邮混合在一起的时候,件数要重新计算
3254 - if(freight_free>0 && o_price >= freight_free && goods_piece>0 && th.data.cut_goods_piece)  
3255 - goods_piece=goods_piece-th.data.cut_goods_piece; 3311 + if (freight_free > 0 && o_price >= freight_free && goods_piece > 0 && th.data.cut_goods_piece)
  3312 + goods_piece = goods_piece - th.data.cut_goods_piece;
3256 //------按件数---------- 3313 //------按件数----------
3257 if (goods_piece > 0 && item['piecemoney']) { 3314 if (goods_piece > 0 && item['piecemoney']) {
3258 fp_price = parseFloat(item['piecemoney']); 3315 fp_price = parseFloat(item['piecemoney']);
@@ -3263,7 +3320,7 @@ Page({ @@ -3263,7 +3320,7 @@ Page({
3263 } 3320 }
3264 } 3321 }
3265 //当有包邮和不包邮混合在一起的时候,统一运费要重新计算 3322 //当有包邮和不包邮混合在一起的时候,统一运费要重新计算
3266 - if(freight_free>0 && o_price >= freight_free && th.data.cut_o_shipping_price && price>0) price=price-th.data.cut_o_shipping_price; 3323 + if (freight_free > 0 && o_price >= freight_free && th.data.cut_o_shipping_price && price > 0) price = price - th.data.cut_o_shipping_price;
3267 3324
3268 var rspice = parseFloat(price + fw_price + fp_price); 3325 var rspice = parseFloat(price + fw_price + fp_price);
3269 return rspice; 3326 return rspice;
@@ -3481,7 +3538,6 @@ Page({ @@ -3481,7 +3538,6 @@ Page({
3481 3538
3482 }, 3539 },
3483 3540
3484 -  
3485 /*----- 点击选择包邮券 -----*/ 3541 /*----- 点击选择包邮券 -----*/
3486 sele_quan_item_by: function (e) { 3542 sele_quan_item_by: function (e) {
3487 var no_use = e.currentTarget.dataset.no; 3543 var no_use = e.currentTarget.dataset.no;
@@ -3936,7 +3992,7 @@ Page({ @@ -3936,7 +3992,7 @@ Page({
3936 arr[ind].check_quan_ware_list = check_quan_ware_list; 3992 arr[ind].check_quan_ware_list = check_quan_ware_list;
3937 arr[ind].check_quan_price_list = check_quan_price_list; 3993 arr[ind].check_quan_price_list = check_quan_price_list;
3938 //是否关闭使用优惠券 3994 //是否关闭使用优惠券
3939 - if (th.data.is_close_quan != 1 ) { 3995 + if (th.data.is_close_quan != 1) {
3940 //--调用接口,获取优惠券的列表,3秒钟内控制接口请求-- 3996 //--调用接口,获取优惠券的列表,3秒钟内控制接口请求--
3941 var url = "/api/weshop/couponList/getUseCouponList"; 3997 var url = "/api/weshop/couponList/getUseCouponList";
3942 await app.request.promiseGet(url, { 3998 await app.request.promiseGet(url, {
@@ -4045,7 +4101,7 @@ Page({ @@ -4045,7 +4101,7 @@ Page({
4045 }, 4101 },
4046 //立即购买获取优惠活动的内容 4102 //立即购买获取优惠活动的内容
4047 buy_now_prom_goods: function (prom_id, arr, func) { 4103 buy_now_prom_goods: function (prom_id, arr, func) {
4048 - var th=this; 4104 + var th = this;
4049 var price = arr.shop_price * arr.goods_num; 4105 var price = arr.shop_price * arr.goods_num;
4050 var prom = null; 4106 var prom = null;
4051 var gg = to.get_b_now(); 4107 var gg = to.get_b_now();
@@ -4068,7 +4124,7 @@ Page({ @@ -4068,7 +4124,7 @@ Page({
4068 if (res.data.code == 0) { 4124 if (res.data.code == 0) {
4069 var get_data = res.data.data; 4125 var get_data = res.data.data;
4070 arr.is_bz = prom.is_bz; //是不是倍增 4126 arr.is_bz = prom.is_bz; //是不是倍增
4071 - arr.is_xz_yh =arr.is_xz_yh?arr.is_xz_yh:prom.is_xz_yh; //是不是优惠 4127 + arr.is_xz_yh = arr.is_xz_yh ? arr.is_xz_yh : prom.is_xz_yh; //是不是优惠
4072 arr.bs = get_data.bs; //是不是倍数 4128 arr.bs = get_data.bs; //是不是倍数
4073 arr.is_past = get_data.is_past; //是不是包邮 4129 arr.is_past = get_data.is_past; //是不是包邮
4074 arr.prom_price = get_data.price >= 0 ? get_data.price : price; 4130 arr.prom_price = get_data.price >= 0 ? get_data.price : price;
@@ -4076,13 +4132,13 @@ Page({ @@ -4076,13 +4132,13 @@ Page({
4076 arr.s_coupon_id = get_data.coupon_id; 4132 arr.s_coupon_id = get_data.coupon_id;
4077 arr.s_coupon_num = get_data.coupon_num; 4133 arr.s_coupon_num = get_data.coupon_num;
4078 arr.zp_mode = get_data.zp_mode; 4134 arr.zp_mode = get_data.zp_mode;
4079 - arr.zp_num = get_data.zp_num?get_data.zp_num:1; //确保默认一个 4135 + arr.zp_num = get_data.zp_num ? get_data.zp_num : 1; //确保默认一个
4080 4136
4081 //-- 看是不是有赠品 -- 4137 //-- 看是不是有赠品 --
4082 - if (get_data.gift_id && parseInt(get_data.zp_mode)!=1  
4083 - && get_data.zp_num* arr.bs<=get_data.limit_num  
4084 - && get_data.zp_num* arr.bs<=get_data.gift_storecount  
4085 - ){ 4138 + if (get_data.gift_id && parseInt(get_data.zp_mode) != 1
  4139 + && get_data.zp_num * arr.bs <= get_data.limit_num
  4140 + && get_data.zp_num * arr.bs <= get_data.gift_storecount
  4141 + ) {
4086 arr.gift_id = get_data.gift_id; 4142 arr.gift_id = get_data.gift_id;
4087 arr.gift_goods_id = get_data.goods_id; 4143 arr.gift_goods_id = get_data.goods_id;
4088 arr.gift_goods_name = get_data.goods_name; 4144 arr.gift_goods_name = get_data.goods_name;
@@ -4098,34 +4154,34 @@ Page({ @@ -4098,34 +4154,34 @@ Page({
4098 } 4154 }
4099 arr.s_libao = get_data.libao; 4155 arr.s_libao = get_data.libao;
4100 arr.s_lb_num = get_data.lb_num; 4156 arr.s_lb_num = get_data.lb_num;
4101 - 4157 + arr.lbtitle = get_data.lbtitle;
  4158 + arr.zxlbtitle = get_data.zxlbtitle;
4102 arr.zx_libao = get_data.zxlibao; 4159 arr.zx_libao = get_data.zxlibao;
4103 arr.zx_lb_num = get_data.zxlb_num; 4160 arr.zx_lb_num = get_data.zxlb_num;
4104 4161
4105 arr.prom_id = prom_id; 4162 arr.prom_id = prom_id;
4106 4163
4107 - var send_gf={};  
4108 - var pickid=gg.pick_id;  
4109 - if(parseInt(get_data.zp_mode)==1){  
4110 - if(!send_gf[pickid]) send_gf[pickid]=[];  
4111 -  
4112 - var a_stock_num=0;  
4113 - var a_limit_num=0;  
4114 - for(let iy in get_data.giftsinfo){  
4115 - let item=get_data.giftsinfo[iy];  
4116 - a_stock_num+= parseInt(item.gift_storecount);  
4117 - a_limit_num+=parseInt(item.limit_num); 4164 + var send_gf = {};
  4165 + var pickid = gg.pick_id;
  4166 + if (parseInt(get_data.zp_mode) == 1) {
  4167 + if (!send_gf[pickid]) send_gf[pickid] = [];
  4168 +
  4169 + var a_stock_num = 0;
  4170 + var a_limit_num = 0;
  4171 + for (let iy in get_data.giftsinfo) {
  4172 + let item = get_data.giftsinfo[iy];
  4173 + a_stock_num += parseInt(item.gift_storecount);
  4174 + a_limit_num += parseInt(item.limit_num);
4118 } 4175 }
4119 4176
4120 - var t_zp_num=parseInt(get_data.zp_num)*parseInt(get_data.bs);  
4121 - if(a_limit_num>= t_zp_num && a_stock_num>=t_zp_num ){ 4177 + var t_zp_num = parseInt(get_data.zp_num) * parseInt(get_data.bs);
  4178 + if (a_limit_num >= t_zp_num && a_stock_num >= t_zp_num) {
4122 send_gf[pickid].push({ 4179 send_gf[pickid].push({
4123 - pickup_id:pickid,giftsinfo:get_data.giftsinfo,zp_num:get_data.zp_num*get_data.bs,  
4124 - gf_pr_name:prom.name,prom_id:prom.prom_id});  
4125 - 4180 + pickup_id: pickid, giftsinfo: get_data.giftsinfo, zp_num: get_data.zp_num * get_data.bs,
  4181 + gf_pr_name: prom.name, prom_id: prom.prom_id
  4182 + });
4126 } 4183 }
4127 -  
4128 - th.setData({send_gf:send_gf}); 4184 + th.setData({ send_gf: send_gf });
4129 } 4185 }
4130 } 4186 }
4131 func(arr); 4187 func(arr);
@@ -4137,7 +4193,7 @@ Page({ @@ -4137,7 +4193,7 @@ Page({
4137 if (this.data.is_b_now == 1) pick = this.data.bn_pick; 4193 if (this.data.is_b_now == 1) pick = this.data.bn_pick;
4138 //---获取订单优惠--- 4194 //---获取订单优惠---
4139 getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { 4195 getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
4140 - data: { store_id: os.stoid, orderAmount: condition,user_id:getApp().globalData.user_id } 4196 + data: { store_id: os.stoid, orderAmount: condition, user_id: getApp().globalData.user_id }
4141 }).then(res => { 4197 }).then(res => {
4142 if (res.data.code == 0) { 4198 if (res.data.code == 0) {
4143 var data = res.data.data; 4199 var data = res.data.data;
@@ -4195,13 +4251,86 @@ Page({ @@ -4195,13 +4251,86 @@ Page({
4195 ob.is_xz_yh = prom.is_xz_yh; 4251 ob.is_xz_yh = prom.is_xz_yh;
4196 ob.goods = new Array(); 4252 ob.goods = new Array();
4197 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); 4253 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
4198 -  
4199 var obj = {}; 4254 var obj = {};
4200 obj[item.prom_id] = ob; 4255 obj[item.prom_id] = ob;
4201 map[pickid] = obj; 4256 map[pickid] = obj;
4202 4257
4203 } 4258 }
4204 }, 4259 },
  4260 + //---检查有没有优惠活动---
  4261 + check_is_youhui: function (r_data, pick_id) {
  4262 + let send_lb = this.data.send_lb;
  4263 + let lodash = null;
  4264 + r_data.forEach(item => {
  4265 + if (send_lb[pick_id]) {
  4266 + for (let i = 0; i < send_lb[pick_id].length; i++) {
  4267 + let sends = send_lb[pick_id][i];
  4268 + if (item.lb_id) {
  4269 + if (sends.id === item.lb_id) {
  4270 + sends['num']++;
  4271 + } else {
  4272 + let send_arr1 = send_lb[pick_id].filter(ii => ii.id === item.lb_id);
  4273 + if (send_arr1.length == 0) {
  4274 + if (item.lb_id) {
  4275 + let ob = {};
  4276 + ob.num = 1;
  4277 + ob.title = item.lbtitle;
  4278 + ob.id = item.lb_id;
  4279 + lodash.push(ob);
  4280 + // break;
  4281 + }
  4282 + }
  4283 +
  4284 + }
  4285 + }
  4286 + if (item.zxlb_id) {
  4287 + if (sends.id === item.zxlb_id) {
  4288 + sends['num']++;
  4289 + } else {
  4290 + let send_arr = send_lb[pick_id].filter(ii => ii.id === item.zxlb_id);
  4291 + if (send_arr.length == 0) {
  4292 + if (item.zxlb_id) {
  4293 + let ob = {};
  4294 + ob.num = 1;
  4295 + ob.flag = 1;
  4296 + ob.title = item.zxlbtitle;
  4297 + ob.id = item.zxlb_id;
  4298 + lodash.push(ob);
  4299 + // break;
  4300 + }
  4301 + }
  4302 + }
  4303 + }
  4304 + }
  4305 +
  4306 + } else {
  4307 + let arr = new Array();
  4308 + if (item.lb_id) {
  4309 + let ob = {};
  4310 + ob.num = 1;
  4311 + ob.title = item.lbtitle;
  4312 + ob.id = item.lb_id;
  4313 + arr.push(ob);
  4314 + }
  4315 + if (item.zxlb_id) {
  4316 + let ob = {};
  4317 + ob.num = 1;
  4318 + ob.flag = 1;
  4319 + ob.title = item.zxlbtitle;
  4320 + ob.id = item.zxlb_id;
  4321 + arr.push(ob);
  4322 + }
  4323 + send_lb[pick_id] = arr;
  4324 + lodash = JSON.parse(JSON.stringify(send_lb[pick_id]));
  4325 + }
  4326 + })
  4327 + send_lb[pick_id] = lodash;
  4328 + th.setData({
  4329 + send_lb,
  4330 + })
  4331 +
  4332 +
  4333 + },
4205 4334
4206 //计算立即购买赠品的物流费用 4335 //计算立即购买赠品的物流费用
4207 get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free, out_of_weight, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) { 4336 get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free, out_of_weight, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
@@ -4209,8 +4338,7 @@ Page({ @@ -4209,8 +4338,7 @@ Page({
4209 var goods_weight = -1, goods_piece = -1; 4338 var goods_weight = -1, goods_piece = -1;
4210 4339
4211 var gift_shipping_price = 0; 4340 var gift_shipping_price = 0;
4212 - if (shipping_price)  
4213 - { 4341 + if (shipping_price) {
4214 gift_shipping_price = shipping_price; 4342 gift_shipping_price = shipping_price;
4215 } 4343 }
4216 var th = this; 4344 var th = this;
@@ -4226,8 +4354,8 @@ Page({ @@ -4226,8 +4354,8 @@ Page({
4226 } 4354 }
4227 } 4355 }
4228 4356
4229 - for(var i in good_arr) {  
4230 - var good=good_arr[i]; 4357 + for (var i in good_arr) {
  4358 + var good = good_arr[i];
4231 switch (good['exp_sum_type']) { 4359 switch (good['exp_sum_type']) {
4232 case 1: 4360 case 1:
4233 //统一运费 4361 //统一运费
@@ -4247,7 +4375,7 @@ Page({ @@ -4247,7 +4375,7 @@ Page({
4247 case 3: 4375 case 3:
4248 if (goods_piece < 0) goods_piece = 0; 4376 if (goods_piece < 0) goods_piece = 0;
4249 //累积商品数量 4377 //累积商品数量
4250 - goods_piece += parseInt(good['buynum']) ; 4378 + goods_piece += parseInt(good['buynum']);
4251 if (goods_piece1) { 4379 if (goods_piece1) {
4252 goods_piece += goods_piece1; 4380 goods_piece += goods_piece1;
4253 } 4381 }
@@ -4259,14 +4387,14 @@ Page({ @@ -4259,14 +4387,14 @@ Page({
4259 if (th.check_by_goods(no_by_data.goods_list, good.goods_id)) { 4387 if (th.check_by_goods(no_by_data.goods_list, good.goods_id)) {
4260 gift_freight_free = 0; 4388 gift_freight_free = 0;
4261 // out_of_weight = 0 4389 // out_of_weight = 0
4262 - th.data.is_no_by[th.data.bn_pick]=1; 4390 + th.data.is_no_by[th.data.bn_pick] = 1;
4263 } 4391 }
4264 } 4392 }
4265 } 4393 }
4266 4394
4267 var t_shipping_price = 4395 var t_shipping_price =
4268 this.calculatewuliu(code, gift_shipping_price, goods_weight, out_of_weight, 4396 this.calculatewuliu(code, gift_shipping_price, goods_weight, out_of_weight,
4269 - goods_piece, user_addr, gift_freight_free, allpice, rs,th.data.bn_pick); 4397 + goods_piece, user_addr, gift_freight_free, allpice, rs, th.data.bn_pick);
4270 return t_shipping_price; 4398 return t_shipping_price;
4271 4399
4272 }, 4400 },
@@ -4334,6 +4462,20 @@ Page({ @@ -4334,6 +4462,20 @@ Page({
4334 this.setData({ is_offline_show: 1, show_off_price: off_price.toFixed(2), is_get_offline: is_get_offline }); 4462 this.setData({ is_offline_show: 1, show_off_price: off_price.toFixed(2), is_get_offline: is_get_offline });
4335 }, 4463 },
4336 4464
  4465 + // 促销 -> 送礼包 -> 查看详情
  4466 + viewLbDetails(e) {
  4467 + let id = e.currentTarget.dataset.id; // 获取礼包id
  4468 + let flag = e.currentTarget.dataset.flag;
  4469 + let url = '';
  4470 + if (flag == 1) { // flag =1 控制跳转到专享礼包
  4471 + url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  4472 + } else {
  4473 + url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
  4474 + };
  4475 + // console.log('myurl', url);
  4476 + getApp().goto(url);
  4477 + },
  4478 +
4337 //确定使用线下取价 4479 //确定使用线下取价
4338 sure_offline: function () { 4480 sure_offline: function () {
4339 var bn_goods = this.data.bn_goods; 4481 var bn_goods = this.data.bn_goods;
@@ -4459,7 +4601,7 @@ Page({ @@ -4459,7 +4601,7 @@ Page({
4459 }, 4601 },
4460 //订阅消息提醒 4602 //订阅消息提醒
4461 sendsm: function (func) { 4603 sendsm: function (func) {
4462 - let th =this; 4604 + let th = this;
4463 var template_id = this.data.template_id; 4605 var template_id = this.data.template_id;
4464 // //授权订阅 4606 // //授权订阅
4465 wx.requestSubscribeMessage({ 4607 wx.requestSubscribeMessage({
@@ -4467,417 +4609,417 @@ Page({ @@ -4467,417 +4609,417 @@ Page({
4467 success(res) { 4609 success(res) {
4468 func(); 4610 func();
4469 th.setData({ 4611 th.setData({
4470 - submit:0, 4612 + submit: 0,
4471 }) 4613 })
4472 }, 4614 },
4473 fail(res) { 4615 fail(res) {
4474 func(); 4616 func();
4475 th.setData({ 4617 th.setData({
4476 - submit:0, 4618 + submit: 0,
4477 }) 4619 })
4478 } 4620 }
4479 }) 4621 })
4480 4622
4481 }, 4623 },
4482 4624
4483 - setexptype2: function(e) {  
4484 - this.debounce(this.setexptype.bind(this, e),400)();  
4485 - },  
4486 -  
4487 - setexptype_w2: function(e) {  
4488 - this.debounce(this.setexptype_w.bind(this, e),400)();  
4489 - },  
4490 -  
4491 - // 函数防抖  
4492 - debounce: function (func, wait) {  
4493 - return () => {  
4494 - clearTimeout(timer);  
4495 - timer = setTimeout(func, wait);  
4496 - };  
4497 - },  
4498 -  
4499 -  
4500 - //-- 判断是不是选中 --  
4501 - check_th_item:function (e) {  
4502 - var th=this;  
4503 - var idx=e.currentTarget.dataset.item;  
4504 - var check=e.currentTarget.dataset.check;  
4505 - var txt="giftsinfo["+idx+"].selected";  
4506 - var gift_item=this.data.giftsinfo[idx];  
4507 -  
4508 - if(check){  
4509 - th.setData({[txt]:0});  
4510 - }else{  
4511 -  
4512 - var is_true=th.check_out_num_cart(gift_item,this.data.gift_pkid,gift_item.goods_num);  
4513 - if(!is_true){ return false; }  
4514 -  
4515 - th.setData({[txt]:1});  
4516 - }  
4517 - },  
4518 -  
4519 -  
4520 - //输入框输入数量的时候  
4521 - valueToNum:function (e){  
4522 - var th=this;  
4523 - var idx=e.currentTarget.dataset.item;  
4524 - var gift_item=this.data.giftsinfo[idx];  
4525 - var num=parseInt(e.detail.value);  
4526 - var txt="giftsinfo["+idx+"].goods_num";  
4527 - var is_true=th.check_out_num_cart(gift_item,this.data.gift_pkid,num);  
4528 - if(!is_true){  
4529 - th.setData({[txt]:1});  
4530 - return false;  
4531 - }  
4532 - th.setData({[txt]:num}); 4625 + setexptype2: function (e) {
  4626 + this.debounce(this.setexptype.bind(this, e), 400)();
  4627 + },
4533 4628
4534 - }, 4629 + setexptype_w2: function (e) {
  4630 + this.debounce(this.setexptype_w.bind(this, e), 400)();
  4631 + },
4535 4632
  4633 + // 函数防抖
  4634 + debounce: function (func, wait) {
  4635 + return () => {
  4636 + clearTimeout(timer);
  4637 + timer = setTimeout(func, wait);
  4638 + };
  4639 + },
4536 4640
4537 4641
4538 - addNum:function (e) {  
4539 - var th=this;  
4540 - var idx=e.currentTarget.dataset.item;  
4541 - var txt="giftsinfo["+idx+"].goods_num";  
4542 - var num=th.data.giftsinfo[idx].goods_num+1;  
4543 - var gift_item=this.data.giftsinfo[idx];  
4544 - var is_true=th.check_out_num_cart(gift_item,this.data.gift_pkid,num);  
4545 - if(!is_true){ return false; }  
4546 - th.setData({[txt]:num});  
4547 - },  
4548 -  
4549 - subNum:function (e) {  
4550 - var th=this;  
4551 - var idx=e.currentTarget.dataset.item;  
4552 - var txt="giftsinfo["+idx+"].goods_num";  
4553 - var num=th.data.giftsinfo[idx].goods_num-1;  
4554 - var gift_item=this.data.giftsinfo[idx];  
4555 - var is_true=th.check_out_num_cart(gift_item,this.data.gift_pkid,num);  
4556 - if(!is_true){  
4557 - return false;  
4558 - }  
4559 - if(num<1) return false;  
4560 - th.setData({[txt]:num});  
4561 - }, 4642 + //-- 判断是不是选中 --
  4643 + check_th_item: function (e) {
  4644 + var th = this;
  4645 + var idx = e.currentTarget.dataset.item;
  4646 + var check = e.currentTarget.dataset.check;
  4647 + var txt = "giftsinfo[" + idx + "].selected";
  4648 + var gift_item = this.data.giftsinfo[idx];
  4649 +
  4650 + if (check) {
  4651 + th.setData({ [txt]: 0 });
  4652 + } else {
  4653 +
  4654 + var is_true = th.check_out_num_cart(gift_item, this.data.gift_pkid, gift_item.goods_num);
  4655 + if (!is_true) { return false; }
  4656 +
  4657 + th.setData({ [txt]: 1 });
  4658 + }
  4659 + },
  4660 +
  4661 +
  4662 + //输入框输入数量的时候
  4663 + valueToNum: function (e) {
  4664 + var th = this;
  4665 + var idx = e.currentTarget.dataset.item;
  4666 + var gift_item = this.data.giftsinfo[idx];
  4667 + var num = parseInt(e.detail.value);
  4668 + var txt = "giftsinfo[" + idx + "].goods_num";
  4669 + var is_true = th.check_out_num_cart(gift_item, this.data.gift_pkid, num);
  4670 + if (!is_true) {
  4671 + th.setData({ [txt]: 1 });
  4672 + return false;
  4673 + }
  4674 + th.setData({ [txt]: num });
  4675 +
  4676 + },
  4677 +
  4678 +
  4679 +
  4680 + addNum: function (e) {
  4681 + var th = this;
  4682 + var idx = e.currentTarget.dataset.item;
  4683 + var txt = "giftsinfo[" + idx + "].goods_num";
  4684 + var num = th.data.giftsinfo[idx].goods_num + 1;
  4685 + var gift_item = this.data.giftsinfo[idx];
  4686 + var is_true = th.check_out_num_cart(gift_item, this.data.gift_pkid, num);
  4687 + if (!is_true) { return false; }
  4688 + th.setData({ [txt]: num });
  4689 + },
  4690 +
  4691 + subNum: function (e) {
  4692 + var th = this;
  4693 + var idx = e.currentTarget.dataset.item;
  4694 + var txt = "giftsinfo[" + idx + "].goods_num";
  4695 + var num = th.data.giftsinfo[idx].goods_num - 1;
  4696 + var gift_item = this.data.giftsinfo[idx];
  4697 + var is_true = th.check_out_num_cart(gift_item, this.data.gift_pkid, num);
  4698 + if (!is_true) {
  4699 + return false;
  4700 + }
  4701 + if (num < 1) return false;
  4702 + th.setData({ [txt]: num });
  4703 + },
4562 4704
4563 //-- 点击选中赠品 -- 4705 //-- 点击选中赠品 --
4564 - show_sele_gift:function (e) {  
4565 - var index=e.currentTarget.dataset.index;  
4566 - var pk=e.currentTarget.dataset.pk;  
4567 - var giftsinfo=this.data.send_gf[pk][index].giftsinfo;  
4568 -  
4569 - for(let i in giftsinfo){  
4570 - let item=giftsinfo[i];  
4571 - if(!item.goods_num) giftsinfo[i].goods_num=1; 4706 + show_sele_gift: function (e) {
  4707 + var index = e.currentTarget.dataset.index;
  4708 + var pk = e.currentTarget.dataset.pk;
  4709 + var giftsinfo = this.data.send_gf[pk][index].giftsinfo;
  4710 +
  4711 + for (let i in giftsinfo) {
  4712 + let item = giftsinfo[i];
  4713 + if (!item.goods_num) giftsinfo[i].goods_num = 1;
4572 } 4714 }
4573 4715
4574 this.setData({ 4716 this.setData({
4575 - show_duo_gift:1,  
4576 - giftsinfo:giftsinfo,  
4577 - gf_pr_name:this.data.send_gf[pk][index].gf_pr_name,  
4578 - zp_num:this.data.send_gf[pk][index].zp_num,  
4579 - gift_pkid:pk,  
4580 - gf_prom_id:this.data.send_gf[pk][index].prom_id,  
4581 - send_gf_index:index 4717 + show_duo_gift: 1,
  4718 + giftsinfo: giftsinfo,
  4719 + gf_pr_name: this.data.send_gf[pk][index].gf_pr_name,
  4720 + zp_num: this.data.send_gf[pk][index].zp_num,
  4721 + gift_pkid: pk,
  4722 + gf_prom_id: this.data.send_gf[pk][index].prom_id,
  4723 + send_gf_index: index
4582 }) 4724 })
4583 }, 4725 },
4584 4726
4585 - close_sele_gift:function () {  
4586 - this.setData({show_duo_gift:0}) 4727 + close_sele_gift: function () {
  4728 + this.setData({ show_duo_gift: 0 })
4587 }, 4729 },
4588 4730
4589 //购物车赠品有咩有超出库存。有灭有超出限购 4731 //购物车赠品有咩有超出库存。有灭有超出限购
4590 - check_out_num_cart:function(discount,pick_id,num) {  
4591 - var prom_id= discount.prom_id;  
4592 - var alllist=this.data.cartlist;  
4593 - var all_num=num;  
4594 - var all_limit_num=num;  
4595 - var gift_id=discount.gift_id;  
4596 - for (var i in alllist) {  
4597 - var list_item = alllist[i];  
4598 - //-- 门店相同,活动相同的时候 --  
4599 - if(pick_id==list_item.pickup_id && prom_id==list_item.prom_id) continue;  
4600 - for (var j in list_item.goods) {  
4601 - //如果赠品的ID一样,要进行统计数量  
4602 - if (list_item.goods[j].is_gift == 1 &&  
4603 - list_item.goods[j].gift_id == gift_id) {  
4604 - all_num += list_item.goods[j].goods_num;  
4605 - }  
4606 - if (list_item.goods[j].is_gift == 1 && list_item.goods[j].gift_id ==gift_id && list_item.goods[j].prom_id == prom_id) {  
4607 - all_limit_num += list_item.goods[j].limit_num;  
4608 - }  
4609 - }  
4610 - }  
4611 - //-- 赠品的数量超出库存数量和会员的限制,  
4612 - // 这里是保证所有的赠品部会超出 --  
4613 - if (discount.gift_storecount < all_num ) {  
4614 - wx.showToast({  
4615 - title: "赠品库存不足",  
4616 - icon: 'none',  
4617 - duration: 2000  
4618 - });  
4619 - return false;  
4620 - }  
4621 - if (discount.limit_num < all_limit_num) {  
4622 - wx.showToast({  
4623 - title:"超出赠品限购",  
4624 - icon: 'none',  
4625 - duration: 2000  
4626 - });  
4627 - return false;  
4628 - }  
4629 - return true;  
4630 - },  
4631 -  
4632 - //-- 确定赠品 --  
4633 - sure_this_gift:async function () {  
4634 - var th = this;  
4635 - var gf_pickup_id = this.data.gift_pkid;  
4636 -  
4637 - var zp_num = this.data.zp_num;  
4638 - var giftsinfo = this.data.giftsinfo;  
4639 - var all_num = 0;  
4640 - for (let i in giftsinfo) {  
4641 - let item = giftsinfo[i];  
4642 - if (!item.selected) continue;  
4643 - all_num += item.goods_num;  
4644 - }  
4645 - if (all_num > zp_num) {  
4646 - wx.showToast({  
4647 - title: "超出活动赠品赠送的数量" + zp_num + "件",  
4648 - icon: 'none',  
4649 - duration: 2000  
4650 - });  
4651 - return false;  
4652 - }  
4653 - if (all_num < zp_num) {  
4654 - wx.showToast({  
4655 - title: "您还可以加" + (zp_num - all_num) + "件",  
4656 - icon: 'none',  
4657 - duration: 2000  
4658 - });  
4659 - return false;  
4660 - }  
4661 -  
4662 - //-- 当是购物车购买的时候 --  
4663 - if(this.data.cartlist && this.data.cartlist.length>0){  
4664 - var alllist = this.data.cartlist;  
4665 - var index = alllist.findIndex(function (e) {  
4666 - return e.pickup_id == gf_pickup_id  
4667 - });  
4668 - var pk_list_goods = alllist[index].goods;  
4669 -  
4670 - var url = "/api/weshop/cart/delGift?store_id=" + os.stoid + "&user_id="  
4671 - + getApp().globalData.user_id + "&is_gift=1&pick_id=" + this.data.gift_pkid + "&prom_id=" + this.data.prom_id;  
4672 - await getApp().request.promiseDelete(url, {});  
4673 -  
4674 - var new_pk_list_goods = [];  
4675 - for (let i in pk_list_goods) {  
4676 - let item = pk_list_goods[i];  
4677 - if (item.is_gift && item.prom_id == this.data.gf_prom_id) {  
4678 - continue;  
4679 - }  
4680 - new_pk_list_goods.push(item)  
4681 - }  
4682 -  
4683 - //-- 循环把赠品添加进去 --  
4684 - for (var i = 0; i < giftsinfo.length; i++) {  
4685 - var gf_item = giftsinfo[i];  
4686 - if (!gf_item.selected) continue;  
4687 - var add_data = null;  
4688 - var newd = {  
4689 - goods_id: gf_item.goodsinfo.goods_id,  
4690 - goods_num: gf_item.goods_num,  
4691 - pick_id: gf_pickup_id,  
4692 - user_id: app.globalData.user_id,  
4693 - store_id: os.stoid,  
4694 - goods_price: 0,  
4695 - member_goods_price: 0,  
4696 - goods_name: gf_item.goodsinfo.goods_name,  
4697 - goods_sn: gf_item.goodsinfo.goods_sn,  
4698 - sku: gf_item.goodsinfo.sku,  
4699 - is_gift: 1,  
4700 - prom_id: th.data.gf_prom_id,  
4701 - prom_type: 3,  
4702 - selected: 1,  
4703 - gift_id: gf_item.gift_id,  
4704 - original_img: th.data.imgUrl + gf_item.goodsinfo.original_img,  
4705 - exp_sum_type: gf_item.goodsinfo.exp_sum_type,  
4706 - is_free_shipping: gf_item.goodsinfo.is_free_shipping,  
4707 - weight: gf_item.goodsinfo.weight,  
4708 - uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,  
4709 - goods_spec: gf_item.goodsinfo.goods_spec,  
4710 - goods_color: gf_item.goodsinfo.goods_color,  
4711 - };  
4712 -  
4713 - await getApp().request.promisePost("/api/weshop/cart/save", {  
4714 - data: newd  
4715 - }).then(res => {  
4716 - if (res.data.code == 0) {  
4717 - add_data = res.data.data;  
4718 - }  
4719 - })  
4720 - if (add_data) {  
4721 - newd.id = add_data.id;  
4722 - new_pk_list_goods.push(newd);  
4723 - }  
4724 - }  
4725 -  
4726 - var set_data = this.data.send_gf[gf_pickup_id][this.data.send_gf_index];  
4727 - set_data.selected = 1;  
4728 - var txt9 = "cartlist[" + index + "].goods";  
4729 -  
4730 - th.setData({[txt9]: new_pk_list_goods, send_gf: this.data.send_gf});  
4731 - this.data.old_cartlist[index].goods = new_pk_list_goods;  
4732 -  
4733 -  
4734 - console.log(this.data.send_gf,"----");  
4735 -  
4736 - th.calculatePrice();  
4737 - }else{  
4738 - var new_pk_list_goods=[];  
4739 - //-- 当是立即购买的时候 --  
4740 - for (var i = 0; i < giftsinfo.length; i++) {  
4741 - var gf_item = giftsinfo[i];  
4742 - if (!gf_item.selected) continue;  
4743 - var newd = {  
4744 - goods_id: gf_item.goodsinfo.goods_id,  
4745 - buynum: gf_item.goods_num,  
4746 - pick_id: gf_pickup_id,  
4747 - user_id: app.globalData.user_id,  
4748 - store_id: os.stoid,  
4749 - goods_price: 0,  
4750 - member_goods_price: 0,  
4751 - goods_name: gf_item.goodsinfo.goods_name,  
4752 - goods_sn: gf_item.goodsinfo.goods_sn,  
4753 - sku: gf_item.goodsinfo.sku,  
4754 - is_gift: 1,  
4755 - prom_id: th.data.gf_prom_id,  
4756 - prom_type: 3,  
4757 - selected: 1,  
4758 - gift_id: gf_item.gift_id,  
4759 - original_img: th.data.imgUrl + gf_item.goodsinfo.original_img,  
4760 - exp_sum_type: gf_item.goodsinfo.exp_sum_type,  
4761 - is_free_shipping: gf_item.goodsinfo.is_free_shipping,  
4762 - weight: gf_item.goodsinfo.weight,  
4763 - uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,  
4764 - uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,  
4765 - goods_spec: gf_item.goodsinfo.goods_spec,  
4766 - goods_color: gf_item.goodsinfo.goods_color,  
4767 - };  
4768 - new_pk_list_goods.push(newd);  
4769 - }  
4770 - var set_data = this.data.send_gf[th.data.bn_pick][this.data.send_gf_index];  
4771 - set_data.selected = 1;  
4772 - var txt1 = "send_gf[" + gf_pickup_id + "][" + this.data.send_gf_index + "]";  
4773 -  
4774 - th.setData({buy_now_gift_goods:new_pk_list_goods,[txt1]:set_data});  
4775 - th.calculatePrice2();  
4776 -  
4777 - }  
4778 - th.close_sele_gift();  
4779 - },  
4780 -  
4781 - //获取输入  
4782 - getInput:function (e) {  
4783 - this.data.gift_sear=e.detail.value;  
4784 - },  
4785 - //-- 搜索赠品 --  
4786 - submitSearch:function () {  
4787 - var giftsinfo=this.data.giftsinfo;  
4788 - if(!this.data.gift_sear){  
4789 - for(let i in giftsinfo){  
4790 - let item=giftsinfo[i];  
4791 - item.hide_div=0;  
4792 - }  
4793 - }else{  
4794 - for(let i in giftsinfo){  
4795 - let item=giftsinfo[i];  
4796 - item.hide_div=0;  
4797 - if(item.goods_name.indexOf(this.data.gift_sear)==-1){  
4798 - item.hide_div=1;  
4799 - }  
4800 - }  
4801 - }  
4802 - this.setData({giftsinfo:giftsinfo})  
4803 -  
4804 - },  
4805 -  
4806 - //-- 赠品的验证 --  
4807 - sub_check_gift(func){  
4808 - var th=this;  
4809 - if(th.data.send_gf){  
4810 - var error_arr=[];  
4811 - for(let io in th.data.send_gf){  
4812 - let item_arr=th.data.send_gf[io];  
4813 - for(let ip in item_arr){  
4814 - var gf_pr_name=item_arr[ip].gf_pr_name;  
4815 - var zp_num=item_arr[ip].zp_num;  
4816 - var giftsinfo=item_arr[ip].giftsinfo;  
4817 - var limit_all=0;  
4818 - var stock_all=0;  
4819 - for(let iu in giftsinfo){  
4820 - let gf_item=giftsinfo[iu];  
4821 - limit_all+=gf_item.limit_num;  
4822 - stock_all+=gf_item.gift_storecount;  
4823 - }  
4824 - if(limit_all<zp_num){  
4825 - error_arr.push(gf_pr_name+"限购不足");  
4826 - }  
4827 - if(stock_all<zp_num){  
4828 - error_arr.push(gf_pr_name+"赠品库存不足");  
4829 - }  
4830 - }  
4831 - }  
4832 -  
4833 - //-- 有赠品错误的时候,是不是继续下单 --  
4834 - if(error_arr.length){  
4835 - var err=error_arr.join(",");  
4836 - wx.showModal({  
4837 - title: '提示',  
4838 - content: err+',无法赠送赠品,是否继续下单',  
4839 - success (res) {  
4840 - if (res.confirm) {  
4841 - func();  
4842 - } else if (res.cancel) {  
4843 - console.log('用户点击取消');  
4844 - th.setData({  
4845 - submit:0,  
4846 - })  
4847 - }  
4848 - }  
4849 - })  
4850 - }else {  
4851 -  
4852 - var is_ok = 1;  
4853 - var error_arr = [];  
4854 - for (let io in th.data.send_gf) {  
4855 - let item_arr1 = th.data.send_gf[io];  
4856 - for (let ip1 in item_arr1) {  
4857 - var item_b = item_arr1[ip1];  
4858 - if (!item_b.selected) {  
4859 - is_ok = 0;  
4860 - break;  
4861 - }  
4862 - }  
4863 - if (!is_ok) break;  
4864 - }  
4865 -  
4866 - if (!is_ok) {  
4867 - getApp().confirmBox("请选择赠品");  
4868 - th.setData({  
4869 - submit:0,  
4870 - })  
4871 - return false;  
4872 - }  
4873 - func();  
4874 - }  
4875 -  
4876 -  
4877 - }else{  
4878 - func();  
4879 - }  
4880 - } 4732 + check_out_num_cart: function (discount, pick_id, num) {
  4733 + var prom_id = discount.prom_id;
  4734 + var alllist = this.data.cartlist;
  4735 + var all_num = num;
  4736 + var all_limit_num = num;
  4737 + var gift_id = discount.gift_id;
  4738 + for (var i in alllist) {
  4739 + var list_item = alllist[i];
  4740 + //-- 门店相同,活动相同的时候 --
  4741 + if (pick_id == list_item.pickup_id && prom_id == list_item.prom_id) continue;
  4742 + for (var j in list_item.goods) {
  4743 + //如果赠品的ID一样,要进行统计数量
  4744 + if (list_item.goods[j].is_gift == 1 &&
  4745 + list_item.goods[j].gift_id == gift_id) {
  4746 + all_num += list_item.goods[j].goods_num;
  4747 + }
  4748 + if (list_item.goods[j].is_gift == 1 && list_item.goods[j].gift_id == gift_id && list_item.goods[j].prom_id == prom_id) {
  4749 + all_limit_num += list_item.goods[j].limit_num;
  4750 + }
  4751 + }
  4752 + }
  4753 + //-- 赠品的数量超出库存数量和会员的限制,
  4754 + // 这里是保证所有的赠品部会超出 --
  4755 + if (discount.gift_storecount < all_num) {
  4756 + wx.showToast({
  4757 + title: "赠品库存不足",
  4758 + icon: 'none',
  4759 + duration: 2000
  4760 + });
  4761 + return false;
  4762 + }
  4763 + if (discount.limit_num < all_limit_num) {
  4764 + wx.showToast({
  4765 + title: "超出赠品限购",
  4766 + icon: 'none',
  4767 + duration: 2000
  4768 + });
  4769 + return false;
  4770 + }
  4771 + return true;
  4772 + },
  4773 +
  4774 + //-- 确定赠品 --
  4775 + sure_this_gift: async function () {
  4776 + var th = this;
  4777 + var gf_pickup_id = this.data.gift_pkid;
  4778 +
  4779 + var zp_num = this.data.zp_num;
  4780 + var giftsinfo = this.data.giftsinfo;
  4781 + var all_num = 0;
  4782 + for (let i in giftsinfo) {
  4783 + let item = giftsinfo[i];
  4784 + if (!item.selected) continue;
  4785 + all_num += item.goods_num;
  4786 + }
  4787 + if (all_num > zp_num) {
  4788 + wx.showToast({
  4789 + title: "超出活动赠品赠送的数量" + zp_num + "件",
  4790 + icon: 'none',
  4791 + duration: 2000
  4792 + });
  4793 + return false;
  4794 + }
  4795 + if (all_num < zp_num) {
  4796 + wx.showToast({
  4797 + title: "您还可以加" + (zp_num - all_num) + "件",
  4798 + icon: 'none',
  4799 + duration: 2000
  4800 + });
  4801 + return false;
  4802 + }
  4803 +
  4804 + //-- 当是购物车购买的时候 --
  4805 + if (this.data.cartlist && this.data.cartlist.length > 0) {
  4806 + var alllist = this.data.cartlist;
  4807 + var index = alllist.findIndex(function (e) {
  4808 + return e.pickup_id == gf_pickup_id
  4809 + });
  4810 + var pk_list_goods = alllist[index].goods;
  4811 +
  4812 + var url = "/api/weshop/cart/delGift?store_id=" + os.stoid + "&user_id="
  4813 + + getApp().globalData.user_id + "&is_gift=1&pick_id=" + this.data.gift_pkid + "&prom_id=" + this.data.prom_id;
  4814 + await getApp().request.promiseDelete(url, {});
  4815 +
  4816 + var new_pk_list_goods = [];
  4817 + for (let i in pk_list_goods) {
  4818 + let item = pk_list_goods[i];
  4819 + if (item.is_gift && item.prom_id == this.data.gf_prom_id) {
  4820 + continue;
  4821 + }
  4822 + new_pk_list_goods.push(item)
  4823 + }
  4824 +
  4825 + //-- 循环把赠品添加进去 --
  4826 + for (var i = 0; i < giftsinfo.length; i++) {
  4827 + var gf_item = giftsinfo[i];
  4828 + if (!gf_item.selected) continue;
  4829 + var add_data = null;
  4830 + var newd = {
  4831 + goods_id: gf_item.goodsinfo.goods_id,
  4832 + goods_num: gf_item.goods_num,
  4833 + pick_id: gf_pickup_id,
  4834 + user_id: app.globalData.user_id,
  4835 + store_id: os.stoid,
  4836 + goods_price: 0,
  4837 + member_goods_price: 0,
  4838 + goods_name: gf_item.goodsinfo.goods_name,
  4839 + goods_sn: gf_item.goodsinfo.goods_sn,
  4840 + sku: gf_item.goodsinfo.sku,
  4841 + is_gift: 1,
  4842 + prom_id: th.data.gf_prom_id,
  4843 + prom_type: 3,
  4844 + selected: 1,
  4845 + gift_id: gf_item.gift_id,
  4846 + original_img: th.data.imgUrl + gf_item.goodsinfo.original_img,
  4847 + exp_sum_type: gf_item.goodsinfo.exp_sum_type,
  4848 + is_free_shipping: gf_item.goodsinfo.is_free_shipping,
  4849 + weight: gf_item.goodsinfo.weight,
  4850 + uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,
  4851 + goods_spec: gf_item.goodsinfo.goods_spec,
  4852 + goods_color: gf_item.goodsinfo.goods_color,
  4853 + };
  4854 +
  4855 + await getApp().request.promisePost("/api/weshop/cart/save", {
  4856 + data: newd
  4857 + }).then(res => {
  4858 + if (res.data.code == 0) {
  4859 + add_data = res.data.data;
  4860 + }
  4861 + })
  4862 + if (add_data) {
  4863 + newd.id = add_data.id;
  4864 + new_pk_list_goods.push(newd);
  4865 + }
  4866 + }
  4867 +
  4868 + var set_data = this.data.send_gf[gf_pickup_id][this.data.send_gf_index];
  4869 + set_data.selected = 1;
  4870 + var txt9 = "cartlist[" + index + "].goods";
  4871 +
  4872 + th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf });
  4873 + this.data.old_cartlist[index].goods = new_pk_list_goods;
  4874 +
  4875 +
  4876 + console.log(this.data.send_gf, "----");
  4877 +
  4878 + th.calculatePrice();
  4879 + } else {
  4880 + var new_pk_list_goods = [];
  4881 + //-- 当是立即购买的时候 --
  4882 + for (var i = 0; i < giftsinfo.length; i++) {
  4883 + var gf_item = giftsinfo[i];
  4884 + if (!gf_item.selected) continue;
  4885 + var newd = {
  4886 + goods_id: gf_item.goodsinfo.goods_id,
  4887 + buynum: gf_item.goods_num,
  4888 + pick_id: gf_pickup_id,
  4889 + user_id: app.globalData.user_id,
  4890 + store_id: os.stoid,
  4891 + goods_price: 0,
  4892 + member_goods_price: 0,
  4893 + goods_name: gf_item.goodsinfo.goods_name,
  4894 + goods_sn: gf_item.goodsinfo.goods_sn,
  4895 + sku: gf_item.goodsinfo.sku,
  4896 + is_gift: 1,
  4897 + prom_id: th.data.gf_prom_id,
  4898 + prom_type: 3,
  4899 + selected: 1,
  4900 + gift_id: gf_item.gift_id,
  4901 + original_img: th.data.imgUrl + gf_item.goodsinfo.original_img,
  4902 + exp_sum_type: gf_item.goodsinfo.exp_sum_type,
  4903 + is_free_shipping: gf_item.goodsinfo.is_free_shipping,
  4904 + weight: gf_item.goodsinfo.weight,
  4905 + uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,
  4906 + uniform_exp_sum: gf_item.goodsinfo.uniform_exp_sum,
  4907 + goods_spec: gf_item.goodsinfo.goods_spec,
  4908 + goods_color: gf_item.goodsinfo.goods_color,
  4909 + };
  4910 + new_pk_list_goods.push(newd);
  4911 + }
  4912 + var set_data = this.data.send_gf[th.data.bn_pick][this.data.send_gf_index];
  4913 + set_data.selected = 1;
  4914 + var txt1 = "send_gf[" + gf_pickup_id + "][" + this.data.send_gf_index + "]";
  4915 +
  4916 + th.setData({ buy_now_gift_goods: new_pk_list_goods, [txt1]: set_data });
  4917 + th.calculatePrice2();
  4918 +
  4919 + }
  4920 + th.close_sele_gift();
  4921 + },
  4922 +
  4923 + //获取输入
  4924 + getInput: function (e) {
  4925 + this.data.gift_sear = e.detail.value;
  4926 + },
  4927 + //-- 搜索赠品 --
  4928 + submitSearch: function () {
  4929 + var giftsinfo = this.data.giftsinfo;
  4930 + if (!this.data.gift_sear) {
  4931 + for (let i in giftsinfo) {
  4932 + let item = giftsinfo[i];
  4933 + item.hide_div = 0;
  4934 + }
  4935 + } else {
  4936 + for (let i in giftsinfo) {
  4937 + let item = giftsinfo[i];
  4938 + item.hide_div = 0;
  4939 + if (item.goods_name.indexOf(this.data.gift_sear) == -1) {
  4940 + item.hide_div = 1;
  4941 + }
  4942 + }
  4943 + }
  4944 + this.setData({ giftsinfo: giftsinfo })
  4945 +
  4946 + },
  4947 +
  4948 + //-- 赠品的验证 --
  4949 + sub_check_gift(func) {
  4950 + var th = this;
  4951 + if (th.data.send_gf) {
  4952 + var error_arr = [];
  4953 + for (let io in th.data.send_gf) {
  4954 + let item_arr = th.data.send_gf[io];
  4955 + for (let ip in item_arr) {
  4956 + var gf_pr_name = item_arr[ip].gf_pr_name;
  4957 + var zp_num = item_arr[ip].zp_num;
  4958 + var giftsinfo = item_arr[ip].giftsinfo;
  4959 + var limit_all = 0;
  4960 + var stock_all = 0;
  4961 + for (let iu in giftsinfo) {
  4962 + let gf_item = giftsinfo[iu];
  4963 + limit_all += gf_item.limit_num;
  4964 + stock_all += gf_item.gift_storecount;
  4965 + }
  4966 + if (limit_all < zp_num) {
  4967 + error_arr.push(gf_pr_name + "限购不足");
  4968 + }
  4969 + if (stock_all < zp_num) {
  4970 + error_arr.push(gf_pr_name + "赠品库存不足");
  4971 + }
  4972 + }
  4973 + }
  4974 +
  4975 + //-- 有赠品错误的时候,是不是继续下单 --
  4976 + if (error_arr.length) {
  4977 + var err = error_arr.join(",");
  4978 + wx.showModal({
  4979 + title: '提示',
  4980 + content: err + ',无法赠送赠品,是否继续下单',
  4981 + success(res) {
  4982 + if (res.confirm) {
  4983 + func();
  4984 + } else if (res.cancel) {
  4985 + console.log('用户点击取消');
  4986 + th.setData({
  4987 + submit: 0,
  4988 + })
  4989 + }
  4990 + }
  4991 + })
  4992 + } else {
  4993 +
  4994 + var is_ok = 1;
  4995 + var error_arr = [];
  4996 + for (let io in th.data.send_gf) {
  4997 + let item_arr1 = th.data.send_gf[io];
  4998 + for (let ip1 in item_arr1) {
  4999 + var item_b = item_arr1[ip1];
  5000 + if (!item_b.selected) {
  5001 + is_ok = 0;
  5002 + break;
  5003 + }
  5004 + }
  5005 + if (!is_ok) break;
  5006 + }
  5007 +
  5008 + if (!is_ok) {
  5009 + getApp().confirmBox("请选择赠品");
  5010 + th.setData({
  5011 + submit: 0,
  5012 + })
  5013 + return false;
  5014 + }
  5015 + func();
  5016 + }
  5017 +
  5018 +
  5019 + } else {
  5020 + func();
  5021 + }
  5022 + }
4881 5023
4882 5024
4883 5025
pages/cart/cart2/cart2.wxml
@@ -8,24 +8,20 @@ @@ -8,24 +8,20 @@
8 <block wx:if="{{is_b_now==1}}"> 8 <block wx:if="{{is_b_now==1}}">
9 <view class="tab-container"> 9 <view class="tab-container">
10 <view class="tab-wrapper"> 10 <view class="tab-wrapper">
11 - <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype2' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"  
12 - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> 11 + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype2' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">门店自提</view>
13 12
14 - <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype2' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}"  
15 - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> 13 + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype2' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view>
16 14
17 </view> 15 </view>
18 </view> 16 </view>
19 </block> 17 </block>
20 - <!-- 购物购买只有一单的时候 --> 18 + <!-- 购物购买只有一单的时候 -->
21 <block wx:if="{{is_b_now==0 && cartlist.length==1}}"> 19 <block wx:if="{{is_b_now==0 && cartlist.length==1}}">
22 <view class="tab-container"> 20 <view class="tab-container">
23 <view class="tab-wrapper"> 21 <view class="tab-wrapper">
24 - <view hidden="{{cartlist[0].distr_t==2}}" bindtap='setexptype_w2' data-ind="0" data-t='1' class="tab {{cartlist[0].exp_type == 1? 'active':''}}"  
25 - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> 22 + <view hidden="{{cartlist[0].distr_t==2}}" bindtap='setexptype_w2' data-ind="0" data-t='1' class="tab {{cartlist[0].exp_type == 1? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">门店自提</view>
26 23
27 - <view hidden="{{cartlist[0].distr_t==1}}" bindtap='setexptype_w2' data-ind="0" data-t='0' class="tab {{cartlist[0].exp_type== 0 ? 'active':''}}"  
28 - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> 24 + <view hidden="{{cartlist[0].distr_t==1}}" bindtap='setexptype_w2' data-ind="0" data-t='0' class="tab {{cartlist[0].exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view>
29 25
30 </view> 26 </view>
31 </view> 27 </view>
@@ -82,7 +78,7 @@ @@ -82,7 +78,7 @@
82 <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image> 78 <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image>
83 </view> 79 </view>
84 <!----商品名称规格----> 80 <!----商品名称规格---->
85 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}&prom_type={{items.prom_type}}&prom_id={{items.prom_id}}" > 81 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}&prom_type={{items.prom_type}}&prom_id={{items.prom_id}}">
86 <view class="goods-name ellipsis-2">{{items.goods_name}}</view> 82 <view class="goods-name ellipsis-2">{{items.goods_name}}</view>
87 <!-- 商品属性 --> 83 <!-- 商品属性 -->
88 <view class="flex-vertical fs28 color-gray n_guige"> 84 <view class="flex-vertical fs28 color-gray n_guige">
@@ -104,8 +100,9 @@ @@ -104,8 +100,9 @@
104 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}"> 100 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}">
105 <view class="flex"> 101 <view class="flex">
106 <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> 102 <view class="card_bg ellipsis-1" style="margin-right: 10rpx;">
107 - <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image>  
108 - <text class="card_name">{{show_card.CardName}}</text> 103 + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png">
  104 + </ image>
  105 + <text class="card_name">{{show_card.CardName}}</text>
109 </view> 106 </view>
110 <view>立减 <text style="color:#f23030;">{{filters.toFix(item.card_cut_price,2) }}</text> 元</view> 107 <view>立减 <text style="color:#f23030;">{{filters.toFix(item.card_cut_price,2) }}</text> 元</view>
111 </view> 108 </view>
@@ -119,19 +116,7 @@ @@ -119,19 +116,7 @@
119 </view> 116 </view>
120 117
121 118
122 - <!-----使用优惠券------>  
123 - <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}"  
124 - data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}">  
125 - <view class="work-frame flex-space-between">  
126 - <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view>  
127 - <view class="xc-right-frame">  
128 - <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text>  
129 - <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text>  
130 - <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text>  
131 - <view class="xc-right"></view>  
132 - </view>  
133 - </view>  
134 - </view> 119 +
135 120
136 121
137 <view class="set-mes bdr_b-14"> 122 <view class="set-mes bdr_b-14">
@@ -142,9 +127,8 @@ @@ -142,9 +127,8 @@
142 127
143 <!-- 当是物流很多单的时候 --> 128 <!-- 当是物流很多单的时候 -->
144 <view class="use-item flex-space-between" wx:if="{{cartlist.length>1}}"> 129 <view class="use-item flex-space-between" wx:if="{{cartlist.length>1}}">
145 - <view class="flex-vertical" >  
146 - <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type'  
147 - style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> 130 + <view class="flex-vertical">
  131 + <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};">
148 <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> 132 <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->
149 133
150 <block wx:if="{{item.exp_type==1}}"> 134 <block wx:if="{{item.exp_type==1}}">
@@ -166,14 +150,13 @@ @@ -166,14 +150,13 @@
166 <view class="circle xc-hookts on"></view> 150 <view class="circle xc-hookts on"></view>
167 </block> 151 </block>
168 152
169 - <view bindtap='setexptype_w2' data-t='0' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind'  
170 - class="yu_er">快递邮寄</view> 153 + <view bindtap='setexptype_w2' data-t='0' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind' class="yu_er">快递邮寄</view>
171 </view> 154 </view>
172 </view> 155 </view>
173 156
174 157
175 <!-- 点击显示物流选择,如果是默认使用的情况不成立 --> 158 <!-- 点击显示物流选择,如果是默认使用的情况不成立 -->
176 - <view wx:if="{{!is_default_logistics && item.exp_type!=1}}" class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;"> 159 + <view wx:if="{{!is_default_logistics && item.exp_type!=1}}" class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">
177 <view>{{wu_arr[item.wind].name}}</view> 160 <view>{{wu_arr[item.wind].name}}</view>
178 <view class="xc-right"></view> 161 <view class="xc-right"></view>
179 </view> 162 </view>
@@ -181,69 +164,92 @@ @@ -181,69 +164,92 @@
181 </view> 164 </view>
182 165
183 <!-- 当是物流,只有一单的时候 --> 166 <!-- 当是物流,只有一单的时候 -->
184 - <block wx:else >  
185 - <view class="use-item flex-space-between" wx:if="{{item.exp_type==0 && !is_default_logistics}}">  
186 - <view class="flex jc_sb" style="width: 100%; padding: 0 13rpx;">  
187 - <view>选择物流</view>  
188 - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">  
189 - <view>{{wu_arr[item.wind].name}}</view>  
190 - <view class="xc-right"></view> 167 + <block wx:else>
  168 + <view class="use-item flex-space-between" wx:if="{{item.exp_type==0 && !is_default_logistics}}">
  169 + <view class="flex jc_sb" style="width: 100%; padding: 0 13rpx;">
  170 + <view>选择物流</view>
  171 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">
  172 + <view>{{wu_arr[item.wind].name}}</view>
  173 + <view class="xc-right"></view>
  174 + </view>
191 </view> 175 </view>
192 </view> 176 </view>
193 - </view>  
194 </block> 177 </block>
195 </view> 178 </view>
196 179
  180 + <!-- 有送礼包 -->
  181 + <view wx:if="{{send_lb[item.pickup_id]}}">
  182 + <block wx:for="{{send_lb[item.pickup_id]}}" wx:key="id" wx:for-item="send">
  183 + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{send.id}}" data-flag="{{send.flag}}" bindtap="viewLbDetails">
  184 + <view class="flex ai_c">
  185 + <view class="circle1">赠</view>{{send.zxlbtitle?send.zxlbtitle:send.lbtitle}}
  186 + <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} -->
  187 + </view>
  188 + <view class="flex ai_c">
  189 + x{{send.num}}<text class="bg_jj"></text>
  190 + </view>
  191 + </view>
  192 + </block>
  193 + </view>
197 194
198 <!-- 赠品的显示 --> 195 <!-- 赠品的显示 -->
199 <view wx:if="{{send_gf[item.pickup_id]}}"> 196 <view wx:if="{{send_gf[item.pickup_id]}}">
200 <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter"> 197 <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter">
201 - <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx"  
202 - data-pk="{{item.pickup_id}}" data-index="{{index}}"  
203 - bindtap="show_sele_gift" >  
204 - <view class="flex ai_c">  
205 - <view class="circle1">赠</view>{{iter.name}} 可选赠品{{iter.zp_num}}个  
206 - </view> 198 + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-pk="{{item.pickup_id}}" data-index="{{index}}" bindtap="show_sele_gift">
  199 + <view class="flex ai_c">
  200 + <view class="circle1">赠</view>{{iter.name}} 可选赠品{{iter.zp_num}}个
  201 + </view>
207 202
208 - <view class="flex ai_c" wx:if="{{iter.selected}}">  
209 - 已选择<text class="bg_jj"></text>  
210 - </view> 203 + <view class="flex ai_c" wx:if="{{iter.selected}}">
  204 + 已选择<text class="bg_jj"></text>
  205 + </view>
211 206
212 - <view class="flex ai_c" wx:else="{{}}"> 207 + <view class="flex ai_c" wx:else="{{}}">
213 未选择<text class="bg_jj"></text> 208 未选择<text class="bg_jj"></text>
214 - </view> 209 + </view>
215 210
216 - </view> 211 + </view>
217 </block> 212 </block>
218 </view> 213 </view>
219 214
  215 + <!-----使用优惠券------>
  216 + <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}">
  217 + <view class="work-frame flex-space-between">
  218 + <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view>
  219 + <view class="xc-right-frame">
  220 + <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text>
  221 + <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text>
  222 + <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text>
  223 + <view class="xc-right"></view>
  224 + </view>
  225 + </view>
  226 + </view>
  227 +
220 228
221 <!-- 留言 --> 229 <!-- 留言 -->
222 <view class="coupon-mes flex-vertical"> 230 <view class="coupon-mes flex-vertical">
223 <view>留言</view> 231 <view>留言</view>
224 <view class="leave-word"> 232 <view class="leave-word">
225 - <input placeholder="给商家留言,最多100字" bindinput="keyUpChangeNum"  
226 - data-index="{{pidx}}" value="{{user_note[pidx]}}"  
227 - class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}" /> 233 + <input placeholder="给商家留言,最多100字" bindinput="keyUpChangeNum" data-index="{{pidx}}" value="{{user_note[pidx]}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}" />
228 234
229 </view> 235 </view>
230 </view> 236 </view>
231 237
232 - <!-- 是否参与店铺优惠 -->  
233 - <view class="coupon-mes flex-vertical" data-index="{{index}}" bindtap="cart_pop_offline" wx:if="{{item.offline_price}}">  
234 - <view>店铺优惠</view>  
235 - <view class="leave-word fs32" style="color: #999;">  
236 - 省{{filters.toFix(item.offline_price,2)}}元  
237 - </view>  
238 - <block wx:if="{{item.is_offline}}">  
239 - <text style="color: #d7642b;">-¥{{filters.toFix(item.offline_price,2)}}</text>  
240 - </block>  
241 - <block wx:else>  
242 - <text style="color: #d7642b;">不使用优惠</text>  
243 - </block>  
244 - <!-- 右边点击 -->  
245 - <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view>  
246 - </view> 238 + <!-- 是否参与店铺优惠 -->
  239 + <view class="coupon-mes flex-vertical" data-index="{{index}}" bindtap="cart_pop_offline" wx:if="{{item.offline_price}}">
  240 + <view>店铺优惠</view>
  241 + <view class="leave-word fs32" style="color: #999;">
  242 + 省{{filters.toFix(item.offline_price,2)}}元
  243 + </view>
  244 + <block wx:if="{{item.is_offline}}">
  245 + <text style="color: #d7642b;">-¥{{filters.toFix(item.offline_price,2)}}</text>
  246 + </block>
  247 + <block wx:else>
  248 + <text style="color: #d7642b;">不使用优惠</text>
  249 + </block>
  250 + <!-- 右边点击 -->
  251 + <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view>
  252 + </view>
247 253
248 </view> 254 </view>
249 255
@@ -286,27 +292,27 @@ @@ -286,27 +292,27 @@
286 </view> 292 </view>
287 <!-- 赠品的显示 --> 293 <!-- 赠品的显示 -->
288 <block wx:if="{{buy_now_gift_goods}}"> 294 <block wx:if="{{buy_now_gift_goods}}">
289 - <view class="order-detail" wx:for="{{buy_now_gift_goods}}" >  
290 - <view class="goods-img" style="position: relative">  
291 - <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> 295 + <view class="order-detail" wx:for="{{buy_now_gift_goods}}">
  296 + <view class="goods-img" style="position: relative">
  297 + <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
292 298
293 - <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="item.original_img"></image>  
294 - </view>  
295 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">  
296 - <view class="goods-name ellipsis-2">{{item.goods_name}}</view>  
297 - <!-- 商品属性 -->  
298 - <view class="flex-vertical fs28 xc-ash color-gray n_guige">  
299 - <view class="goods-color">  
300 - <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block>  
301 - </view> 299 + <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="item.original_img"></image>
302 </view> 300 </view>
303 - <!-- ---商品名称规格---- -->  
304 - <view class="order-num flex-space-between">  
305 - <view class="co-red">¥<text class="fs36">0</text></view>  
306 - <view class="goods-num">x{{item.buynum}}</view>  
307 - </view>  
308 - </navigator>  
309 - </view> 301 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  302 + <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
  303 + <!-- 商品属性 -->
  304 + <view class="flex-vertical fs28 xc-ash color-gray n_guige">
  305 + <view class="goods-color">
  306 + <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block>
  307 + </view>
  308 + </view>
  309 + <!-- ---商品名称规格---- -->
  310 + <view class="order-num flex-space-between">
  311 + <view class="co-red">¥<text class="fs36">0</text></view>
  312 + <view class="goods-num">x{{item.buynum}}</view>
  313 + </view>
  314 + </navigator>
  315 + </view>
310 </block> 316 </block>
311 317
312 318
@@ -333,12 +339,13 @@ @@ -333,12 +339,13 @@
333 </view> 339 </view>
334 </block> 340 </block>
335 341
336 - <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> 342 + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
337 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> 343 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
338 <view class="flex"> 344 <view class="flex">
339 <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> 345 <view class="card_bg ellipsis-1" style="margin-right: 10rpx;">
340 - <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image>  
341 - <text class="card_name">{{show_card.CardName}}</text> 346 + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png">
  347 + </ image>
  348 + <text class="card_name">{{show_card.CardName}}</text>
342 </view> 349 </view>
343 <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view> 350 <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view>
344 </view> 351 </view>
@@ -351,6 +358,55 @@ @@ -351,6 +358,55 @@
351 <view bindtap="buycard" class="card_op">立即开通</view> 358 <view bindtap="buycard" class="card_op">立即开通</view>
352 </view> 359 </view>
353 360
  361 + <!-- 有送礼包 -->
  362 + <view wx:if="{{bn_goods.s_libao}}">
  363 + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.s_libao}}" bindtap="viewLbDetails">
  364 + <view class="flex ai_c">
  365 + <view class="circle1">赠</view>{{bn_goods.lbtitle}}
  366 + <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} -->
  367 + </view>
  368 + <view class="flex ai_c">
  369 + x{{bn_goods.s_lb_num}}<text class="bg_jj"></text>
  370 + </view>
  371 + </view>
  372 + </view>
  373 + <!-- 有送专享礼包 -->
  374 + <view wx:if="{{bn_goods.zx_libao}}">
  375 + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.zx_libao}}" data-flag="1" bindtap="viewLbDetails">
  376 + <view class="flex ai_c">
  377 + <view class="circle1">赠</view>{{bn_goods.zxlbtitle}}
  378 + <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} -->
  379 + </view>
  380 + <view class="flex ai_c">
  381 + x{{bn_goods.zx_lb_num}}<text class="bg_jj"></text>
  382 + </view>
  383 + </view>
  384 + </view>
  385 +
  386 +
  387 + <!-- 赠品的显示 -->
  388 + <view wx:if="{{send_gf[bn_pick]}}">
  389 + <block wx:for="{{send_gf[bn_pick]}}" wx:for-item="iter">
  390 + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-pk="{{bn_pick}}" data-index="{{index}}" bindtap="show_sele_gift">
  391 + <view class="flex ai_c">
  392 + <view class="circle1">赠</view>{{iter.name}} 可选赠品{{iter.zp_num}}个
  393 + </view>
  394 +
  395 + <view class="flex ai_c" wx:if="{{iter.selected}}">
  396 + 已选择<text class="bg_jj"></text>
  397 + </view>
  398 +
  399 + <view class="flex ai_c" wx:else="{{}}">
  400 + 未选择<text class="bg_jj"></text>
  401 + </view>
  402 +
  403 + </view>
  404 + </block>
  405 + </view>
  406 +
  407 +
  408 +
  409 +
354 <view class="set-mes bdr_b-14"> 410 <view class="set-mes bdr_b-14">
355 411
356 <view wx:if="{{order.store_prom}}"> 412 <view wx:if="{{order.store_prom}}">
@@ -377,41 +433,20 @@ @@ -377,41 +433,20 @@
377 <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> 433 <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;">
378 <view>选择物流</view> 434 <view>选择物流</view>
379 <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> 435 <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;">
380 - <view class="logistics-name">{{wu_arr[index].name}}</view>  
381 - <view class="xc-right"></view> 436 + <view class="logistics-name">{{wu_arr[index].name}}</view>
  437 + <view class="xc-right"></view>
382 </view> 438 </view>
383 </view> 439 </view>
384 </view> 440 </view>
385 </view> 441 </view>
386 442
387 - <!-- 赠品的显示 -->  
388 - <view wx:if="{{send_gf[bn_pick]}}">  
389 - <block wx:for="{{send_gf[bn_pick]}}" wx:for-item="iter">  
390 - <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx"  
391 - data-pk="{{bn_pick}}" data-index="{{index}}"  
392 - bindtap="show_sele_gift" >  
393 - <view class="flex ai_c">  
394 - <view class="circle1">赠</view>{{iter.name}} 可选赠品{{iter.zp_num}}个  
395 - </view>  
396 -  
397 - <view class="flex ai_c" wx:if="{{iter.selected}}">  
398 - 已选择<text class="bg_jj"></text>  
399 - </view>  
400 443
401 - <view class="flex ai_c" wx:else="{{}}">  
402 - 未选择<text class="bg_jj"></text>  
403 - </view>  
404 -  
405 - </view>  
406 - </block>  
407 - </view>  
408 444
409 <!-- 留言 --> 445 <!-- 留言 -->
410 <view class="coupon-mes flex-vertical"> 446 <view class="coupon-mes flex-vertical">
411 <view>留言</view> 447 <view>留言</view>
412 <view class="leave-word"> 448 <view class="leave-word">
413 - <input placeholder-class="fs28" placeholder='给商家留言,最多100字' data-index="{{index}}" bindinput="keyUpChangeNum"  
414 - class="word-box" maxlength="100" name="user_note"></input> 449 + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' data-index="{{index}}" bindinput="keyUpChangeNum" class="word-box" maxlength="100" name="user_note"></input>
415 </view> 450 </view>
416 </view> 451 </view>
417 452
@@ -422,10 +457,10 @@ @@ -422,10 +457,10 @@
422 省{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}元 457 省{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}元
423 </view> 458 </view>
424 <block wx:if="{{bn_goods.is_offline}}"> 459 <block wx:if="{{bn_goods.is_offline}}">
425 - <text style="color: #d7642b;">-¥{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}</text> 460 + <text style="color: #d7642b;">-¥{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}</text>
426 </block> 461 </block>
427 <block wx:else> 462 <block wx:else>
428 - <text style="color: #d7642b;">不使用优惠</text> 463 + <text style="color: #d7642b;">不使用优惠</text>
429 </block> 464 </block>
430 <!-- 右边点击 --> 465 <!-- 右边点击 -->
431 <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view> 466 <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view>
@@ -487,7 +522,7 @@ @@ -487,7 +522,7 @@
487 <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> 522 <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view>
488 <!-- <view class="co-red big"></view> --> 523 <!-- <view class="co-red big"></view> -->
489 </view> 524 </view>
490 - <button class="tips-btn" formType="submit" id="submitOrder" disabled="{{submit}}" bindtap="requestSubscribe">提交订单</button> 525 + <button class="tips-btn" formType="submit" id="submitOrder" disabled="{{submit}}" bindtap="requestSubscribe">提交订单</button>
491 </view> 526 </view>
492 </form> 527 </form>
493 528
@@ -519,8 +554,7 @@ @@ -519,8 +554,7 @@
519 <!-- 中间券内容显示 --> 554 <!-- 中间券内容显示 -->
520 <view class="xc-frame flex-level"> 555 <view class="xc-frame flex-level">
521 <view class="list-frame"> 556 <view class="list-frame">
522 - <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}"  
523 - wx:for-item="item" wx:for-index="q_index"> 557 + <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}" wx:for-item="item" wx:for-index="q_index">
524 <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> 558 <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}">
525 <view class="coupon-frame flex rel"> 559 <view class="coupon-frame flex rel">
526 <!-- 锯齿 --> 560 <!-- 锯齿 -->
@@ -561,8 +595,7 @@ @@ -561,8 +595,7 @@
561 </view> 595 </view>
562 <!-- 包邮券的显示,立即购买 --> 596 <!-- 包邮券的显示,立即购买 -->
563 <block wx:if="{{ is_b_now && bn_exp_type==0}}"> 597 <block wx:if="{{ is_b_now && bn_exp_type==0}}">
564 - <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}"  
565 - wx:for-item="item" wx:for-index="byq_index"> 598 + <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index">
566 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> 599 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
567 <view class="coupon-frame flex rel"> 600 <view class="coupon-frame flex rel">
568 <!-- 锯齿 --> 601 <!-- 锯齿 -->
@@ -605,8 +638,7 @@ @@ -605,8 +638,7 @@
605 638
606 <!-- 包邮券的显示,购物车购买 --> 639 <!-- 包邮券的显示,购物车购买 -->
607 <block wx:if="{{!is_b_now && sele_exp_type==0}}"> 640 <block wx:if="{{!is_b_now && sele_exp_type==0}}">
608 - <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}"  
609 - wx:for-item="item" wx:for-index="byq_index"> 641 + <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index">
610 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> 642 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
611 <view class="coupon-frame flex rel"> 643 <view class="coupon-frame flex rel">
612 <!-- 锯齿 --> 644 <!-- 锯齿 -->
@@ -672,8 +704,7 @@ @@ -672,8 +704,7 @@
672 </view> 704 </view>
673 <view class="express_list"> 705 <view class="express_list">
674 <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> 706 <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx">
675 - <view class="express_list_frame" bindtap="click_express_name" data-shippingcode="{{express_list.shipping_code}}"  
676 - data-name="{{express_list.name}}" data-idxe="{{idx}}"> 707 + <view class="express_list_frame" bindtap="click_express_name" data-shippingcode="{{express_list.shipping_code}}" data-name="{{express_list.name}}" data-idxe="{{idx}}">
677 708
678 <block wx:if="{{is_express==idx}}"> 709 <block wx:if="{{is_express==idx}}">
679 <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> 710 <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>
@@ -703,77 +734,77 @@ @@ -703,77 +734,77 @@
703 <view style="background-color: #fff; width: 540rpx; margin: 0 auto; border-radius: 20rpx;"> 734 <view style="background-color: #fff; width: 540rpx; margin: 0 auto; border-radius: 20rpx;">
704 <view class="fs32" style="text-align: center;height: 80rpx; line-height: 80rpx;">店铺优惠</view> 735 <view class="fs32" style="text-align: center;height: 80rpx; line-height: 80rpx;">店铺优惠</view>
705 <view class="flex jc_sb ai-center fs28" style="height: 80rpx; width: 400rpx; margin-left: 70rpx;"> 736 <view class="flex jc_sb ai-center fs28" style="height: 80rpx; width: 400rpx; margin-left: 70rpx;">
706 - <view catchtap="sure_offline" class="flex ai-center" >优惠¥{{show_off_price}}  
707 - <icon style="margin-left: 10rpx;" color="{{is_get_offline?'red':'gray'}}" size="14" type="success" role="img"></icon></view>  
708 - <view catchtap="cancle_offline" class="flex ai-center" >不用优惠  
709 - <icon style="margin-left: 10rpx;" color="{{is_get_offline!=1?'red':'gray'}}" size="14" type="success" role="img"></icon> </view> 737 + <view catchtap="sure_offline" class="flex ai-center">优惠¥{{show_off_price}}
  738 + <icon style="margin-left: 10rpx;" color="{{is_get_offline?'red':'gray'}}" size="14" type="success" role="img"></icon>
  739 + </view>
  740 + <view catchtap="cancle_offline" class="flex ai-center">不用优惠
  741 + <icon style="margin-left: 10rpx;" color="{{is_get_offline!=1?'red':'gray'}}" size="14" type="success" role="img"></icon>
  742 + </view>
710 </view> 743 </view>
711 </view> 744 </view>
712 </view> 745 </view>
713 746
714 <!-- 多赠品 --> 747 <!-- 多赠品 -->
715 <view class="duo_gift_sele" wx:if="{{show_duo_gift}}"> 748 <view class="duo_gift_sele" wx:if="{{show_duo_gift}}">
716 - <!-- top search --> 749 + <!-- top search -->
717 <view class="flex gift_top_v ai_c"> 750 <view class="flex gift_top_v ai_c">
718 - <text bindtap="close_sele_gift" class="bg_jj1"></text> 751 + <text bindtap="close_sele_gift" class="bg_jj1"></text>
719 <view class="pdh20 pdv10 flex ai_c jc_sb"> 752 <view class="pdh20 pdv10 flex ai_c jc_sb">
720 <view class="input-box" style="width: 580rpx;display: flex; padding-left: 20rpx"> 753 <view class="input-box" style="width: 580rpx;display: flex; padding-left: 20rpx">
721 <view class="sear_box" bindtap="submitSearch"></view> 754 <view class="sear_box" bindtap="submitSearch"></view>
722 - <input autoFocus class="input-search" name="word" placeholder="搜索关键字" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}"/> 755 + <input autoFocus class="input-search" name="word" placeholder="搜索关键字" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}" />
723 </view> 756 </view>
724 </view> 757 </view>
725 758
726 - </view> 759 + </view>
727 <!-- top act_name --> 760 <!-- top act_name -->
728 <view class="flex gift_top_v ai_c fs30" style="padding-left: 70rpx"> 761 <view class="flex gift_top_v ai_c fs30" style="padding-left: 70rpx">
729 {{gf_pr_name}},可任选{{zp_num}}件商品为赠品 762 {{gf_pr_name}},可任选{{zp_num}}件商品为赠品
730 </view> 763 </view>
731 <!-- 赠品选择 --> 764 <!-- 赠品选择 -->
732 <scroll-view scroll-y="{{true}}" style="height:calc(100% - 300rpx);"> 765 <scroll-view scroll-y="{{true}}" style="height:calc(100% - 300rpx);">
733 - <view class="order-item" hidden="{{items.hide_div}}" data-item="{{idx}}" wx:for="{{giftsinfo}}" wx:for-item="items" wx:for-index="idx"> 766 + <view class="order-item" hidden="{{items.hide_div}}" data-item="{{idx}}" wx:for="{{giftsinfo}}" wx:for-item="items" wx:for-index="idx">
734 767
735 - <view bindtap="check_th_item" class="order-raido flex-vertical " data-check="{{items.selected?items.selected:0}}" data-item="{{idx}}">  
736 - <icon wx:if="{{items.selected}}" color="red" size="20" type="success"></icon>  
737 - <text wx:else class="icon_no_sele"></text>  
738 - </view> 768 + <view bindtap="check_th_item" class="order-raido flex-vertical " data-check="{{items.selected?items.selected:0}}" data-item="{{idx}}">
  769 + <icon wx:if="{{items.selected}}" color="red" size="20" type="success"></icon>
  770 + <text wx:else class="icon_no_sele"></text>
  771 + </view>
  772 +
  773 + <navigator class="goods-img rel" bindtap="go_gd" data-gd="{{items.goods_id}}">
  774 + <image class="wh100" src="{{imgUrl+items.goodsinfo.original_img}}" binderror="bind_bnerr2" data-errorimg="gift_goods[{{idx}}].goodsinfo.original_img"></image>
  775 + </navigator>
  776 + <view class="goods-cont">
  777 + <view class="goods-name">
  778 + <navigator bindtap="go_gd" class="ellipsis-2 fs30" data-gd="{{items.goods_id}}">{{items.goods_name}}</navigator>
739 779
740 - <navigator class="goods-img rel" bindtap="go_gd" data-gd="{{items.goods_id}}">  
741 - <image class="wh100" src="{{imgUrl+items.goodsinfo.original_img}}" binderror="bind_bnerr2" data-errorimg="gift_goods[{{idx}}].goodsinfo.original_img"></image>  
742 - </navigator>  
743 - <view class="goods-cont">  
744 - <view class="goods-name">  
745 - <navigator bindtap="go_gd" class="ellipsis-2 fs30" data-gd="{{items.goods_id}}">{{items.goods_name}}</navigator>  
746 -  
747 - <view class="specifications ellipsis-1">  
748 - <view wx:if="{{items.goodsinfo.goods_color || items.goodsinfo.goods_spec}}">  
749 - {{items.goodsinfo.goods_color}}{{items.goodsinfo.goods_color?"/":''}}{{items.goodsinfo.goods_spec}}</view>  
750 - <view wx:else>规格1</view> 780 + <view class="specifications ellipsis-1">
  781 + <view wx:if="{{items.goodsinfo.goods_color || items.goodsinfo.goods_spec}}">
  782 + {{items.goodsinfo.goods_color}}{{items.goodsinfo.goods_color?"/":''}}{{items.goodsinfo.goods_spec}}</view>
  783 + <view wx:else>规格1</view>
  784 + </view>
751 </view> 785 </view>
752 - </view>  
753 786
754 - <view class="flex alend jc_sb"> 787 + <view class="flex alend jc_sb">
755 <view class="goods-price co-red baseline ellipsis-1"> 788 <view class="goods-price co-red baseline ellipsis-1">
756 <view class="fs20">¥</view> 789 <view class="fs20">¥</view>
757 <view class="fs28">{{items.goodsinfo.shop_price}}</view> 790 <view class="fs28">{{items.goodsinfo.shop_price}}</view>
758 </view> 791 </view>
759 <view class="count"> 792 <view class="count">
760 <view bindtap="{{items.goods_num <= 1 ? '':'subNum'}}" class="sub fs28 {{items.goods_num <= 1 ? 'active':''}}" data-pitems="{{pidx}}" data-item="{{idx}}">一</view> 793 <view bindtap="{{items.goods_num <= 1 ? '':'subNum'}}" class="sub fs28 {{items.goods_num <= 1 ? 'active':''}}" data-pitems="{{pidx}}" data-item="{{idx}}">一</view>
761 - <input class="goodadd" bindblur="valueToNum" data-item="{{idx}}"  
762 - bindinput="refresh_input" data-item="{{idx}}" type="number" value="{{items.goods_num}}"></input>  
763 - <view class="add" bindtap="addNum" data-item="{{idx}}">+</view> 794 + <input class="goodadd" bindblur="valueToNum" data-item="{{idx}}" bindinput="refresh_input" data-item="{{idx}}" type="number" value="{{items.goods_num}}"></input>
  795 + <view class="add" bindtap="addNum" data-item="{{idx}}">+</view>
764 </view> 796 </view>
765 </view> 797 </view>
766 798
  799 + </view>
767 </view> 800 </view>
768 - </view>  
769 </scroll-view> 801 </scroll-view>
770 - <!-- 确认选择 --> 802 + <!-- 确认选择 -->
771 <view class="pay-for flex-vertical-between" style="bottom: 0"> 803 <view class="pay-for flex-vertical-between" style="bottom: 0">
772 <view></view> 804 <view></view>
773 <view> 805 <view>
774 - <button bindtap="sure_this_gift" class="pay-btn">确定</button> 806 + <button bindtap="sure_this_gift" class="pay-btn">确定</button>
775 </view> 807 </view>
776 </view> 808 </view>
777 809
778 -</view>  
779 - 810 +</view>
780 \ No newline at end of file 811 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -70,6 +70,7 @@ Page({ @@ -70,6 +70,7 @@ Page({
70 onLoad: function (options) { 70 onLoad: function (options) {
71 this.setData({ 71 this.setData({
72 params: options, 72 params: options,
  73 + now:Date.parse(new Date()) / 1000,
73 }) 74 })
74 75
75 }, 76 },
pages/giftpack/buygiftpack/giftpackbuy.wxml
1 -<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};"> 1 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
  2 +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};">
2 <block wx:if="{{ad_data}}"> 3 <block wx:if="{{ad_data}}">
3 <view class="top_img"> 4 <view class="top_img">
4 - <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> 5 + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
5 </view> 6 </view>
6 </block> 7 </block>
7 <block wx:else> 8 <block wx:else>
8 - <view class="top_img">  
9 - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>  
10 - </view>  
11 - </block>  
12 -  
13 -  
14 - <view class="top_title">  
15 - <view class="top_title_box">  
16 - <text class="top_title_redtext">礼包列表</text>  
17 - </view>  
18 - <view class="top_title_box_S"></view>  
19 - <view class="top_title_box">  
20 - <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a>  
21 - </view>  
22 - </view>  
23 - <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">  
24 - <view class="content_box">  
25 - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''">  
26 - <view class="content_box_img">  
27 - <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}"  
28 - data-errorimg="wareCard[{{index}}].cover_img"></image>  
29 - <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else  
30 - data-errorimg="wareCard[{{index}}].lbUrl"></image>  
31 - </view>  
32 - <view class="content_box_title">  
33 - <view class="content_ware_title">  
34 - <text>{{items.giftTitle}}</text>  
35 - </view>  
36 - <view class="content_ware_type flex">  
37 - <block wx:if="{{items.payMoney>0}}">  
38 - <text>{{"¥"+items.payMoney}}</text>  
39 - </block>  
40 - <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}">  
41 - <text>/</text>  
42 - </block>  
43 - <block wx:if="{{items.payIntegral>0}}">  
44 - <view class="flex">  
45 - <text class="ellipsis-1">{{items.payIntegral}}</text>  
46 - <view>积分</view>  
47 - </view>  
48 - </block>  
49 - </view>  
50 - <view class="content_ware_price">  
51 - <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text>  
52 - </view>  
53 - <view class="content_ware_time">  
54 - <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text>  
55 - </view>  
56 - </view>  
57 - </view>  
58 - <view class="content_box_button">  
59 - <view class="box_button_remark">  
60 - <text>{{"已售:"+items.giftQty+"件"}}</text>  
61 - </view>  
62 - <view class="flex-vertical">  
63 - <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">  
64 - <block wx:if="{{items.payMoney>0}}">  
65 - <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">  
66 - <button class="box_button_dui">立即购买</button>  
67 - </view>  
68 - </block>  
69 - <block wx:if="{{items.payIntegral>0}}">  
70 - <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">  
71 - <button class="box_button_dui box_button_buy">立即兑换</button>  
72 - </view>  
73 - </block>  
74 - </block>  
75 - <block wx:else>  
76 - <block wx:if="{{items.payMoney>0}}">  
77 - <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">  
78 - <button class="box_button_dui box_button_buy">立即购买</button>  
79 - </view>  
80 - </block>  
81 - <block wx:if="{{items.payIntegral>0}}">  
82 - <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">  
83 - <button class="box_button_dui box_button_buy">立即兑换</button>  
84 - </view>  
85 - </block>  
86 - </block>  
87 - <block wx:if="{{!items.payMoney && !items.payIntegral}}">  
88 - <view class="flex" bindtap="GetFree" data-index="{{index}}">  
89 - <button class="box_button_dui box_button_buy">免费领取</button>  
90 - </view>  
91 - </block> 9 + <view class="top_img">
  10 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  11 + </view>
  12 + </block>
92 13
93 - </view>  
94 - </view>  
95 - </view>  
96 - </block>  
97 - <block wx:if="{{is_read && wareCard.length<1 && is_get}}">  
98 - <view class="foot_empty">  
99 - <view>  
100 - <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>  
101 - </view>  
102 - <view>  
103 - <text>当前暂无礼包</text>  
104 - </view>  
105 - <view class="foot_empty_button">  
106 - <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text>  
107 - </view>  
108 - </view>  
109 - </block>  
110 - <!-- 加载完毕并且数据大于=页大小 -->  
111 - <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">  
112 - <view class="Line"></view>  
113 - <view class="end fs26">到底了</view>  
114 - <view class="Line"></view>  
115 - </view> 14 +
  15 + <view class="top_title">
  16 + <view class="top_title_box">
  17 + <text class="top_title_redtext">礼包列表</text>
  18 + </view>
  19 + <view class="top_title_box_S"></view>
  20 + <view class="top_title_box">
  21 + <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a>
  22 + </view>
  23 + </view>
  24 + <block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">
  25 + <view class="content_box">
  26 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''">
  27 + <view class="content_box_img">
  28 + <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image>
  29 + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image>
  30 + </view>
  31 + <view class="content_box_title">
  32 + <view class="content_ware_title">
  33 + <text>{{items.giftTitle}}</text>
  34 + </view>
  35 + <view class="content_ware_type flex">
  36 + <block wx:if="{{items.payMoney>0}}">
  37 + <text>{{"¥"+items.payMoney}}</text>
  38 + </block>
  39 + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}">
  40 + <text>/</text>
  41 + </block>
  42 + <block wx:if="{{items.payIntegral>0}}">
  43 + <view class="flex">
  44 + <text class="ellipsis-1">{{items.payIntegral}}</text>
  45 + <view>积分</view>
  46 + </view>
  47 + </block>
  48 + </view>
  49 + <view class="content_ware_price">
  50 + <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text>
  51 + </view>
  52 + <view wx:if="{{items.is_show && now < filter.gettimestamp(items.starTime)}}" class="content_ware_time">
  53 + <text class="ellipsis-1">{{"活动开始时间:"+items.starTime}}</text>
  54 + </view>
  55 + <view wx:else class="content_ware_time">
  56 + <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text>
  57 + </view>
  58 + </view>
  59 + </view>
  60 + <view class="content_box_button">
  61 + <view class="box_button_remark">
  62 + <text>{{"已售:"+items.giftQty+"件"}}</text>
  63 + </view>
  64 + <block wx:if="{{now > filter.gettimestamp(items.starTime)}}">
  65 + <view class="flex-vertical">
  66 + <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">
  67 + <block wx:if="{{items.payMoney>0}}">
  68 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
  69 + <button class="box_button_dui">立即购买</button>
  70 + </view>
  71 + </block>
  72 + <block wx:if="{{items.payIntegral>0}}">
  73 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
  74 + <button class="box_button_dui box_button_buy">立即兑换</button>
  75 + </view>
  76 + </block>
  77 + </block>
  78 + <block wx:else>
  79 + <block wx:if="{{items.payMoney>0}}">
  80 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
  81 + <button class="box_button_dui box_button_buy">立即购买</button>
  82 + </view>
  83 + </block>
  84 + <block wx:if="{{items.payIntegral>0}}">
  85 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
  86 + <button class="box_button_dui box_button_buy">立即兑换</button>
  87 + </view>
  88 + </block>
  89 + </block>
  90 + <block wx:if="{{!items.payMoney && !items.payIntegral}}">
  91 + <view class="flex" bindtap="GetFree" data-index="{{index}}">
  92 + <button class="box_button_dui box_button_buy">免费领取</button>
  93 + </view>
  94 + </block>
  95 + </view>
  96 + </block>
  97 + <block wx:else>
  98 + <view class="flex-vertical" style="color: #666;">
  99 + <button class="box_button_dui box_button_buy" style="background-color: #666;">活动还未开始</button>
  100 + </view>
  101 + </block>
  102 + </view>
  103 + </view>
  104 + </block>
  105 + <block wx:if="{{is_read && wareCard.length<1 && is_get}}">
  106 + <view class="foot_empty">
  107 + <view>
  108 + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
  109 + </view>
  110 + <view>
  111 + <text>当前暂无礼包</text>
  112 + </view>
  113 + <view class="foot_empty_button">
  114 + <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text>
  115 + </view>
  116 + </view>
  117 + </block>
  118 + <!-- 加载完毕并且数据大于=页大小 -->
  119 + <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
  120 + <view class="Line"></view>
  121 + <view class="end fs26">到底了</view>
  122 + <view class="Line"></view>
  123 + </view>
116 </view> 124 </view>
117 <!-- 引入提示组件 --> 125 <!-- 引入提示组件 -->
118 <warn id="warn"></warn> 126 <warn id="warn"></warn>
pages/giftpack/giftpacklist/giftpacklist.js
@@ -333,6 +333,9 @@ Page({ @@ -333,6 +333,9 @@ Page({
333 333
334 334
335 var sele_g=res.data.data; 335 var sele_g=res.data.data;
  336 + //需不需要门店,不需要门店返回
  337 + if(!sele_g.is_pickup) return false;
  338 +
336 com.wait_for_store_config(_this2); 339 com.wait_for_store_config(_this2);
337 com.set_user_mo_store(_this2,os,function () { 340 com.set_user_mo_store(_this2,os,function () {
338 if(sele_g.pickup_list && _this2.data.def_pick_store){ 341 if(sele_g.pickup_list && _this2.data.def_pick_store){
pages/giftpack/public/buy_com.js
@@ -227,7 +227,7 @@ module.exports = { @@ -227,7 +227,7 @@ module.exports = {
227 json.guide_id=that.data.guide_id 227 json.guide_id=that.data.guide_id
228 } 228 }
229 229
230 - if(that.data.def_pick_store){ 230 + if(th.data.sele_g.is_pickup && that.data.def_pick_store){
231 json.pickup_id=that.data.def_pick_store.pickup_id; 231 json.pickup_id=that.data.def_pick_store.pickup_id;
232 } 232 }
233 233
pages/goods/categoryList/categoryList.js
@@ -99,8 +99,8 @@ Page({ @@ -99,8 +99,8 @@ Page({
99 //-- user_id代过来免登录 -- 99 //-- user_id代过来免登录 --
100 getApp().globalData.first_leader=first_leader; 100 getApp().globalData.first_leader=first_leader;
101 } 101 }
102 -  
103 - 102 +
  103 + if(tt.type) this.data.type= parseInt(tt.type);
104 that.get_brand(); 104 that.get_brand();
105 105
106 clearInterval(that.data.timer); 106 clearInterval(that.data.timer);
@@ -267,18 +267,20 @@ Page({ @@ -267,18 +267,20 @@ Page({
267 else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); } 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(); } 268 else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); }
269 269
  270 +
  271 + var t_type=that.data.type;
270 //----求传参过来的控制----- 272 //----求传参过来的控制-----
271 - if (getApp().globalData.cat_type == 1 && that.data.is_show_gb ) {  
272 - that.setData({ currentTab: 1 }); 273 + if (t_type == 1 && that.data.is_show_gb ) {
  274 + that.setData({ currentTab: 1,select_classify_on:223 });
273 that.get_nation(); 275 that.get_nation();
274 - } else if (getApp().globalData.cat_type == 2 && that.data.is_show_pp ) {  
275 - that.setData({ currentTab: 2 }); 276 + } else if (t_type == 2 && that.data.is_show_pp ) {
  277 + that.setData({ currentTab: 2,select_classify_on:220});
276 that.get_brand(); 278 that.get_brand();
277 - } else if (getApp().globalData.cat_type == 3 && that.data.is_show_xm ) {  
278 - that.setData({ currentTab: 3 }); 279 + } else if (t_type == 3 && that.data.is_show_xm ) {
  280 + that.setData({ currentTab: 3,select_classify_on:221 });
279 that.getServiceCategory(); 281 that.getServiceCategory();
280 } else if (that.data.is_show_pl) { 282 } else if (that.data.is_show_pl) {
281 - that.setData({ currentTab: 0 }); 283 + that.setData({ currentTab: 0,select_classify_on:0 });
282 } 284 }
283 // 获取默认选中的第一个 285 // 获取默认选中的第一个
284 if(that.data.is_show_gb && that.data.select_classify_on == 223){ 286 if(that.data.is_show_gb && that.data.select_classify_on == 223){
@@ -370,6 +372,38 @@ Page({ @@ -370,6 +372,38 @@ Page({
370 } 372 }
371 //console.log(arr) 373 //console.log(arr)
372 t.setData({one_level_classify:arr}); 374 t.setData({one_level_classify:arr});
  375 + if(t.data.select_classify_on==0){
  376 + var item=arr[0];
  377 +
  378 + var name = item.items.name;
  379 + var cid = item.items.cid;
  380 + var arr = item.array;
  381 +
  382 +
  383 + if (arr.length == 0) {
  384 + t.setData({
  385 + select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid,
  386 + goodslist: null, is_level_three: 0
  387 + });
  388 + return false;
  389 + }
  390 + if (arr.length != 0) {
  391 + var is_lev_thr = 0
  392 + for (var i = 0; i < arr.length; i++) {
  393 + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; }
  394 + }
  395 + t.setData({ is_level_three: is_lev_thr });
  396 +
  397 + if (this.data.is_level_three != 1) {
  398 + t.setData({ index: 0, classify_name: name, goodslist: arr });
  399 + } else {
  400 + t.setData({ index: 0, goodslist: arr });
  401 + }
  402 + }
  403 +
  404 + t.style(t.data.stylePage, cid)
  405 +
  406 + }
373 407
374 } 408 }
375 } 409 }
pages/goods/goodsInfo/goodsInfo.js
@@ -5054,6 +5054,7 @@ Page({ @@ -5054,6 +5054,7 @@ Page({
5054 var type = this.data.prom_type; 5054 var type = this.data.prom_type;
5055 if (type == 2) type = -1; 5055 if (type == 2) type = -1;
5056 if (type == 6) type = 2; // 6拼团 2团购 5056 if (type == 6) type = 2; // 6拼团 2团购
  5057 + if (type == 10) type = -1;
5057 5058
5058 5059
5059 if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; 5060 if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3;
@@ -5159,8 +5160,7 @@ Page({ @@ -5159,8 +5160,7 @@ Page({
5159 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); 5160 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
5160 } 5161 }
5161 5162
5162 - }  
5163 - ; 5163 + };
5164 5164
5165 5165
5166 var share_title = th.data.data.goods_name; 5166 var share_title = th.data.data.goods_name;
pages/goods/search/search.js
1 -var t = function(t) { 1 +var t = function (t) {
2 return t && t.__esModule ? t : { 2 return t && t.__esModule ? t : {
3 default: t 3 default: t
4 }; 4 };
5 }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"), 5 }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"),
6 - a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting; 6 + a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;
7 7
8 Page({ 8 Page({
9 data: { 9 data: {
@@ -18,31 +18,32 @@ Page({ @@ -18,31 +18,32 @@ Page({
18 requestUrl: "", 18 requestUrl: "",
19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ] 19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
20 hotWords: null, 20 hotWords: null,
21 - is_no_plus:1, 21 + is_no_plus: 1,
22 tabname: "sort", //排序的字段 22 tabname: "sort", //排序的字段
23 adname: "asc", //升降的字段 23 adname: "asc", //升降的字段
24 - rq_data:null,  
25 - searchRecord: [],  
26 - keyword: '',  
27 - is_his:0,  
28 - hiddenClear: true, 24 + rq_data: null,
  25 + searchRecord: [],
  26 + keyword: '',
  27 + is_his: 0,
  28 + hiddenClear: true,
  29 + fliter_flag: false,
29 }, 30 },
30 -  
31 - onLoad: function(t) {  
32 - this.data.rq_data=t;  
33 - if(t.o) {  
34 - this.data.rq_data.o = JSON.parse(t.o);  
35 - };  
36 -  
37 - 31 +
  32 + onLoad: function (t) {
  33 + this.data.rq_data = t;
  34 + if (t.o) {
  35 + this.data.rq_data.o = JSON.parse(t.o);
  36 + };
  37 +
  38 +
38 //接受有没有导购的参数 39 //接受有没有导购的参数
39 - var first_leader=t.first_leader;  
40 - if(first_leader){  
41 - getApp().globalData.first_leader=first_leader; 40 + var first_leader = t.first_leader;
  41 + if (first_leader) {
  42 + getApp().globalData.first_leader = first_leader;
42 //调用接口判断是不是会员 43 //调用接口判断是不是会员
43 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{  
44 - if(res.data.code==0){  
45 - getApp().globalData.guide_id=res.data.data.id; 44 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {
  45 + if (res.data.code == 0) {
  46 + getApp().globalData.guide_id = res.data.data.id;
46 } 47 }
47 }) 48 })
48 } 49 }
@@ -63,145 +64,145 @@ Page({ @@ -63,145 +64,145 @@ Page({
63 } 64 }
64 }) 65 })
65 66
66 - var th=this;  
67 - a.getConfig2(function(rs) {  
68 - var arr=new Array(),arr2=new Array();  
69 - if (rs.hot_keywords != null && ut.trim(rs.hot_keywords)!="" ){  
70 - var arr1 = rs.hot_keywords.split('|');  
71 - for (var i = 0; i < arr1.length;i++){  
72 - if(i%5==0 && i!=0){  
73 - arr.push(arr2);  
74 - arr2=[];  
75 - }else{  
76 - arr2.push(arr1[i]); 67 + var th = this;
  68 + a.getConfig2(function (rs) {
  69 + var arr = new Array(), arr2 = new Array();
  70 + if (rs.hot_keywords != null && ut.trim(rs.hot_keywords) != "") {
  71 + var arr1 = rs.hot_keywords.split('|');
  72 + for (var i = 0; i < arr1.length; i++) {
  73 + if (i % 5 == 0 && i != 0) {
  74 + arr.push(arr2);
  75 + arr2 = [];
  76 + } else {
  77 + arr2.push(arr1[i]);
  78 + }
77 } 79 }
  80 + if (arr2.length > 0) arr.push(arr2);
  81 + th.setData({ hotWords: arr });
78 } 82 }
79 - if (arr2.length > 0) arr.push(arr2);  
80 - th.setData({ hotWords: arr});  
81 - }  
82 -  
83 -  
84 - //计算等级价相关  
85 - var swithc_list=rs.switch_list;  
86 - var sw_arr=JSON.parse(swithc_list);  
87 - //---如果后台又开等级卡的开关---  
88 - if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){  
89 - th.setData({rank_switch:true});  
90 - var user=getApp().globalData.userInfo;  
91 - var ti=setInterval(function(){  
92 - if(!user) return false;  
93 - clearInterval(ti);  
94 - //---回调卡的列表---  
95 - th.getPlusCardType(function(ob){  
96 - th.setData({card_list:ob.card_list});  
97 - if(user.card_field ){  
98 - var str = user['card_expiredate'].replace(/-/g, '/');  
99 - var end = new Date(str);  
100 - end = Date.parse(end) / 1000;  
101 - var now = ut.gettimestamp();  
102 -  
103 - //--- 判断是等级会员,且在有效期范围内 ---  
104 - if(user.card_field && now<end){  
105 - var card_name=ob.name_map.get(user.card_field);  
106 - if(card_name && card_name.length>7) card_name=card_name.substring(0,8);  
107 - th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list});  
108 - }  
109 - }  
110 - })  
111 - },500)  
112 - }  
113 -  
114 -  
115 -  
116 - })  
117 - //e.init(this, "", "requestData");  
118 - var url = this.data.baseUrl;  
119 -  
120 - //扫一扫过来,显示搜索的内容  
121 - var s_key = t.s_key;  
122 - if (s_key){  
123 - s_key=s_key.trim();  
124 - this.search(s_key); this.openSearchModal();  
125 - return;  
126 - }  
127 -  
128 - if (0 != t.brand_id && t.brand_id!=undefined){ url += "&brand_id=" + t.brand_id;}  
129 - if (0 != t.nation_id && t.nation_id!=undefined) { url += "&nation_id=" + t.nation_id;}  
130 - if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;}  
131 - if (0 != t.ladder_id && t.ladder_id != undefined) {  
132 - url += "&ladder_id=" + t.ladder_id;  
133 - this.setData({  
134 - baseUrl:url, 83 +
  84 +
  85 + //计算等级价相关
  86 + var swithc_list = rs.switch_list;
  87 + var sw_arr = JSON.parse(swithc_list);
  88 + //---如果后台又开等级卡的开关---
  89 + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
  90 + th.setData({ rank_switch: true });
  91 + var user = getApp().globalData.userInfo;
  92 + var ti = setInterval(function () {
  93 + if (!user) return false;
  94 + clearInterval(ti);
  95 + //---回调卡的列表---
  96 + th.getPlusCardType(function (ob) {
  97 + th.setData({ card_list: ob.card_list });
  98 + if (user.card_field) {
  99 + var str = user['card_expiredate'].replace(/-/g, '/');
  100 + var end = new Date(str);
  101 + end = Date.parse(end) / 1000;
  102 + var now = ut.gettimestamp();
  103 +
  104 + //--- 判断是等级会员,且在有效期范围内 ---
  105 + if (user.card_field && now < end) {
  106 + var card_name = ob.name_map.get(user.card_field);
  107 + if (card_name && card_name.length > 7) card_name = card_name.substring(0, 8);
  108 + th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });
  109 + }
  110 + }
  111 + })
  112 + }, 500)
  113 + }
  114 +
  115 +
  116 +
135 }) 117 })
136 - }  
137 - if (url != this.data.baseUrl) return this.requestSearch(url);  
138 - this.openSearchModal(); 118 + //e.init(this, "", "requestData");
  119 + var url = this.data.baseUrl;
  120 +
  121 + //扫一扫过来,显示搜索的内容
  122 + var s_key = t.s_key;
  123 + if (s_key) {
  124 + s_key = s_key.trim();
  125 + this.search(s_key); this.openSearchModal();
  126 + return;
  127 + }
  128 +
  129 + if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }
  130 + if (0 != t.nation_id && t.nation_id != undefined) { url += "&nation_id=" + t.nation_id; }
  131 + if (0 != t.max_price && t.max_price != undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price; }
  132 + if (0 != t.ladder_id && t.ladder_id != undefined) {
  133 + url += "&ladder_id=" + t.ladder_id;
  134 + this.setData({
  135 + baseUrl: url,
  136 + })
  137 + }
  138 + if (url != this.data.baseUrl) return this.requestSearch(url);
  139 + this.openSearchModal();
139 // 获取历史搜索记录 140 // 获取历史搜索记录
140 - this.getHistorySearch(); 141 + this.getHistorySearch();
141 }, 142 },
142 143
143 - onShow:function () { 144 + onShow: function () {
144 getApp().check_can_share(); 145 getApp().check_can_share();
145 }, 146 },
146 147
147 - changeTab: function(t) {  
148 - var ord = t.currentTarget.dataset.href;  
149 - var ad = t.currentTarget.dataset.ad; 148 + changeTab: function (t) {
  149 + var ord = t.currentTarget.dataset.href;
  150 + var ad = t.currentTarget.dataset.ad;
150 151
151 - var url = this.data.requestUrl; 152 + var url = this.data.requestUrl;
152 153
153 - if (this.data.tabname != ord) {  
154 - this.setData({ tabname: ord, adname: "desc" });  
155 - } else {  
156 - ad = ad == "desc" ? "asc" : "desc";  
157 - this.setData({ adname: ad });  
158 - }  
159 - this.resetData(), this.requestSearch(url); 154 + if (this.data.tabname != ord) {
  155 + this.setData({ tabname: ord, adname: "desc" });
  156 + } else {
  157 + ad = ad == "desc" ? "asc" : "desc";
  158 + this.setData({ adname: ad });
  159 + }
  160 + this.resetData(), this.requestSearch(url);
160 161
161 }, 162 },
162 163
163 //-----------真的调用地址进行搜索------------ 164 //-----------真的调用地址进行搜索------------
164 - requestSearch: function(t) {  
165 - // console.log('t===>', t);  
166 - if(this.data.loading) return false;  
167 - this.data.loading=1;  
168 - var e = this,th=e;  
169 - if(getApp().globalData.userInfo) {  
170 - t += "&user_id=" + getApp().globalData.userInfo.user_id;  
171 - } 165 + requestSearch: function (t) {
  166 + // console.log('t===>', t);
  167 + if (this.data.loading) return false;
  168 + this.data.loading = 1;
  169 + var e = this, th = e;
  170 + if (getApp().globalData.userInfo) {
  171 + t += "&user_id=" + getApp().globalData.userInfo.user_id;
  172 + }
172 this.data.requestUrl = t; 173 this.data.requestUrl = t;
173 174
174 - var user_id=getApp().globalData.user_id;  
175 - if(!user_id) user_id=0;  
176 - let data = {  
177 - is_mainshow: 1,  
178 - isonsale: 1,  
179 - store_id: oo.stoid,  
180 - orderField: e.data.tabname,  
181 - orderType: e.data.adname,  
182 - page: e.data.currentPage,  
183 - };  
184 -  
185 - let o = this.data.rq_data.o;  
186 - if(o) {  
187 - if(o.cat_id) data.cat_id = o.cat_id;  
188 - if(o.pid && o.pid != 'three') data.parent_id = o.pid;  
189 - if(o.nation_id) data.nation_id = o.nation_id;  
190 - if(o.brand_id) data.brand_id = o.brand_id;  
191 - };  
192 -  
193 -  
194 - getApp().request.promiseGet(t, {data:data}).then(async res=>{  
195 - th.data.loading=0;  
196 - if(ut.ajax_ok(res)){  
197 - if(!e.data.requestData) {  
198 - // e.data.requestData=[];  
199 - e.setData({  
200 - requestData: [],  
201 - });  
202 - };  
203 - for(let i in res.data.data.pageData){  
204 - let item=res.data.data.pageData[i]; 175 + var user_id = getApp().globalData.user_id;
  176 + if (!user_id) user_id = 0;
  177 + let data = {
  178 + is_mainshow: 1,
  179 + isonsale: 1,
  180 + store_id: oo.stoid,
  181 + orderField: e.data.tabname,
  182 + orderType: e.data.adname,
  183 + page: e.data.currentPage,
  184 + };
  185 +
  186 + let o = this.data.rq_data.o;
  187 + if (o) {
  188 + if (o.cat_id) data.cat_id = o.cat_id;
  189 + if (o.pid && o.pid != 'three') data.parent_id = o.pid;
  190 + if (o.nation_id) data.nation_id = o.nation_id;
  191 + if (o.brand_id) data.brand_id = o.brand_id;
  192 + };
  193 +
  194 +
  195 + getApp().request.promiseGet(t, { data: data }).then(async res => {
  196 + th.data.loading = 0;
  197 + if (ut.ajax_ok(res)) {
  198 + if (!e.data.requestData) {
  199 + // e.data.requestData=[];
  200 + e.setData({
  201 + requestData: [],
  202 + });
  203 + };
  204 + for (let i in res.data.data.pageData) {
  205 + let item = res.data.data.pageData[i];
205 item.original_img = th.data.url + item.original_img; 206 item.original_img = th.data.url + item.original_img;
206 207
207 /*-- 208 /*--
@@ -218,48 +219,48 @@ Page({ @@ -218,48 +219,48 @@ Page({
218 })--*/ 219 })--*/
219 220
220 var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购 221 var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购
221 - var prom_id=item.prom_id;  
222 - var now=ut.gettimestamp(); 222 + var prom_id = item.prom_id;
  223 + var now = ut.gettimestamp();
223 var url = ""; 224 var url = "";
224 - switch (prom_type){ 225 + switch (prom_type) {
225 case 1: 226 case 1:
226 - url = "/api/ms/flash_sale/getNew/" +oo.stoid + "/" +user_id+"/"+ prom_id; 227 + url = "/api/ms/flash_sale/getNew/" + oo.stoid + "/" + user_id + "/" + prom_id;
227 break; 228 break;
228 case 2: 229 case 2:
229 - url ="/api/weshop/goods/groupBuy/getActInfo/" +oo.stoid + "/" +item.goods_id+"/"+ prom_id 230 + url = "/api/weshop/goods/groupBuy/getActInfo/" + oo.stoid + "/" + item.goods_id + "/" + prom_id
230 break; 231 break;
231 case 4: 232 case 4:
232 - url ="/api/weshop/integralbuy/get/"+oo.stoid +"/"+prom_id; 233 + url = "/api/weshop/integralbuy/get/" + oo.stoid + "/" + prom_id;
233 break; 234 break;
234 case 6: 235 case 6:
235 url = "/api/weshop/teamlist/get/" + oo.stoid + "/" + prom_id; 236 url = "/api/weshop/teamlist/get/" + oo.stoid + "/" + prom_id;
236 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{  
237 - data:{  
238 - store_id: oo.stoid,  
239 - is_end: 0,  
240 - is_show: 1,  
241 - user_id: getApp().globalData.user_id,  
242 - pageSize:1000, 237 + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1", {
  238 + data: {
  239 + store_id: oo.stoid,
  240 + is_end: 0,
  241 + is_show: 1,
  242 + user_id: getApp().globalData.user_id,
  243 + pageSize: 1000,
243 } 244 }
244 - }).then(pd=>{  
245 - let pd_list=pd.data.data.pageData;  
246 - if(res.data.code==0 && pd_list.length>0){  
247 - var flag = pd_list.some(pd=>{  
248 - return pd.goods_id==item.goods_id  
249 - })  
250 -  
251 - if(!flag){  
252 - item.prom_type=0;  
253 - item.prom_id=0;  
254 - item.prom_price=null;  
255 - } 245 + }).then(pd => {
  246 + let pd_list = pd.data.data.pageData;
  247 + if (res.data.code == 0 && pd_list.length > 0) {
  248 + var flag = pd_list.some(pd => {
  249 + return pd.goods_id == item.goods_id
  250 + })
  251 +
  252 + if (!flag) {
  253 + item.prom_type = 0;
  254 + item.prom_id = 0;
  255 + item.prom_price = null;
  256 + }
256 } 257 }
257 - }) 258 + })
258 break; 259 break;
259 case 8: 260 case 8:
260 var presell_id = prom_id; 261 var presell_id = prom_id;
261 var url1 = "/api/weshop/marketing/marketingPresellList/list"; 262 var url1 = "/api/weshop/marketing/marketingPresellList/list";
262 - var rd= { 263 + var rd = {
263 store_id: oo.stoid, 264 store_id: oo.stoid,
264 presell_id: presell_id, 265 presell_id: presell_id,
265 goods_id: item.goods_id 266 goods_id: item.goods_id
@@ -271,287 +272,303 @@ Page({ @@ -271,287 +272,303 @@ Page({
271 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { 272 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
272 var arr = res.data.data[0]; 273 var arr = res.data.data[0];
273 item.prom_price = arr.luck_goods_price; 274 item.prom_price = arr.luck_goods_price;
274 - item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0); 275 + item.sales_sum = arr.buy_goodnum + (arr.virtual_qty ? arr.virtual_qty : 0);
275 } 276 }
276 }) 277 })
277 break; 278 break;
278 default: 279 default:
279 break; 280 break;
280 }; 281 };
281 - if(url!=null && url!=''){ 282 + if (url != null && url != '') {
282 await getApp().request.promiseGet(url, {}).then(async res => { 283 await getApp().request.promiseGet(url, {}).then(async res => {
283 - var prom =null;  
284 - if(res.data.code==0 && res.data.data){  
285 - prom=res.data.data; 284 + var prom = null;
  285 + if (res.data.code == 0 && res.data.data) {
  286 + prom = res.data.data;
286 287
287 - if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time<now || (prom.show_time && prom.show_time<now)) ) { 288 + if (prom != null && prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now))) {
288 item.prom_price = res.data.data.price; 289 item.prom_price = res.data.data.price;
289 - if(res.data.data.user_price) item.prom_price=res.data.data.user_price;  
290 - var vNum=prom.virtual_num?prom.virtual_num:0;  
291 - var vNum1=prom.virtualNum?prom.virtualNum:0;  
292 - var vNum2=prom.virtual?prom.virtual:0;  
293 - item.sales_sum=prom.buy_num+(vNum+vNum1+vNum2);  
294 - }else{  
295 - item.prom_type=0;  
296 - item.prom_id=0;  
297 - item.prom_price=null; 290 + if (res.data.data.user_price) item.prom_price = res.data.data.user_price;
  291 + var vNum = prom.virtual_num ? prom.virtual_num : 0;
  292 + var vNum1 = prom.virtualNum ? prom.virtualNum : 0;
  293 + var vNum2 = prom.virtual ? prom.virtual : 0;
  294 + item.sales_sum = prom.buy_num + (vNum + vNum1 + vNum2);
  295 + } else {
  296 + item.prom_type = 0;
  297 + item.prom_id = 0;
  298 + item.prom_price = null;
298 } 299 }
299 } 300 }
300 }) 301 })
301 }; 302 };
302 - if(!th.data.requestData) th.data.requestData=[]; 303 + if (!th.data.requestData) th.data.requestData = [];
303 th.data.requestData.push(item); 304 th.data.requestData.push(item);
304 - e.setData({requestData: e.data.requestData}); 305 + e.setData({ requestData: e.data.requestData });
305 } 306 }
306 } 307 }
307 e.closeSearchModal(); 308 e.closeSearchModal();
308 }) 309 })
309 }, 310 },
310 - onReachBottom: function() {  
311 - console.log('触发上滑加载事件'); 311 + onReachBottom: function () {
  312 + console.log('触发上滑加载事件');
312 this.data.currentPage++ 313 this.data.currentPage++
313 - console.log('触发上滑加载事件currentPage',this.data.currentPage); 314 + console.log('触发上滑加载事件currentPage', this.data.currentPage);
314 this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl); 315 this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl);
315 }, 316 },
316 -  
317 -  
318 - openFilterModal: function() { 317 +
  318 +
  319 + openFilterModal: function () {
319 this.setData({ 320 this.setData({
320 openFilterModal: !0 321 openFilterModal: !0
321 }); 322 });
322 }, 323 },
323 - closeFilterModal: function() { 324 + closeFilterModal: function () {
324 this.setData({ 325 this.setData({
325 openFilterModal: !1 326 openFilterModal: !1
326 }); 327 });
327 }, 328 },
328 - filterGoods: function(t) { 329 + filterGoods: function (t) {
329 this.resetData(), this.requestSearch(t.currentTarget.dataset.href), this.closeFilterModal(); 330 this.resetData(), this.requestSearch(t.currentTarget.dataset.href), this.closeFilterModal();
330 }, 331 },
331 -  
332 -  
333 -  
334 - resetData: function() {  
335 - e.resetConfig(),  
336 - // this.data.requestData = null,  
337 - this.data.currentPage = 1;  
338 - this.setData({  
339 - requestData: null,  
340 - }); 332 +
  333 +
  334 +
  335 + resetData: function () {
  336 + e.resetConfig(),
  337 + // this.data.requestData = null,
  338 + this.data.currentPage = 1;
  339 + this.setData({
  340 + requestData: null,
  341 + });
341 }, 342 },
342 343
343 //---回复最初的设置---显示全部分类-- 344 //---回复最初的设置---显示全部分类--
344 - restoreData: function() { 345 + restoreData: function () {
345 this.setData({ 346 this.setData({
346 requestData: this.data.allData, 347 requestData: this.data.allData,
347 }); 348 });
348 - this.data.currentPage=2; 349 + this.data.currentPage = 2;
349 }, 350 },
350 - openSearchModal: function() { 351 + openSearchModal: function () {
351 this.setData({ 352 this.setData({
352 openSearchModal: !0 353 openSearchModal: !0
353 }); 354 });
354 }, 355 },
355 - closeSearchModal: function() { 356 + closeSearchModal: function () {
356 this.setData({ 357 this.setData({
357 openSearchModal: !1 358 openSearchModal: !1
358 }); 359 });
359 }, 360 },
360 -  
361 - submitSearch: function(t) {  
362 - var val=t.detail.value.word;  
363 - if(val==undefined) val=t.detail.value;  
364 - val=val?val.trim():'';  
365 - if(!val){  
366 - a.showWarning("请输入关键词");  
367 - }  
368 - this.search(val); 361 +
  362 + submitSearch: function (t) {
  363 + var val = t.detail.value.word;
  364 + if (val == undefined) val = t.detail.value;
  365 + val = val ? val.trim() : '';
  366 + if (!val) {
  367 + a.showWarning("请输入关键词");
  368 + }
  369 + this.search(val);
369 }, 370 },
370 371
371 //热搜关键字 372 //热搜关键字
372 - searchHotWord: function(t) {  
373 - var word = t.currentTarget.dataset.word;  
374 - if(word) {  
375 - this.setData({  
376 - keyword: word,  
377 - hiddenClear: false,  
378 - });  
379 - };  
380 - this.historyRecord(word);  
381 - this.search(word); 373 + searchHotWord: function (t) {
  374 + var word = t.currentTarget.dataset.word;
  375 + if (word) {
  376 + this.setData({
  377 + keyword: word,
  378 + hiddenClear: false,
  379 + });
  380 + };
  381 + this.historyRecord(word);
  382 + this.search(word);
382 }, 383 },
383 384
384 //-----点击搜索按钮---- 385 //-----点击搜索按钮----
385 - search: function(t) { 386 + search: function (t) {
386 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词"); 387 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
387 - this.data.key_str=t; 388 + this.data.key_str = t;
388 this.resetData(); 389 this.resetData();
389 - this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));  
390 - this.historyRecord(); 390 + this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
  391 + this.historyRecord();
391 }, 392 },
392 393
393 //---------分享配置-------- 394 //---------分享配置--------
394 onShareAppMessage: function (e) { 395 onShareAppMessage: function (e) {
395 - getApp().globalData.no_clear=1;  
396 - var curPage=this; 396 + getApp().globalData.no_clear = 1;
  397 + var curPage = this;
397 var pagePath = curPage.route; //当前页面url 398 var pagePath = curPage.route; //当前页面url
398 if (pagePath.indexOf('/') != 0) { 399 if (pagePath.indexOf('/') != 0) {
399 pagePath = '/' + pagePath; 400 pagePath = '/' + pagePath;
400 } 401 }
401 402
402 - if(this.data.key_str) { 403 + if (this.data.key_str) {
403 pagePath += "?s_key=" + this.data.key_str; 404 pagePath += "?s_key=" + this.data.key_str;
404 } 405 }
405 406
406 - if(getApp().globalData.user_id){ 407 + if (getApp().globalData.user_id) {
407 408
408 - if(pagePath.indexOf("?")>0){  
409 - pagePath+="&first_leader="+getApp().globalData.user_id;  
410 - }else{  
411 - pagePath+="?first_leader="+getApp().globalData.user_id; 409 + if (pagePath.indexOf("?") > 0) {
  410 + pagePath += "&first_leader=" + getApp().globalData.user_id;
  411 + } else {
  412 + pagePath += "?first_leader=" + getApp().globalData.user_id;
412 } 413 }
413 } 414 }
414 415
415 // console.log("11-11"+pagePath); 416 // console.log("11-11"+pagePath);
416 return { 417 return {
417 title: "商品搜索", 418 title: "商品搜索",
418 - path:pagePath, 419 + path: pagePath,
419 } 420 }
420 }, 421 },
421 422
422 423
423 //---------图片失败,默认图片-------- 424 //---------图片失败,默认图片--------
424 bind_bnerr: function (e) { 425 bind_bnerr: function (e) {
425 - var _errImg = e.target.dataset.errorimg;  
426 - var _errObj = {};  
427 - _errObj[_errImg] = this.data.url+ "/miniapp/images/default_g_img.gif";  
428 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 426 + var _errImg = e.target.dataset.errorimg;
  427 + var _errObj = {};
  428 + _errObj[_errImg] = this.data.url + "/miniapp/images/default_g_img.gif";
  429 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
429 }, 430 },
430 -  
431 - //--- 获取卡类列表 ---  
432 - getPlusCardType: function (func) {  
433 - var storid = oo.stoid;  
434 - var th = this;  
435 - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {  
436 - var plusCard = res.data.data;  
437 - var arr = [1219, 2089, 3031];  
438 - var new_arr = new Array();  
439 - var card_name_map=new Map();  
440 - var user = getApp().globalData.userInfo;  
441 -  
442 - for (var i = 0; i < plusCard.length; i++) {  
443 - if ((!user || user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {  
444 - continue;  
445 - }  
446 - var name="card"+plusCard[i].CorrPrice.toLowerCase();  
447 - card_name_map.set(name,plusCard[i].CardName);  
448 - new_arr.push(plusCard[i]);  
449 -  
450 - }  
451 -  
452 - var ob={"card_list":new_arr,"name_map":card_name_map};  
453 - func(ob);  
454 - })  
455 - },  
456 -  
457 -  
458 - getInput(e) {  
459 - let val = e.detail.value;  
460 - if(val) {  
461 - this.setData({  
462 - keyword: e.detail.value,  
463 - hiddenClear: false,  
464 - });  
465 - } else {  
466 - this.setData({  
467 - hiddenClear: true,  
468 - });  
469 - }  
470 -  
471 - },  
472 -  
473 - historyRecord(w) {  
474 - let keyword =w;  
475 - let self = this;  
476 - if(!keyword){  
477 - keyword = this.data.key_str.trim();  
478 - }  
479 - let searchRecord = this.data.searchRecord;  
480 - if(!searchRecord || searchRecord.length==0) searchRecord=wx.getStorageSync('searchRecord') || [];  
481 -  
482 - if(keyword) {  
483 -  
484 - var index=searchRecord.indexOf(keyword);  
485 - if(index > -1) {  
486 - // 已经存在该值  
487 - searchRecord.splice(index,1);  
488 - searchRecord.unshift(keyword);  
489 -  
490 - // 将历史记录添加到缓存中  
491 - wx.setStorage({  
492 - key: 'searchRecord',  
493 - data: searchRecord,  
494 - success: function(res) {  
495 - self.setData({  
496 - searchRecord,  
497 - })  
498 - }  
499 - })  
500 -  
501 - return;  
502 - } else {  
503 - if(searchRecord.length >= 10) {  
504 - searchRecord.pop(); // 删除最早的一条记录  
505 - };  
506 - searchRecord.unshift(keyword);  
507 -  
508 - // // 将历史记录添加到缓存中  
509 - wx.setStorage({  
510 - key: 'searchRecord',  
511 - data: searchRecord,  
512 - success: function(res) {  
513 - self.setData({  
514 - searchRecord,  
515 - })  
516 - }  
517 - })  
518 - };  
519 - };  
520 - },  
521 -  
522 -  
523 -  
524 - // 获取历史搜索记录  
525 - getHistorySearch() {  
526 - this.setData({  
527 - searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空  
528 - });  
529 - },  
530 -  
531 - // 清除历史搜素记录  
532 - clearSearchRecord() {  
533 - wx.clearStorageSync('searchRecord');  
534 - this.setData({  
535 - searchRecord: []  
536 - });  
537 - },  
538 -  
539 - go_url:function (e) {  
540 - var url=e.currentTarget.dataset.url; 431 +
  432 + //--- 获取卡类列表 ---
  433 + getPlusCardType: function (func) {
  434 + var storid = oo.stoid;
  435 + var th = this;
  436 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  437 + var plusCard = res.data.data;
  438 + var arr = [1219, 2089, 3031];
  439 + var new_arr = new Array();
  440 + var card_name_map = new Map();
  441 + var user = getApp().globalData.userInfo;
  442 +
  443 + for (var i = 0; i < plusCard.length; i++) {
  444 + if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
  445 + continue;
  446 + }
  447 + var name = "card" + plusCard[i].CorrPrice.toLowerCase();
  448 + card_name_map.set(name, plusCard[i].CardName);
  449 + new_arr.push(plusCard[i]);
  450 +
  451 + }
  452 +
  453 + var ob = { "card_list": new_arr, "name_map": card_name_map };
  454 + func(ob);
  455 + })
  456 + },
  457 +
  458 +
  459 + getInput(e) {
  460 + let val = e.detail.value;
  461 + if (val) {
  462 + this.setData({
  463 + keyword: e.detail.value,
  464 + hiddenClear: false,
  465 + });
  466 + } else {
  467 + this.setData({
  468 + hiddenClear: true,
  469 + });
  470 + }
  471 +
  472 + },
  473 +
  474 + historyRecord(w) {
  475 + let keyword = w;
  476 + let self = this;
  477 + if (!keyword) {
  478 + keyword = this.data.key_str.trim();
  479 + }
  480 + let searchRecord = this.data.searchRecord;
  481 + if (!searchRecord || searchRecord.length == 0) searchRecord = wx.getStorageSync('searchRecord') || [];
  482 +
  483 + if (keyword) {
  484 +
  485 + var index = searchRecord.indexOf(keyword);
  486 + if (index > -1) {
  487 + // 已经存在该值
  488 + searchRecord.splice(index, 1);
  489 + searchRecord.unshift(keyword);
  490 +
  491 + // 将历史记录添加到缓存中
  492 + wx.setStorage({
  493 + key: 'searchRecord',
  494 + data: searchRecord,
  495 + success: function (res) {
  496 + self.setData({
  497 + searchRecord,
  498 + })
  499 + }
  500 + })
  501 +
  502 + return;
  503 + } else {
  504 + if (searchRecord.length >= 10) {
  505 + searchRecord.pop(); // 删除最早的一条记录
  506 + };
  507 + searchRecord.unshift(keyword);
  508 +
  509 + // // 将历史记录添加到缓存中
  510 + wx.setStorage({
  511 + key: 'searchRecord',
  512 + data: searchRecord,
  513 + success: function (res) {
  514 + self.setData({
  515 + searchRecord,
  516 + })
  517 + }
  518 + })
  519 + };
  520 + };
  521 + },
  522 +
  523 + closePoster() {
  524 + this.setData({
  525 + fliter_flag: false,
  526 + });
  527 + },
  528 +
  529 + show_fliter() {
  530 + this.setData({
  531 + fliter_flag: true
  532 + })
  533 + },
  534 + fliter_close() {
  535 + this.setData({
  536 + fliter_flag: false,
  537 + })
  538 + },
  539 +
  540 +
  541 + // 获取历史搜索记录
  542 + getHistorySearch() {
  543 + this.setData({
  544 + searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空
  545 + });
  546 + },
  547 +
  548 + // 清除历史搜素记录
  549 + clearSearchRecord() {
  550 + wx.clearStorageSync('searchRecord');
  551 + this.setData({
  552 + searchRecord: []
  553 + });
  554 + },
  555 +
  556 + go_url: function (e) {
  557 + var url = e.currentTarget.dataset.url;
541 getApp().goto(url); 558 getApp().goto(url);
542 }, 559 },
543 -  
544 - clearInput() {  
545 - this.setData({  
546 - keyword: '',  
547 - hiddenClear: true,  
548 - openSearchModal: true,  
549 - });  
550 - },  
551 -  
552 - inputFocus() {  
553 - this.setData({  
554 - openSearchModal: true,  
555 - });  
556 - }, 560 +
  561 + clearInput() {
  562 + this.setData({
  563 + keyword: '',
  564 + hiddenClear: true,
  565 + openSearchModal: true,
  566 + });
  567 + },
  568 +
  569 + inputFocus(e) {
  570 + this.setData({
  571 + openSearchModal: true,
  572 + });
  573 + },
557 }); 574 });
558 \ No newline at end of file 575 \ No newline at end of file
pages/goods/search/search.json
@@ -3,5 +3,8 @@ @@ -3,5 +3,8 @@
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "share_box": "/components/share_box/share_box" 5 "share_box": "/components/share_box/share_box"
6 - } 6 + },
  7 + "componentPlaceholder": {
  8 + "van-popup": "view"
  9 + }
7 } 10 }
8 \ No newline at end of file 11 \ No newline at end of file
pages/goods/search/search.wxml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <form bindsubmit="submitSearch"> 6 <form bindsubmit="submitSearch">
7 <view class="pdh20 pdv10 flex ai_c jc_sb"> 7 <view class="pdh20 pdv10 flex ai_c jc_sb">
8 <view class="input-box"> 8 <view class="input-box">
9 - <input autoFocus class="input-search" name="word" placeholder="搜索商品" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}"/> 9 + <input class="input-search" name="word" placeholder="搜索商品" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}"/>
10 <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text> 10 <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text>
11 </view> 11 </view>
12 <button class="btn" formType="submit" hover-class="none">搜索</button> 12 <button class="btn" formType="submit" hover-class="none">搜索</button>
pages/goods/search/search.wxss
1 .container { 1 .container {
2 color: #666; 2 color: #666;
3 - overflow: visible; 3 + overflow: visible;
4 } 4 }
5 5
6 .nav { 6 .nav {
7 - position: sticky;  
8 - top: 90rpx;  
9 - background-color: white;  
10 - z-index: 999; 7 + position: sticky;
  8 + top: 90rpx;
  9 + background-color: white;
  10 + z-index: 99;
11 } 11 }
12 12
13 .nav-item { 13 .nav-item {
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 width: 30%; 15 width: 30%;
16 height: 90rpx; 16 height: 90rpx;
17 line-height: 90rpx; */ 17 line-height: 90rpx; */
18 - padding: 14rpx 10rpx; 18 + padding: 14rpx 10rpx;
19 display: flex; 19 display: flex;
20 align-items: center; 20 align-items: center;
21 justify-content: center; 21 justify-content: center;
@@ -82,8 +82,8 @@ @@ -82,8 +82,8 @@
82 width: 180rpx; 82 width: 180rpx;
83 height: 180rpx; 83 height: 180rpx;
84 padding: 0 10rpx 0 30rpx; 84 padding: 0 10rpx 0 30rpx;
85 - flex-shrink: 0;  
86 - /* padding: 10rpx; */ 85 + flex-shrink: 0;
  86 + /* padding: 10rpx; */
87 } 87 }
88 88
89 .img-wrap image { 89 .img-wrap image {
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 line-height: 36rpx; 98 line-height: 36rpx;
99 color: #333; 99 color: #333;
100 overflow: hidden; 100 overflow: hidden;
101 - text-align: justify; 101 + text-align: justify;
102 } 102 }
103 103
104 .price { 104 .price {
@@ -185,10 +185,10 @@ @@ -185,10 +185,10 @@
185 .search-bar { 185 .search-bar {
186 /* width: 100%; 186 /* width: 100%;
187 box-sizing: border-box; */ 187 box-sizing: border-box; */
188 - background-color: white;  
189 - position: sticky;  
190 - top: 0;  
191 - z-index: 1; 188 + background-color: white;
  189 + position: sticky;
  190 + top: 0;
  191 + z-index: 1;
192 } 192 }
193 193
194 .search-input { 194 .search-input {
@@ -260,13 +260,13 @@ @@ -260,13 +260,13 @@
260 } */ 260 } */
261 261
262 .card_bg { 262 .card_bg {
263 - box-sizing: border-box; 263 + box-sizing: border-box;
264 padding: 2rpx 10rpx; 264 padding: 2rpx 10rpx;
265 /* height: 28rpx; */ 265 /* height: 28rpx; */
266 border-radius: 26rpx; 266 border-radius: 26rpx;
267 font-size: 18rpx; 267 font-size: 18rpx;
268 /* line-height: 28rpx; */ 268 /* line-height: 28rpx; */
269 - max-width: 210rpx; 269 + max-width: 210rpx;
270 background: #333; 270 background: #333;
271 color: #fff; 271 color: #fff;
272 margin-left: 8rpx; 272 margin-left: 8rpx;
@@ -276,12 +276,12 @@ @@ -276,12 +276,12 @@
276 width: 19rpx; 276 width: 19rpx;
277 height: 19rpx; 277 height: 19rpx;
278 margin-right: 8rpx; 278 margin-right: 8rpx;
279 - flex-shrink: 0; 279 + flex-shrink: 0;
280 } 280 }
281 281
282 .card_name { 282 .card_name {
283 - position: relative;  
284 - top: -4rpx; 283 + position: relative;
  284 + top: -4rpx;
285 } 285 }
286 286
287 /* .card_bg image { 287 /* .card_bg image {
@@ -299,7 +299,7 @@ @@ -299,7 +299,7 @@
299 } */ 299 } */
300 300
301 .navigator-hover { 301 .navigator-hover {
302 - opacity: 1; 302 + opacity: 1;
303 } 303 }
304 304
305 .mk_price { 305 .mk_price {
@@ -309,76 +309,134 @@ @@ -309,76 +309,134 @@
309 309
310 .item-cont { 310 .item-cont {
311 /* line-height: 38rpx; */ 311 /* line-height: 38rpx; */
312 - flex-grow: 1; 312 + flex-grow: 1;
313 } 313 }
314 314
315 .history { 315 .history {
316 - background-color: #f0f0f0;  
317 - color: #7b7b7b;  
318 - border: none;  
319 - margin-bottom: 16rpx; 316 + background-color: #f0f0f0;
  317 + color: #7b7b7b;
  318 + border: none;
  319 + margin-bottom: 16rpx;
320 } 320 }
321 321
322 .history:first-of-type { 322 .history:first-of-type {
323 - /* margin-left: 0; */ 323 + /* margin-left: 0; */
324 } 324 }
325 325
326 .input-box { 326 .input-box {
327 - position: relative;  
328 - flex: 1;  
329 - padding-left: 50rpx;  
330 - padding-right: 70rpx;  
331 - background-color: #f0f0f0;  
332 - border-radius: 60rpx; 327 + position: relative;
  328 + flex: 1;
  329 + padding-left: 50rpx;
  330 + padding-right: 70rpx;
  331 + background-color: #f0f0f0;
  332 + border-radius: 60rpx;
333 } 333 }
334 334
335 .input-box::before { 335 .input-box::before {
336 - font-family: iconfont;  
337 - position: absolute;  
338 - left: 20rpx;  
339 - top: 50%;  
340 - transform: translateY(-50%);  
341 - content: '\e618'; 336 + font-family: iconfont;
  337 + position: absolute;
  338 + left: 20rpx;
  339 + top: 50%;
  340 + transform: translateY(-50%);
  341 + content: '\e618';
342 } 342 }
343 343
344 .input-search { 344 .input-search {
345 - position: relative;  
346 - padding: 10rpx;  
347 - font-size: 28rpx; 345 + position: relative;
  346 + padding: 10rpx;
  347 + font-size: 28rpx;
348 } 348 }
349 349
350 350
351 .btn { 351 .btn {
352 - margin-left: 0;  
353 - margin-right: 0;  
354 - line-height: 1;  
355 - padding: 20rpx;  
356 - font-size: 30rpx; 352 + margin-left: 0;
  353 + margin-right: 0;
  354 + line-height: 1;
  355 + padding: 20rpx;
  356 + font-size: 30rpx;
357 } 357 }
358 358
359 .btn::after { 359 .btn::after {
360 - border: none; 360 + border: none;
361 } 361 }
362 362
363 .icon-guan { 363 .icon-guan {
364 - font-size: 20rpx;  
365 - padding: 10rpx;  
366 - position: absolute;  
367 - right: 20rpx;  
368 - top: 50%;  
369 - transform: translateY(-50%); 364 + font-size: 20rpx;
  365 + padding: 10rpx;
  366 + position: absolute;
  367 + right: 20rpx;
  368 + top: 50%;
  369 + transform: translateY(-50%);
370 } 370 }
371 371
372 .lookat { 372 .lookat {
373 - display: inline-block;  
374 - color: #FF6768;  
375 - border: 2rpx solid #FF6768;  
376 - border-radius: 80rpx;  
377 - font-size: 30rpx; 373 + display: inline-block;
  374 + color: #FF6768;
  375 + border: 2rpx solid #FF6768;
  376 + border-radius: 80rpx;
  377 + font-size: 30rpx;
378 } 378 }
379 379
380 .no-data .no-data-title { 380 .no-data .no-data-title {
381 - font-size: 28rpx;  
382 - color: #999; 381 + font-size: 28rpx;
  382 + color: #999;
  383 +}
  384 +
  385 +.mt30 {
  386 + margin-top: 30rpx;
  387 +}
  388 +
  389 +.popup_item {
  390 + display: flex;
  391 + justify-content: space-between;
  392 + margin-top: 30rpx;
383 } 393 }
384 394
  395 +.popup_input {
  396 + border-radius: 20rpx;
  397 + width: 40%;
  398 + font-size: 24rpx;
  399 + padding: 10rpx;
  400 + background: #f9f9f9;
  401 +}
  402 +.popup_price1 {
  403 + text-align: center;
  404 + padding: 0 30rpx;
  405 + margin-top: 30rpx;
  406 + background: red;
  407 + border-radius: 20rpx;
  408 +}
  409 +
  410 +.popup_price {
  411 + text-align: center;
  412 + padding: 10rpx 30rpx;
  413 + margin-top: 30rpx;
  414 + background: red;
  415 + border-radius: 35rpx;
  416 +}
  417 +.mask {
  418 + position: fixed;
  419 + top: 0;
  420 + left: 0;
  421 + width: 100%;
  422 + height: 100%;
  423 + z-index: 999;
  424 + background-color: rgba(0,0,0,.4);
  425 + }
  426 +
  427 +.popup_brand {
  428 + display: flex;
  429 + flex-wrap: wrap;
  430 + justify-content: space-between;
  431 +}
  432 +
  433 +.filter {
  434 + height: 100%;
  435 + position: absolute;
  436 + right: 0;
  437 + top: 0;
  438 + background: pink;
  439 + width: 80%;
  440 + z-index: 1000;
  441 + transition: all .5s;
  442 +}
385 \ No newline at end of file 443 \ No newline at end of file
pages/index/index/index.js
@@ -84,7 +84,10 @@ Page({ @@ -84,7 +84,10 @@ Page({
84 full_ad: null, //全屏广告 84 full_ad: null, //全屏广告
85 full_screen: 0, //全屏广告 85 full_screen: 0, //全屏广告
86 is_ok_h5: 0, //判断要不要显示关注二维码 86 is_ok_h5: 0, //判断要不要显示关注二维码
  87 +
  88 + container: null,
87 }, 89 },
  90 +
88 91
89 onLoad: async function (tt) { 92 onLoad: async function (tt) {
90 wx.showShareMenu({ 93 wx.showShareMenu({
pages/index/index/index.json
@@ -21,7 +21,10 @@ @@ -21,7 +21,10 @@
21 "store_select": "/components/diy_store_select/diy_store_select", 21 "store_select": "/components/diy_store_select/diy_store_select",
22 "presell": "/components/diy_pregoods/diy_pregoods", 22 "presell": "/components/diy_pregoods/diy_pregoods",
23 "luckyGo": "/components/diy_luckyGo/diy_luckyGo", 23 "luckyGo": "/components/diy_luckyGo/diy_luckyGo",
24 - "serviceCard": "/components/diy_serviceCard/diy_serviceCard" 24 + "serviceCard": "/components/diy_serviceCard/diy_serviceCard",
  25 + "live": "/components/diy_live/diy_live",
  26 + "mp-dialog": "weui-miniprogram/dialog/dialog",
  27 + "mp-sticky": "/components/mp-sticky/mp-sticky"
25 }, 28 },
26 "enablePullDownRefresh": false 29 "enablePullDownRefresh": false
27 } 30 }
28 \ No newline at end of file 31 \ No newline at end of file
pages/index/index/index.wxml
@@ -45,6 +45,12 @@ @@ -45,6 +45,12 @@
45 </view> 45 </view>
46 </view> 46 </view>
47 </view> 47 </view>
  48 +
  49 +
  50 +
  51 +
  52 +
  53 +
48 <!-- 如果有关注,要 --> 54 <!-- 如果有关注,要 -->
49 <!-- <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view> --> 55 <!-- <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view> -->
50 <!-- 如果有顶部门店 --> 56 <!-- 如果有顶部门店 -->
@@ -137,6 +143,8 @@ @@ -137,6 +143,8 @@
137 </view> 143 </view>
138 </view> 144 </view>
139 </view> 145 </view>
  146 +
  147 +
140 <!-- 轮播 --> 148 <!-- 轮播 -->
141 <block wx:if="{{swiperimage.length>0}}"> 149 <block wx:if="{{swiperimage.length>0}}">
142 <!-- <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)" vertical> --> 150 <!-- <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)" vertical> -->
@@ -461,7 +469,7 @@ @@ -461,7 +469,7 @@
461 </block> 469 </block>
462 <!--商品分组--> 470 <!--商品分组-->
463 <block wx:if="{{item.ename=='goodsGroup'}}"> 471 <block wx:if="{{item.ename=='goodsGroup'}}">
464 - <goodsGroup object="{{item.content}}"></goodsGroup> 472 + <goodsGroup object="{{item.content}}" sticky="{{template_arr[0].content.is_top}}"></goodsGroup>
465 473
466 </block> 474 </block>
467 <!--通知--> 475 <!--通知-->
@@ -528,7 +536,7 @@ @@ -528,7 +536,7 @@
528 536
529 <!-- 服务卡项 --> 537 <!-- 服务卡项 -->
530 <block wx:if="{{item.ename=='servicecategory'}}"> 538 <block wx:if="{{item.ename=='servicecategory'}}">
531 - <serviceCard object="{{item.content}}"></serviceCard> 539 + <serviceCard object="{{item.content}}" sticky="{{template_arr[0].content.is_top}}"></serviceCard>
532 </block> 540 </block>
533 541
534 542
pages/index/index/index.wxss
  1 +/* 基本样式 */
  2 +page {
  3 + width: 100%;
  4 + height: 100%;
  5 + overflow: hidden;
  6 + box-sizing: border-box;
  7 + position: relative;
  8 +}
  9 +/* 超出滚动 */
  10 +.container {
  11 + width: 100%;
  12 + height: 100%;
  13 + overflow-y: auto;
  14 +}
  15 +
1 .pink-b { 16 .pink-b {
2 background: #ff7295; 17 background: #ff7295;
3 } 18 }
@@ -1010,14 +1025,10 @@ page { @@ -1010,14 +1025,10 @@ page {
1010 /* background-color: #f7f8fa; */ 1025 /* background-color: #f7f8fa; */
1011 } 1026 }
1012 1027
1013 -.container {  
1014 - /* overflow: hidden; */  
1015 - overflow: visible;  
1016 - /* padding-top: 140rpx; */  
1017 -} 1028 +
1018 1029
1019 .container.nor{ 1030 .container.nor{
1020 - padding-top: 80rpx; 1031 + padding-top: 140rpx;
1021 } 1032 }
1022 1033
1023 /* page, 1034 /* page,
pages/template/index.js
@@ -19,7 +19,21 @@ Page({ @@ -19,7 +19,21 @@ Page({
19 this.data.temp_id=e.scene; 19 this.data.temp_id=e.scene;
20 if(!this.data.temp_id) 20 if(!this.data.temp_id)
21 this.data.temp_id=e.sence; 21 this.data.temp_id=e.sence;
22 - if(!this.data.temp_id) wx.showModal({ title:"未读取到模板ID" ,}) 22 + if(!this.data.temp_id) wx.showModal({ title:"未读取到模板ID" ,})
  23 +
  24 + var first_leader = e.first_leader;
  25 + if (first_leader) {
  26 + //-- user_id代过来免登录 --
  27 + getApp().globalData.first_leader = first_leader;
  28 + //调用接口判断是不是会员
  29 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  30 + if (res.data.code == 0) {
  31 + getApp().globalData.guide_id = res.data.data.id;
  32 + }
  33 + })
  34 + }
  35 +
  36 +
23 37
24 }, 38 },
25 39
@@ -94,26 +108,52 @@ Page({ @@ -94,26 +108,52 @@ Page({
94 108
95 }, 109 },
96 110
97 - onShareAppMessage: function(e) { 111 + onShareAppMessage:async function(e) {
98 getApp().globalData.no_clear=1; 112 getApp().globalData.no_clear=1;
  113 + getApp().getConfig(await function(e){
  114 + this.setData({
  115 + store_config:e
  116 + })
  117 + }.bind(this))
  118 +
  119 + var url= `pages/template/index?sence=`+this.data.temp_id;
  120 + var userInfo = getApp().globalData.userInfo;
  121 + //是分销商才带
  122 + if (userInfo) {
  123 + url += "&first_leader=" + userInfo.user_id;
  124 + }
  125 +
  126 + var ob = {
  127 + title: this.data.share_title,
  128 + path: url,
  129 + imageUrl:this.data.url+this.data.store_config.store_logo,
  130 + };
  131 + return ob;
99 }, 132 },
100 133
101 /** 134 /**
102 * 用户分享朋友圈 135 * 用户分享朋友圈
103 */ 136 */
104 async onShareTimeline(){ 137 async onShareTimeline(){
105 - getApp().globalData.no_clear=1; 138 + getApp().globalData.no_clear=1;
106 getApp().getConfig(await function(e){ 139 getApp().getConfig(await function(e){
107 this.setData({ 140 this.setData({
108 store_config:e 141 store_config:e
109 }) 142 })
110 }.bind(this)) 143 }.bind(this))
111 var {share_title,temp_id,store_config} = this.data; 144 var {share_title,temp_id,store_config} = this.data;
112 - // var url= `pages/template/index?sence=${temp_id}`; 145 + var url= `pages/template/index?sence=${temp_id}`;
  146 +
  147 + var userInfo = getApp().globalData.userInfo;
  148 + //是分销商才带
  149 + if (userInfo) {
  150 + url += "&first_leader=" + userInfo.user_id;
  151 + }
  152 +
113 var ob = { 153 var ob = {
114 title:share_title, 154 title:share_title,
115 - // path: url,  
116 - query:`sence=${temp_id}`, 155 + path: url,
  156 + //query:`sence=${temp_id}`,
117 imageUrl:this.data.url+store_config.store_logo, 157 imageUrl:this.data.url+store_config.store_logo,
118 }; 158 };
119 console.log(ob); 159 console.log(ob);
pages/user/express/express.wxml
1 <view class="logistics-mes"> 1 <view class="logistics-mes">
2 <view class="logistics-num"> 2 <view class="logistics-num">
3 - <view class="logistics-title">订单编号 : </view> 3 + <view class="logistics-title">快递单号 : </view>
4 <view class="logistics-cont">{{delivery.invoice_no}}</view> 4 <view class="logistics-cont">{{delivery.invoice_no}}</view>
5 </view> 5 </view>
6 <view class="logistics-num"> 6 <view class="logistics-num">
pages/user/index/filter.wxs
@@ -19,6 +19,7 @@ var is_close = function (name,c_list) { @@ -19,6 +19,7 @@ var is_close = function (name,c_list) {
19 map['幸运大转盘']="17"; 19 map['幸运大转盘']="17";
20 map['幸运购']="18"; 20 map['幸运购']="18";
21 map['AI测肤']="20"; 21 map['AI测肤']="20";
  22 + map['附近门店']="21";
22 var index=map[name]; 23 var index=map[name];
23 24
24 //我的权益要判断5,和11 25 //我的权益要判断5,和11
pages/user/index/index.js
@@ -43,8 +43,8 @@ Page({ @@ -43,8 +43,8 @@ Page({
43 actImg: "", 43 actImg: "",
44 is_assistance: 0, //助力活动 44 is_assistance: 0, //助力活动
45 ad_img: "", 45 ad_img: "",
46 - add_card_data: '', //等级卡的内容  
47 - 46 + add_card_data: '', //等级卡的内容
  47 + getusercode_vailtime:10,//会员二维码时效
48 hiddenCS: true, 48 hiddenCS: true,
49 }, 49 },
50 goto_nav: function (e) { 50 goto_nav: function (e) {
@@ -395,8 +395,13 @@ Page({ @@ -395,8 +395,13 @@ Page({
395 th.setData({ sys_switch: t_swi }); 395 th.setData({ sys_switch: t_swi });
396 var user_tool = []; 396 var user_tool = [];
397 if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool); 397 if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool);
398 - th.setData({ c_list: user_tool })  
399 - } 398 + th.setData({ c_list: user_tool });
  399 + if (t_swi.usercode_vailtime!=null && parseInt(t_swi.usercode_vailtime)>0)
  400 + {
  401 + th.setData({ getusercode_vailtime: t_swi.usercode_vailtime });
  402 + }
  403 + }
  404 +
400 if (parseInt(t_swi.rank_switch) == 2) { 405 if (parseInt(t_swi.rank_switch) == 2) {
401 var userInfo = th.data.userInfo; 406 var userInfo = th.data.userInfo;
402 if (userInfo.card_field != null && userInfo.card_field != undefined && userInfo.card_field != "") { 407 if (userInfo.card_field != null && userInfo.card_field != undefined && userInfo.card_field != "") {
@@ -483,9 +488,10 @@ Page({ @@ -483,9 +488,10 @@ Page({
483 488
484 //------卡片的显示和关闭-------- 489 //------卡片的显示和关闭--------
485 show_tc: function () { 490 show_tc: function () {
486 - if (!this.data.userInfo) return false; 491 + if (!this.data.userInfo) return false;
  492 +
487 //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') 493 //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')
488 - var val = this.data.userInfo.mobile + "|" + ut.formatTime(); 494 + var val = this.data.userInfo.mobile + "|" + ut.formatTime()+"|"+this.data.getusercode_vailtime;
489 val = "^" + ut.base64_encode(val); 495 val = "^" + ut.base64_encode(val);
490 496
491 qrcode('qrcode', val, 480, 480, this); 497 qrcode('qrcode', val, 480, 480, this);
pages/user/index/index.wxml
@@ -38,9 +38,10 @@ @@ -38,9 +38,10 @@
38 38
39 39
40 </view> 40 </view>
41 - <view wx:if="{{userInfo}}" class="xc-qrcode-frame abs flex-center "> 41 + <view wx:if="{{userInfo}}" class="xc-qrcode-frame abs ">
42 <!-- {{iurl}}/miniapp --> 42 <!-- {{iurl}}/miniapp -->
43 <image bindtap='show_tc' class=" xc-qrcode " src="{{iurl}}/miniapp/images/qrcode1.png"></image> 43 <image bindtap='show_tc' class=" xc-qrcode " src="{{iurl}}/miniapp/images/qrcode1.png"></image>
  44 + <view style="font-size:12px;color: #fff;">会员卡</view>
44 </view> 45 </view>
45 <view class="flex-vertical abs xc-grow-frame rel" style="display: none"> 46 <view class="flex-vertical abs xc-grow-frame rel" style="display: none">
46 <view class="xc-grow-up">成长值</view> 47 <view class="xc-grow-up">成长值</view>
@@ -58,7 +59,7 @@ @@ -58,7 +59,7 @@
58 <view class='numfont'>余额</view> 59 <view class='numfont'>余额</view>
59 </view> 60 </view>
60 <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}} 61 <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}}
61 - <view class='numfont'>预存款</view> 62 + <view class='numfont'>储值款</view>
62 </view> 63 </view>
63 <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}} 64 <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}}
64 <view class='numfont'>积分</view> 65 <view class='numfont'>积分</view>
@@ -346,7 +347,7 @@ @@ -346,7 +347,7 @@
346 <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>--> 347 <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>-->
347 <canvas class="g_img" canvas-id="qrcode" /> 348 <canvas class="g_img" canvas-id="qrcode" />
348 </view> 349 </view>
349 - <view class="s_sao">扫一扫上面的二维码图案,即可消费</view> 350 + <view class="s_sao">前台收银扫此二维码,即可享受优惠!</view>
350 </view> 351 </view>
351 </view> 352 </view>
352 </view> 353 </view>
pages/user/index/index.wxss
@@ -145,16 +145,19 @@ @@ -145,16 +145,19 @@
145 } 145 }
146 146
147 .xc-qrcode-frame { 147 .xc-qrcode-frame {
148 - border-radius: 10rpx; 148 + /* border-radius: 10rpx;
149 border: 5rpx solid #fe9db5; 149 border: 5rpx solid #fe9db5;
150 background: #fe9db5; 150 background: #fe9db5;
151 width: 70rpx; 151 width: 70rpx;
152 - height: 70rpx; 152 + height: 70rpx; */
153 top: 70rpx; 153 top: 70rpx;
154 right: 64rpx; 154 right: 64rpx;
155 } 155 }
156 156
157 .xc-qrcode { 157 .xc-qrcode {
  158 + border-radius: 10rpx;
  159 + border: 5rpx solid #fe9db5;
  160 + background: #fe9db5;
158 width: 70rpx; 161 width: 70rpx;
159 height: 70rpx; 162 height: 70rpx;
160 } 163 }
@@ -301,7 +304,7 @@ @@ -301,7 +304,7 @@
301 height: 50rpx; 304 height: 50rpx;
302 } 305 }
303 306
304 -.xc-send{ 307 +.xc-send {
305 width: 50rpx; 308 width: 50rpx;
306 height: 50rpx; 309 height: 50rpx;
307 } 310 }
@@ -455,9 +458,11 @@ @@ -455,9 +458,11 @@
455 display: block; 458 display: block;
456 height: 1px; 459 height: 1px;
457 width: 100%; 460 width: 100%;
458 - background-color: #999; /*颜色需与主题大背景色一致*/ 461 + background-color: #999;
  462 + /*颜色需与主题大背景色一致*/
459 position: relative; 463 position: relative;
460 - top: 10px; /*调节线高*/ 464 + top: 10px;
  465 + /*调节线高*/
461 left: 0; 466 left: 0;
462 } 467 }
463 468
@@ -540,10 +545,10 @@ @@ -540,10 +545,10 @@
540 .modal-body { 545 .modal-body {
541 position: fixed; 546 position: fixed;
542 top: 0; 547 top: 0;
543 - bottom: 0; 548 + bottom: 0;
544 left: 0; 549 left: 0;
545 - right: 0;  
546 - margin: auto; 550 + right: 0;
  551 + margin: auto;
547 z-index: 100; 552 z-index: 100;
548 background: #fff; 553 background: #fff;
549 /* margin-left: 73rpx; */ 554 /* margin-left: 73rpx; */
@@ -666,7 +671,8 @@ @@ -666,7 +671,8 @@
666 color: #fff; 671 color: #fff;
667 } 672 }
668 673
669 -.bg_right.bcolor, .bg_left.bcolor { 674 +.bg_right.bcolor,
  675 +.bg_left.bcolor {
670 border-color: #333; 676 border-color: #333;
671 } 677 }
672 678
@@ -707,45 +713,47 @@ @@ -707,45 +713,47 @@
707 margin-top: 8rpx; 713 margin-top: 8rpx;
708 margin-right: 5rpx; 714 margin-right: 5rpx;
709 } 715 }
710 -.banner-img{ 716 +
  717 +.banner-img {
711 width: 95%; 718 width: 95%;
712 height: 140rpx; 719 height: 140rpx;
713 - border-radius: 10px 10px 0px 0px;  
714 - margin-bottom: -5rpx; 720 + border-radius: 10px 10px 0px 0px;
  721 + margin-bottom: -5rpx;
715 722
716 } 723 }
717 -.banner-frame{ 724 +
  725 +.banner-frame {
718 width: 100%; 726 width: 100%;
719 background: #f2f2f2; 727 background: #f2f2f2;
720 } 728 }
721 729
722 -button::after{ border: 0} 730 +button::after {
  731 + border: 0
  732 +}
723 733
724 .logo-container { 734 .logo-container {
725 - -webkit-filter: brightness(80%);  
726 - filter: brightness(80%); 735 + -webkit-filter: brightness(80%);
  736 + filter: brightness(80%);
727 } 737 }
728 738
729 .logo { 739 .logo {
730 - width: 132rpx;  
731 - height: 37rpx;  
732 - margin-right: 10rpx; 740 + width: 132rpx;
  741 + height: 37rpx;
  742 + margin-right: 10rpx;
733 } 743 }
734 744
735 .icon-dingwei { 745 .icon-dingwei {
736 - color: #EA4F2B;  
737 - font-size: 28rpx; 746 + color: #EA4F2B;
  747 + font-size: 28rpx;
738 } 748 }
739 749
740 .c-5 { 750 .c-5 {
741 - color: #555; 751 + color: #555;
742 } 752 }
743 753
744 754
745 755
746 .action .icon-guan { 756 .action .icon-guan {
747 - left: auto !important;  
748 - right: 20rpx !important;  
749 -}  
750 -  
751 - 757 + left: auto !important;
  758 + right: 20rpx !important;
  759 +}
752 \ No newline at end of file 760 \ No newline at end of file
pages/user/userinfo/userinfo.js
@@ -73,6 +73,7 @@ Page({ @@ -73,6 +73,7 @@ Page({
73 userInfo: {}, 73 userInfo: {},
74 hasUserInfo: false, 74 hasUserInfo: false,
75 canIUseGetUserProfile: false, 75 canIUseGetUserProfile: false,
  76 + getusercode_vailtime:10,//会员二维码时效
76 77
77 }, 78 },
78 //通过路径跳转到其他页面 79 //通过路径跳转到其他页面
@@ -91,8 +92,12 @@ Page({ @@ -91,8 +92,12 @@ Page({
91 rank_switch:sms_conf.rank_switch, 92 rank_switch:sms_conf.rank_switch,
92 is_lable_set: sms_conf.user_label_set, //是不是会员标签设置 93 is_lable_set: sms_conf.user_label_set, //是不是会员标签设置
93 guide_title:sms_conf.guide_consultant, //系统参数 导购标题 94 guide_title:sms_conf.guide_consultant, //系统参数 导购标题
94 - guide_change_time:sms_conf.guide_change_time //每月能修改几次 95 + guide_change_time:sms_conf.guide_change_time, //每月能修改几次
95 }) 96 })
  97 + if (sms_conf.usercode_vailtime!=null && parseInt(sms_conf.usercode_vailtime)>0)
  98 + {
  99 + th.setData({ getusercode_vailtime: sms_conf.usercode_vailtime });
  100 + }
96 if (sms_conf.user_label_set) { 101 if (sms_conf.user_label_set) {
97 th.query_checklabels(); 102 th.query_checklabels();
98 } 103 }
@@ -858,7 +863,7 @@ Page({ @@ -858,7 +863,7 @@ Page({
858 show_tc: function() { 863 show_tc: function() {
859 if (!getApp().globalData.userInfo) return false; 864 if (!getApp().globalData.userInfo) return false;
860 //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') 865 //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')
861 - var val=getApp().globalData.userInfo.mobile+"|"+ut.formatTime(); 866 + var val=getApp().globalData.userInfo.mobile+"|"+ut.formatTime()+"|"+this.data.getusercode_vailtime;
862 val="^"+ut.base64_encode(val); 867 val="^"+ut.base64_encode(val);
863 868
864 qrcode('qrcode', val, 480, 480, this); 869 qrcode('qrcode', val, 480, 480, this);
utils/filter.wxs
@@ -10,6 +10,13 @@ var filters = { @@ -10,6 +10,13 @@ var filters = {
10 if (!val) return "不限"; 10 if (!val) return "不限";
11 return val.replace("00:00:00", ""); 11 return val.replace("00:00:00", "");
12 }, 12 },
  13 + gettimestamp: function (date) {
  14 + console.log(date);
  15 + var timestamp = getDate(date).getTime();
  16 + console.log(timestamp);
  17 + timestamp = parseInt(timestamp / 1000)
  18 + return timestamp;
  19 + },
13 20
14 replace_time2: function (val) { 21 replace_time2: function (val) {
15 if (val == null || val == undefined || val == '') return ""; 22 if (val == null || val == undefined || val == '') return "";
@@ -278,5 +285,6 @@ module.exports = { @@ -278,5 +285,6 @@ module.exports = {
278 JSONStringify: filters.JSONStringify, 285 JSONStringify: filters.JSONStringify,
279 count: filters.count, 286 count: filters.count,
280 isExpired: filters.isExpired, 287 isExpired: filters.isExpired,
  288 + gettimestamp: filters.gettimestamp,
281 showStartAndEndDate: filters.showStartAndEndDate, 289 showStartAndEndDate: filters.showStartAndEndDate,
282 } 290 }
283 \ No newline at end of file 291 \ No newline at end of file