Commit 5de0808bb62a0a2caeb1db0d6172dceaa6c88998

Authored by 后端研发-苏明海
2 parents cb4956a6 b97000b2

Merge branch 'qa' into 'master'

Qa

See merge request !1027
Showing 66 changed files with 5554 additions and 2173 deletions
... ... @@ -83,7 +83,7 @@ App({
83 83 if(option) this.globalData.scene=option.scene;
84 84 console.log(option,'登陆场景');
85 85  
86   - wx.hideTabBar();
  86 + // wx.hideTabBar();
87 87 this.initExt();
88 88 // this.overShare()
89 89  
... ... @@ -250,7 +250,9 @@ App({
250 250 //首页的第一次登录
251 251 getUserFir(t) {
252 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 256 if (!o.isAuth()) return o.wxLogin_fir(t);
255 257 if (null == s.globalData.userInfo) {
256 258 return o.wxLogin_fir(t);
... ...
components/diy_advertising/diy_advertising.wxml
1 1 <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs>
2 2 <!--上下两块-->
3 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 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 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 33 </block>
26 34 <view class="clear"></view>
27 35 <!--一张图片-->
... ... @@ -34,16 +42,24 @@
34 42 <text>建议宽度640</text>
35 43 </block>
36 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 62 </block>
46   -
47 63 </view>
48 64 </view>
49 65 </block>
... ... @@ -62,13 +78,30 @@
62 78 <text>300*300</text>
63 79 </block>
64 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 82 <image src="{{item.src}}" mode="widthFix" lazy-load="true"></image>
67 83 </navigator>
68 84  
69 85 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
70 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 107 </block>
... ... @@ -80,8 +113,7 @@
80 113 </view>
81 114 <view class="clear"></view>
82 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 118 <block wx:for="{{object.data}}" wx:key="{{index}}">
87 119  
... ... @@ -90,8 +122,29 @@
90 122 <text>200*200</text>
91 123 </block>
92 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 148 </block>
96 149 </view>
97 150  
... ... @@ -100,8 +153,29 @@
100 153 <text>200*200</text>
101 154 </block>
102 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 179 </block>
106 180 </view>
107 181  
... ... @@ -118,12 +192,21 @@
118 192 <text>300*300</text>
119 193 </block>
120 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 210 </block>
128 211 </view>
129 212  
... ... @@ -133,13 +216,29 @@
133 216 <text>300*150</text>
134 217 </block>
135 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 221 </navigator>
139 222  
140 223 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
141 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 244 </block>
... ... @@ -149,12 +248,29 @@
149 248 <text>300*150</text>
150 249 </block>
151 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 252 <image src="{{object.data[2].src}}" lazy-load="true"></image>
154 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 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 276 </block>
... ... @@ -171,13 +287,28 @@
171 287 <text>200*200</text>
172 288 </block>
173 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 292 </navigator>
177 293  
178 294 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
179 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 313 </block>
183 314 </view>
... ... @@ -186,13 +317,28 @@
186 317 <text>400*200</text>
187 318 </block>
188 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 321 <image src="{{object.data[1].src}}" lazy-load="true"></image>
191 322 </navigator>
192 323  
193 324 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
194 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 343 </block>
198 344 </view>
... ... @@ -204,13 +350,28 @@
204 350 <text>400*200</text>
205 351 </block>
206 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 357 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
212 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 376 </block>
216 377 </view>
... ... @@ -219,13 +380,28 @@
219 380 <text>200*200</text>
220 381 </block>
221 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 384 <image src="{{object.data[3].src}}" lazy-load="true"></image>
224 385 </navigator>
225 386  
226 387 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
227 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 406 </block>
231 407 </view>
... ... @@ -241,13 +417,28 @@
241 417 <text>300*150</text>
242 418 </block>
243 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 421 <image src="{{object.data[0].src}}" lazy-load="true"></image>
246 422 </navigator>
247 423  
248 424 <view data-url="{{object.data[0].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
249 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 443 </block>
253 444 </view>
... ... @@ -257,12 +448,27 @@
257 448 <text>300*300</text>
258 449 </block>
259 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 452 <image src="{{object.data[1].src}}" lazy-load="true"></image>
262 453 </navigator>
263 454 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
264 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 473 </block>
268 474  
... ... @@ -275,13 +481,28 @@
275 481 <text>300*300</text>
276 482 </block>
277 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 486 </navigator>
281 487  
282 488 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
283 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 507 </block>
287 508 </view>
... ... @@ -290,13 +511,28 @@
290 511 <text>300*150</text>
291 512 </block>
292 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 515 <image src="{{object.data[3].src}}" lazy-load="true"></image>
295 516 </navigator>
296 517  
297 518 <view data-url="{{object.data[3].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
298 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 537 </block>
302 538 </view>
... ... @@ -314,13 +550,28 @@
314 550 <text>200*200</text>
315 551 </block>
316 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 555 </navigator>
320   -
  556 +
321 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 576 </block>
326 577 </view>
... ... @@ -329,13 +580,28 @@
329 580 <text>200*200</text>
330 581 </block>
331 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 584 <image src="{{object.data[1].src}}" lazy-load="true"></image>
334 585 </navigator>
335 586  
336 587 <view data-url="{{object.data[1].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
337 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 605 </block>
340 606 </view>
341 607 </view>
... ... @@ -347,13 +613,29 @@
347 613 <text>200*200</text>
348 614 </block>
349 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 617 <image src="{{object.data[2].src}}" lazy-load="true"></image>
352 618 </navigator>
353 619  
354 620 <view data-url="{{object.data[2].wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
355 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 641 </block>
... ... @@ -363,13 +645,22 @@
363 645 <text>200*200</text>
364 646 </block>
365 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 664 </block>
374 665 </view>
375 666 </view>
... ... @@ -382,13 +673,21 @@
382 673 <text>200*420</text>
383 674 </block>
384 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 692 </block>
394 693 </view>
... ... @@ -401,34 +700,36 @@
401 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 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 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 733 </block>
429 734 </swiper>
430   -
431   -
432   -
433   -
434   -</block>
  735 +</block>
435 736 \ No newline at end of file
... ...
components/diy_goodsGroup/diy_goodsGroup.js
... ... @@ -14,7 +14,14 @@ Component({
14 14 type: Object,
15 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 26 data: {
20 27 // 这里是一些组件内部数据
... ... @@ -47,14 +54,17 @@ Component({
47 54 swiper_hei: 0,
48 55 title_class: "",
49 56 is_no_plus: 1,
  57 + container: null,
50 58 },
51 59  
52   - ready: function () { },
53   -
54 60 lifetimes: {
  61 + ready: function () {
  62 + this.setData({
  63 + container: () => wx.createSelectorQuery().select('#container')
  64 + })
  65 + },
  66 +
55 67 attached: function () {
56   -
57   -
58 68 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法
59 69 var nav_item = this.data.object;
60 70 var nav_list = this.data.object.nav_list;
... ...
components/diy_goodsGroup/diy_goodsGroup.json
1 1 {
2 2 "component": true,
3 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 8 \ No newline at end of file
... ...
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -4,13 +4,27 @@
4 4  
5 5 <!-- 要不要顶部标题 -->
6 6 <mp-loading show ="{{goods_array.length== 0}}" type="circle"></mp-loading>
  7 +
  8 +<view id="container">
  9 +
  10 +
7 11 <block wx:if="{{is_nav}}">
  12 + <mp-sticky wx:if="{{sticky == 1}}" container="{{container}}">
8 13 <view class="flex gr_title_list" style="overflow-x: auto;">
9 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 15 <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text>
11 16 </view>
12 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 25 </block>
  26 +
  27 +
14 28 <view style="background-color: {{bg_color}};">
15 29 <!--1个列表的时候-->
16 30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
... ... @@ -885,4 +899,6 @@
885 899 </view>
886 900 </swiper>
887 901  
  902 +</view>
  903 +
888 904 </view>
889 905 \ No newline at end of file
... ...
components/diy_nav/diy_nav.wxml
... ... @@ -3,13 +3,21 @@
3 3 <block wx:if="{{object.style==1}}">
4 4 <view class="{{object.seticon==1?'big':object.seticon==2?'big_one_two':'big_border_three'}}">
5 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 21 </block>
14 22 </view>
15 23 </block>
... ... @@ -18,14 +26,21 @@
18 26 <view class="big_two">
19 27 <!-- 图片一 -->
20 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 44 </block>
29 45 </view>
30   -</block>
31   -
  46 +</block>
32 47 \ No newline at end of file
... ...
components/diy_picMax/diy_picMax.wxml
... ... @@ -9,6 +9,11 @@
9 9 <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image>
10 10 </navigator>
11 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 17 <block wx:else>
13 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 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 29 <image src="{{item.src}}" mode="widthFix" style="display: block;"></image>
25 30 </navigator>
26 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 37 <block wx:else>
28 38 <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image>
29 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 17 type: Object,
18 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 29 data: {
23 30 // 这里是一些组件内部数据
... ... @@ -49,12 +56,19 @@ Component({
49 56 title_index: 0,
50 57 swiper_hei: 0,
51 58 title_class: "",
  59 + container: null,
52 60 },
53 61  
54   - ready: function() {},
  62 +
55 63  
56 64 lifetimes: {
  65 + ready: function() {
  66 + this.setData({
  67 + container: () => wx.createSelectorQuery().select('#container')
  68 + });
  69 + },
57 70 attached: function() {
  71 +
58 72 let myStyle = '';
59 73 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法
60 74 var nav_item = this.data.object;
... ...
components/diy_serviceCard/diy_serviceCard.json
1 1 {
2 2 "component": true,
3   - "usingComponents": {}
  3 + "usingComponents": {
  4 + "mp-sticky": "../mp-sticky/mp-sticky"
  5 + }
4 6 }
5 7 \ No newline at end of file
... ...
components/diy_serviceCard/diy_serviceCard.wxml
... ... @@ -10,361 +10,219 @@
10 10 </view>
11 11 </view>
12 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 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 216 <block wx:if="{{object.big_order_type==3}}">
359 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 219 binderror="bind_bnerr3"></image>
362 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 221 binderror="bind_bnerr3"></image>
364 222 </view>
365 223 </block>
366 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 226 binderror="bind_bnerr3"></image>
369 227 </block>
370 228  
... ... @@ -386,17 +244,17 @@
386 244 src='{{imghost}}/miniapp/images/Promotion.png'></image>
387 245 </block>
388 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 252 <block wx:if="{{item.prom_price || item.prom_integral}}">
395 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 258 <view class='del'>¥{{item.market_price}}</view>
401 259 </block>
402 260 <block wx:else>
... ... @@ -412,7 +270,7 @@
412 270 <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
413 271 <view class="card_bg ellipsis-1">
414 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 274 </view>
417 275 </view>
418 276 </view>
... ... @@ -488,364 +346,529 @@
488 346 </block>
489 347 </block>
490 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 351 </block>
494 352 </block>
495 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 356 </view>
499   - </view>
500   - </view>
  357 + <!-- </view> -->
  358 + <!-- </view> -->
  359 +
501 360 </view>
502 361 </navigator>
503 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 585 </block>
655   -
  586 + <!-- 不是活动的情况 -->
656 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 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 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 873 \ No newline at end of file
  874 +<!-- 服务卡项顶部标题 -->
  875 +<!-- class="scroll-view-item {{index == title_index ? 'active':''}}" -->
... ...
components/diy_store_select/diy_store_select.wxss
... ... @@ -188,7 +188,7 @@
188 188  
189 189 /* 门店分类列表 */
190 190 .sort_store_list {
191   - height: 82%;
  191 + max-height: 700rpx;
192 192 overflow: hidden;
193 193 overflow-y: scroll;
194 194 width: 95%;
... ...
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 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 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/distribution/shop/shop.js
... ... @@ -196,7 +196,7 @@ Page({
196 196 //--- 判断是等级会员,且在有效期范围内 ---
197 197 if (user.card_field && now < end) {
198 198 var card_name = ob.name_map.get(user.card_field);
199   - if (card_name.length > 4) card_name = card_name.substring(0, 8);
  199 + if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8);
200 200 th.setData({
201 201 card_field: user.card_field,
202 202 card_name: card_name,
... ...
packageA/pages/goodsInfo/goodsInfo.wxss
... ... @@ -2575,7 +2575,7 @@ line-height: 38rpx;
2575 2575 }
2576 2576 /* 门店分类列表 */
2577 2577 .sort_store_list{
2578   - height: 82%;
  2578 + max-height: 700rpx;
2579 2579 overflow: hidden;
2580 2580 overflow-y: scroll;
2581 2581 width: 95%;
... ...
packageA/pages/myGift/myGift.js
... ... @@ -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 76 userInfo: app.globalData.userInfo,
76 77 imghost: app.globalData.setting.imghost,
77 78 isLogin: true,
  79 + now:Date.parse(new Date()) / 1000,
78 80 });
79 81  
80 82 var index=this.data.currentIndex;
... ... @@ -91,7 +93,7 @@ Page({
91 93  
92 94 if(index == 0) {
93 95 url = '/api/weshop/libao/libaoForm/page';
94   - data.timetype=1;
  96 + data.timetype=2;
95 97 } else if(index == 1) {
96 98 url = '/api/weshop/libao/libaoFormvip/page';
97 99 };
... ...
packageA/pages/myGift/myGift.wxml
... ... @@ -5,11 +5,11 @@
5 5 </view>
6 6 <view class="tab-content">
7 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 9 <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=0&id=' + item.id}}">
10 10 <!-- 图片 -->
11 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 13 <view catchtap="show_remark" data-index="{{index}}" class="lb_remark ellipsis-1" wx:if="{{item.lbintro}}">活动说明:{{item.lbintro}}</view>
14 14 </view>
15 15 <view class="desc-container">
... ... @@ -23,11 +23,11 @@
23 23 <text class="rmb">{{filter.toFix(item.lbprice,2)}}</text>/{{item.lbintegral}}积分
24 24 </block>
25 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 28 </block>
29 29 <block wx:if="{{item.lbintegral>0}}">
30   - {{item.lbintegral}}积分
  30 + {{item.lbintegral}}积分
31 31 </block>
32 32 </block>
33 33 </view>
... ... @@ -36,20 +36,28 @@
36 36 <view class="fs24 c-a4">已售{{item.salenum+item.virtualsales}}件</view>
37 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 42 </view>
42 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 53 </view>
48 54 </block>
49   -
  55 +
50 56 <block wx:else>
51 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 61 <view class="flex fdc jc_sb">
54 62 <view>
55 63 <!-- 标题 -->
... ... @@ -63,7 +71,7 @@
63 71 </view>
64 72 </view>
65 73 </block>
66   -
  74 +
67 75 <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
68 76 <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view>
69 77 </view>
... ... @@ -75,7 +83,7 @@
75 83 <view wx:if="{{show_rem_pop}}">
76 84 <view class="cover-layer" bindtap="close_remark"></view>
77 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 87 <view style="padding: 0 16rpx;">
80 88 <view class="fs32">活动说明:</view>
81 89 <view class="fs30">{{pop_remark_text}}</view>
... ...
packageA/pages/myGift/myGift.wxss
... ... @@ -52,6 +52,16 @@ page {
52 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 66 .tab-title-item::after {
57 67 position: absolute;
... ...
packageA/pages/profile/profile.wxss
... ... @@ -532,7 +532,7 @@ input {
532 532 /* 门店分类列表 */
533 533  
534 534 .sort_store_list {
535   - height: 82%;
  535 + max-height: 700rpx;
536 536 overflow: hidden;
537 537 overflow-y: scroll;
538 538 width: 95%;
... ...
packageA/pages/prom_list/prom_list.wxss
... ... @@ -267,7 +267,7 @@
267 267 }
268 268 /* 门店分类列表 */
269 269 .sort_store_list{
270   - height: 82%;
  270 + max-height: 700rpx;
271 271 overflow: hidden;
272 272 overflow-y: scroll;
273 273 width: 95%;
... ...
packageA/pages/serviceCard_pd/team_show/team_show.wxss
... ... @@ -2178,7 +2178,7 @@ page {
2178 2178  
2179 2179  
2180 2180 .sort_store_list{
2181   - height: 82%;
  2181 + max-height: 700rpx;
2182 2182 overflow: hidden;
2183 2183 overflow-y: scroll;
2184 2184 width: 95%;
... ...
packageA/pages/serviceCard_pd/team_success/team_success.js 0 → 100644
  1 +var ut = require("../../../../utils/util.js"),
  2 + e = require("../../../../utils/common.js"),
  3 + a = require("../../../../utils/wxParse/wxParse.js"),
  4 + s = getApp(),
  5 + i = s.request,
  6 + o = s.globalData.setting,
  7 + os = o;
  8 + var regeneratorRuntime = require('../../../../utils/runtime.js');
  9 +
  10 +Page({
  11 + data: {
  12 + //activity_type:1,//活动类型 商家1 阶梯2 会员3
  13 + p_status:1,//会员团的详细情况 1是正在行 2是成功 3失败
  14 + sf_length: 1,//人数大于5
  15 +
  16 + erweima:false,
  17 + meng:false,
  18 + zk:true,
  19 + stoid: o.stoid,
  20 + hiddenName: true,
  21 + teamlist:null,
  22 + teamgroup:null,
  23 + goods:null,//商品数据
  24 + pindGoods: null,//拼单数据
  25 + imageurl: o.imghost,
  26 + pay_f:0,//支付是否成功
  27 + order_sn:"",//订单编号
  28 + canvasHidden:false, //画画版
  29 + screenWidth:0,
  30 +
  31 + pd_xx: 0, //弹框
  32 + max_num:0,//最低成团人数
  33 + min_price:0,//最低价格
  34 + is_show:0,//加载完才显示
  35 +
  36 + share_img_localpath:"", //分享图片的本地图片
  37 + share_ewm_localpath: "", //分享的二维码本地图片
  38 + share_head:"", //分享头像的本地图片
  39 +
  40 + iurl:os.imghost,
  41 + ct_price:0,//阶梯团成团价格
  42 + sf_arr:null,
  43 +
  44 + },
  45 + onLoad: function (t) {
  46 + wx.setNavigationBarTitle({ title: "拼团订单",})
  47 + var that=this;
  48 + var th=this;
  49 + //获取用户设备信息,屏幕宽度
  50 + wx.getSystemInfo({
  51 + success: res => {
  52 + that.setData({ screenWidth: res.screenWidth })
  53 + }
  54 + })
  55 + var pay_f = t.payf, order_sn = t.ordersn;
  56 + this.setData({ pay_f: pay_f, order_sn: order_sn});
  57 + this.init(order_sn);
  58 +
  59 + //-- 自定义海报 --
  60 + getApp().request.promiseGet("/api/weshop/goods/poster/page",{
  61 + data:{store_id:os.stoid, type:1, is_use:1 }
  62 + }).then(res=>{
  63 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){
  64 +
  65 + var poster_data=res.data.data.pageData[0];
  66 + var json_str=poster_data.jsonStr;
  67 + if(json_str){
  68 + var json_data=JSON.parse(json_str);
  69 + if(json_data.bg_img){
  70 +
  71 + //-- 把图片那到本地 --
  72 + wx.getImageInfo({
  73 + src:json_data.bg_img,
  74 + success: function(res) {
  75 + var path= res.path;
  76 + th.setData({share_b_img:path})
  77 + },
  78 + fail: function(res) {}
  79 + });
  80 + }
  81 + th.setData({poster:json_data})
  82 + }
  83 + }
  84 + })
  85 + },
  86 + onShow:function () {
  87 + getApp().check_can_share();
  88 + },
  89 +
  90 + //关闭展开列表
  91 + click:function(e){
  92 + this.setData({
  93 + hiddenName: !this.data.hiddenName,
  94 + zk: !this.data.zk,
  95 + })
  96 + },
  97 + //打开收起拼团列表
  98 + czk:function(e){
  99 + this.setData({
  100 + zk:!this.data.zk,
  101 + hiddenName: !this.data.hiddenName,
  102 + })
  103 + },
  104 + //打开蒙板提示
  105 + cmeng:function(e){
  106 + this.setData({
  107 + meng:!this.data.meng,
  108 + })
  109 + },
  110 +
  111 + //关闭蒙板提示
  112 + cmc:function(e){
  113 + this.setData({
  114 + meng: !this.data.meng,
  115 + })
  116 + },
  117 +//打开二维码提示
  118 + cerweima:function(e){
  119 + this.setData({
  120 + meng: !this.data.meng,
  121 + erweima: !this.data.erweima,
  122 + })
  123 + },
  124 +
  125 + cerc:function(e){
  126 + this.setData({
  127 + erweima: !this.data.erweima,
  128 + meng: !this.data.meng,
  129 + })
  130 + },
  131 +
  132 + async init( order_sn) {
  133 +
  134 + wx.showLoading();
  135 +
  136 + var goods_id = 0,//商品ID,
  137 + pageteam=null,//
  138 + original_img=null ,//商品图片
  139 + order=null,//订单编号
  140 + service_list=null, //服务卡崇拜
  141 + id = 0,//团购id
  142 + pt_listno = "",//团编号
  143 + pt_prom_id = 0, //活动id
  144 + ee = this,
  145 + team_id = 0,//活动id
  146 + ordertx=[],//头像图片
  147 + share_img=null,//分享图片
  148 + teamlist=null,//活动表
  149 + teamgroup=null,//活動从表
  150 + max_num=0,//最低价格时的成团人数
  151 + p_status=1;
  152 +
  153 + //--如果商家团的时候,这个要改---
  154 + await getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", {
  155 + data: {orderSn:order_sn,storeId:os.stoid }
  156 + })
  157 +
  158 + await getApp().request.promiseGet("/api/weshop/recharge/get/"+os.stoid+"/"+order_sn, {
  159 + }).then(rs1=>{
  160 + if(rs1.data.code==0){
  161 + order=rs1.data.data;
  162 + }
  163 + })
  164 +
  165 +
  166 + //获取order信息根据订单编号order_sn
  167 + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/page", {
  168 + data: { store_id: os.stoid, order_id: order.order_id,}
  169 + }).then(res => {
  170 + service_list = res.data.data.pageData[0];
  171 + pt_prom_id = service_list.prom_id;
  172 + pt_listno = service_list.pt_listno;
  173 + })
  174 +
  175 + if (this.data.payf || service_list.pt_status == 3) p_status = 3; //失败
  176 + if (service_list.pt_status == 2 || service_list.pt_status == 4 || service_list.pt_status == 5)
  177 + p_status = 2; //成功
  178 + if (service_list.pt_status < 2 && !this.data.payf)
  179 + p_status = 1; //正在进行
  180 + if ( service_list.pt_status == 6) p_status = 4; //支付尾款失败
  181 +
  182 + //多少人参团头像
  183 + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/pagePtList", {
  184 + data: { store_id: o.stoid, pt_listno: pt_listno, }
  185 + }).then(res => {
  186 + ordertx = res.data.data.pageData;
  187 + })
  188 +
  189 + var min_price=0;
  190 + //获取活动表的信息根据活动pt_prom_id
  191 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
  192 + data: { }
  193 + }).then(res => {
  194 + if(res.data.code==0){
  195 + teamlist=res.data.data;
  196 + this.setData({
  197 + teamlist:teamlist
  198 + });
  199 + var nt =ut.gettimestamp();
  200 + teamlist.status=0;
  201 +
  202 + if (nt >= teamlist.start_time) teamlist.status = 1;
  203 + goods_id = res.data.data.goods_id;
  204 + id = res.data.data.id;
  205 + share_img = ee.data.imageurl + res.data.data.share_imgurl;
  206 +
  207 + //----------查看阶梯团------------
  208 + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined){
  209 + var ct_rylist = JSON.parse(teamlist.ct_rylist);
  210 + var max=0; var pri=0;
  211 + ct_rylist.forEach(function (val,ind) {
  212 + if(val.rynum>max){
  213 + max=val.rynum;
  214 + pri = val.price;
  215 + }
  216 + })
  217 + max_num=max;
  218 + min_price=pri;
  219 + }
  220 +
  221 + }
  222 +
  223 + //-- 商品地址 --
  224 + original_img = ee.data.imageurl+ service_list.img_url,
  225 + ee.setData({goods: service_list,image: original_img,})
  226 +
  227 +
  228 + })
  229 +
  230 + //只装5个
  231 + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;
  232 + if(max_num){
  233 + ct_nun=parseInt(max_num);
  234 + if (ordertx && ct_nun < ordertx.length) ct_nun = ordertx.length;
  235 + }
  236 +
  237 + if(ct_nun>5) ct_nun=5;
  238 + for(var i=0;i<ct_nun;i++){
  239 + if (ordertx && i >= ordertx.length) sf_num++
  240 + else
  241 + ordertx2.push(ordertx[i]);
  242 + }
  243 +
  244 + var sf_arr=[];
  245 + for (var i=0;i<sf_num;i++){
  246 + sf_arr.push(i);
  247 + }
  248 +
  249 +
  250 + //获取活动从表信息team_id:305暂时
  251 + await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
  252 + data: { store_id: os.stoid, listno: pt_listno, team_id: pt_prom_id }
  253 + }).then(res => {
  254 + teamgroup = res.data.data.pageData[0];
  255 + if (teamgroup){
  256 + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
  257 + teamgroup.buy_start_date=buy_start_date;
  258 + }
  259 + })
  260 +
  261 +
  262 + var ct_price = 0,
  263 + num_0 = ordertx.length;
  264 + if (teamlist.kttype == 3){
  265 + var js_data = JSON.parse(teamlist.ct_rylist);
  266 + js_data.forEach(function (val,ind) {
  267 + if (num_0<=val.rynum && ct_price==0){
  268 + ct_price=val.price;
  269 + }
  270 + })
  271 + if(ct_price==0) ct_price=min_price;
  272 + }
  273 +
  274 + //获取大家都在团信息
  275 + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
  276 + data:{page:1,pageSize:2}
  277 + }).then(res => {
  278 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  279 + pageteam = res.data.data.pageData;
  280 + ee.setData({pageteam: pageteam,})
  281 + }
  282 +
  283 + })
  284 +
  285 + //--当是成团的时候的操作--
  286 + if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){
  287 + //设置值
  288 +
  289 + ee.setData({
  290 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price,
  291 + order: order, share_img: share_img,max_num:max_num,
  292 + pindGoods: teamlist,is_show:1, zk:false,
  293 + hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr});
  294 +
  295 + //--是否支付了尾款--
  296 + if(order.pt_status==4 || order.pt_status==5){
  297 + ee.setData({is_pay_wk:1});
  298 + }
  299 + }else{
  300 + console.log("239什么鬼", teamlist);
  301 + //设置值
  302 + ee.setData({
  303 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup,
  304 + order: order, p_status: p_status, min_price:min_price,
  305 + share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1,
  306 + ct_price: ct_price, p_status: p_status,sf_arr:sf_arr});
  307 + }
  308 +
  309 + wx.hideLoading();
  310 +
  311 + wx.setNavigationBarTitle({
  312 + title: "拼团详情",
  313 + })
  314 +
  315 + ee.countDown2();
  316 +
  317 + //获取分享图片的本地地址
  318 + var path2 = os.imghost + teamlist.share_imgurl;
  319 + wx.getImageInfo({
  320 + src: path2,
  321 + success: function (res) {
  322 + //res.path是网络图片的本地地址
  323 + ee.data.share_img_localpath = res.path;
  324 + },
  325 + fail: function (res) {
  326 + //失败回调
  327 + }
  328 + });
  329 +
  330 +
  331 + },
  332 + //---小于10的格式化函数----
  333 + timeFormat(param) {
  334 + return param < 10 ? '0' + param : param;
  335 + },
  336 + countDown2() {
  337 + var th = this;
  338 + // 获取当前时间,同时得到活动结束时间数组
  339 + var newTime = ut.gettimestamp();
  340 + var o = this.data.teamgroup;
  341 + if(!o) return false;
  342 +
  343 + var endTime = o.kt_end_time;
  344 + if (o.status == 0) endTime = o.start_time;
  345 +
  346 + //看一下,是否要支付尾款
  347 + if(o.team_type==3 && th.data.order.pt_status==2){
  348 + endTime = o.wk_end_time;
  349 + }
  350 +
  351 + let obj = null;
  352 + // 如果活动未结束,对时间进行处理
  353 + if (endTime - newTime > 0) {
  354 + let time = (endTime - newTime);
  355 + // 获取天、时、分、秒
  356 + let day = parseInt(time / (60 * 60 * 24));
  357 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  358 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  359 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  360 + obj = {
  361 + day: this.timeFormat(day),
  362 + hou: this.timeFormat(hou),
  363 + min: this.timeFormat(min),
  364 + sec: this.timeFormat(sec)
  365 + }
  366 + } else {
  367 + //活动已结束,全部设置为'00'
  368 + obj = {
  369 + day: '00',
  370 + hou: '00',
  371 + min: '00',
  372 + sec: '00'
  373 + }
  374 + }
  375 + var txt = "pindGoods.djs";
  376 + th.setData({
  377 + obj: obj
  378 + });
  379 + setTimeout(th.countDown2, 1000);
  380 + },
  381 +
  382 + //--定义的保存图片方法,分享团---
  383 + saveImageToPhotosAlbum: function () {
  384 + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团
  385 + var type=1;
  386 + if(this.data.teamlist.kttype==3) type=2;
  387 +
  388 + wx.showLoading({ title: '生成中...', })
  389 + var that = this, th = that;
  390 + //设置画板显示,才能开始绘图
  391 + that.setData({
  392 + canvasHidden: true,
  393 + })
  394 +
  395 + if(this.data.share_hidden) {
  396 + this.setData({
  397 + share_hidden: false,
  398 + });
  399 + };
  400 +
  401 + var app = getApp();
  402 + var unit = that.data.screenWidth / 750 * 1.35;
  403 + var scene=th.data.teamgroup.id;
  404 + var goods_id=th.data.teamlist.goods_id;
  405 + var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
  406 + if(user_id>0){
  407 + scene+="_"+user_id;
  408 + }
  409 + if(goods_id !==""){
  410 + scene+="_"+goods_id;
  411 + }
  412 +
  413 + //二微码
  414 + var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+
  415 + os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show";
  416 +
  417 + console.log(path3,6000);
  418 +
  419 + //读取文件成功则OK--
  420 + wx.getImageInfo({
  421 + src: path3,
  422 + success:function (res) {
  423 + console.log(res,5000);
  424 + //回调写法
  425 + th.get_head_temp(th.get_goods_temp,function () {
  426 + var vpath = res.path;
  427 + var context = wx.createCanvasContext('share');
  428 +
  429 +
  430 + //先画背景
  431 + var pg_path = "../../../../images/share/share_bg.png";
  432 + //-- 如果有自定义海报的时候,判断背景的图片 --
  433 + if(th.data.share_b_img){
  434 + pg_path=th.data.share_b_img;
  435 + }
  436 +
  437 + var share_title=th.data.teamlist.share_title;
  438 + if(!share_title)
  439 + share_title=th.data.teamlist.title;
  440 + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  441 +
  442 + //-- 是自定义海报的情况下 --
  443 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  444 + //在线上分享人的情况下
  445 + if(parseInt(th.data.poster.show_headpic)){
  446 + //获取坐标
  447 + var x=parseFloat(th.data.poster.head_x)*2;
  448 + var y=parseFloat(th.data.poster.head_y)*2;
  449 + var x1=(x+90) *unit;
  450 + var y1=(y+50) *unit;
  451 + //--昵称---
  452 + context.setFontSize(24 * unit)
  453 + context.setFillStyle("black")
  454 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  455 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  456 + //强烈推荐 改许程
  457 + var tj_path = "../../../../images/share/q_tj.png";
  458 + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
  459 + context.setFontSize(16 * unit)
  460 + context.setLineJoin('round'); //交点设置成圆角
  461 + context.setFillStyle("white")
  462 + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit);
  463 + }
  464 +
  465 + }else{
  466 + //--昵称---
  467 + context.setFontSize(24 * unit)
  468 + context.setFillStyle("black")
  469 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  470 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  471 + //强烈推荐
  472 + var tj_path = "../../../../images/share/q_tj.png";
  473 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit);
  474 + context.setFontSize(18 * unit)
  475 + context.setFillStyle("white")
  476 + context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit);
  477 + }
  478 +
  479 +
  480 + //---产品名称---
  481 + context.setFontSize(21.3 * unit);
  482 + context.setFillStyle("black");
  483 +
  484 +
  485 +
  486 +
  487 + th.draw_Text(context,share_title,
  488 + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit);
  489 + //------产品的价格-------
  490 + context.setFontSize(24 * unit)
  491 + context.setFillStyle("red")
  492 +
  493 + var pri0 = th.data.teamlist.price;
  494 + pri0=parseFloat(pri0).toFixed(2);
  495 + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25;
  496 + context.fillText("¥", wd1-15, 180 * unit);
  497 + context.setFontSize(31 * unit)
  498 + context.fillText(pri0, wd1, 180 * unit);
  499 +
  500 + //---市场价划掉---
  501 + context.setFillStyle("gray")
  502 + context.setFontSize(22 * unit)
  503 + pri0= "¥" + parseFloat(th.data.goods.market_price).toFixed(2);
  504 + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25;
  505 + context.fillText(pri0, wd2, 210 * unit);
  506 +
  507 + context.setStrokeStyle('gray')
  508 + context.setLineWidth(1 * unit)
  509 + context.moveTo(wd2-5, 204 * unit)
  510 + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 204 * unit)
  511 + context.stroke();
  512 + console.log(th.data.share_img_localpath);
  513 +
  514 +
  515 + //---中间大图---
  516 + context.drawImage(th.data.share_img_localpath, 68 * unit, 242 * unit, 410 * unit, 410 * unit);
  517 +
  518 + var g_ct=th.data.teamlist.ct_num-th.data.ordertx.length;
  519 + var wz= "";
  520 + if(g_ct>0) wz="还差"+g_ct+"人成团,";
  521 + else{
  522 + g_ct= th.data.max_num -th.data.ordertx.length;
  523 + if(g_ct>0){
  524 + wz="还差"+g_ct+"人享最低优惠,";
  525 + }else{
  526 + wz="已享受最优惠,";
  527 + }
  528 + }
  529 +
  530 + //-------大图后面就不一样了-----------
  531 + switch (type) {
  532 + case 1://会员团和商家团的展示
  533 + //---画线---
  534 + context.setLineWidth(1 * unit)
  535 + context.moveTo(32 * unit, 670 * unit)
  536 + context.lineTo(520 * unit, 670 * unit)
  537 + context.stroke();
  538 +
  539 + //---文字---
  540 + context.setFontSize(22 * unit)
  541 + context.setFillStyle("black")
  542 + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit);
  543 +
  544 + //绘制成团图片
  545 + var ct_img ="../../../../images/share/ct_num.png";
  546 + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit);
  547 + var ct_num = th.data.teamlist.ct_num;
  548 + context.setFontSize(14 * unit)
  549 +
  550 + context.setFillStyle("red")
  551 + if(ct_num<10){
  552 + context.fillText(ct_num+"人拼团", 92 * unit, 760 * unit);
  553 + }else{
  554 + context.fillText(ct_num+"人拼团", 86 * unit, 760 * unit);
  555 + }
  556 + context.setFontSize(22 * unit)
  557 + context.fillText("已拼"+th.data.teamlist.buy_num+"份", 166 * unit, 763 * unit);
  558 + context.setFillStyle("gray")
  559 + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 826 * unit);
  560 + context.setFillStyle("black")
  561 +
  562 + context.setFontSize(22 * unit)
  563 + context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit);
  564 + //---二维吗图---
  565 + //-- 自定义海报 --
  566 + if(th.data.poster){
  567 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  568 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  569 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  570 + }else{
  571 + //---二维吗图---
  572 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  573 + }
  574 + break
  575 + case 2://阶梯团的展示
  576 + //---画线---
  577 + context.setLineWidth(1 * unit)
  578 + context.moveTo(32 * unit, 670 * unit)
  579 + context.lineTo(520 * unit, 670 * unit)
  580 + context.stroke();
  581 + //---文字---
  582 + context.setFontSize(22 * unit)
  583 + context.setFillStyle("black")
  584 + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit);
  585 + //---绘制中间阶梯的价格---
  586 + var list= JSON.parse(th.data.teamlist.ct_rylist);
  587 + for(var i=0; i<list.length;i++){
  588 + var item=list[i];
  589 + var wi=i*90*unit;
  590 + context.setFontSize(16 * unit)
  591 + context.setFillStyle("red")
  592 + context.fillText("¥", 40 * unit+wi, 756 * unit);
  593 + context.setFontSize(22 * unit)
  594 + var pri=parseFloat(item.price).toFixed(2);
  595 + context.fillText(pri, 56 * unit+wi, 756 * unit);
  596 + context.setFillStyle("gray")
  597 + context.fillText("满"+item.rynum+"人", 40 * unit+wi, 786 * unit);
  598 + }
  599 +
  600 + //----------------下面部分----------------
  601 + context.setFillStyle("gray")
  602 + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 830 * unit);
  603 + context.setFillStyle("black")
  604 + context.setFontSize(22 * unit)
  605 +
  606 + context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit);
  607 + //---二维吗图---
  608 + //-- 自定义海报 --
  609 + if(th.data.poster){
  610 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  611 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  612 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  613 + }else{
  614 + //---二维吗图---
  615 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  616 + }
  617 + break
  618 + }
  619 +
  620 + //--- 如果是自定义海报的时候 ---
  621 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  622 +
  623 + //如果显示会员信息的话
  624 + if(parseInt(th.data.poster.show_headpic)){
  625 + //获取坐标
  626 + var x= parseFloat(th.data.poster.head_x)*2;
  627 + var y=parseFloat(th.data.poster.head_y)*2;
  628 + //---绘制圆形要放在最后----
  629 + context.save();
  630 + context.beginPath();
  631 + var h_x = x* unit;
  632 + var h_y = y * unit;
  633 + var h_r = 40 * unit;
  634 + var cx = h_x + h_r;
  635 + var cy = h_y + h_r;
  636 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  637 + context.closePath();
  638 + context.fill();
  639 + context.clip();
  640 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  641 + context.restore();
  642 + }
  643 +
  644 + }else{
  645 + //---绘制圆形要放在最后----
  646 + context.save();
  647 + context.beginPath();
  648 + var h_x = 60 * unit;
  649 + var h_y = 24 * unit;
  650 + var h_r = 40 * unit;
  651 + var cx = h_x + h_r;
  652 + var cy = h_y + h_r;
  653 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  654 + context.closePath();
  655 + context.fill();
  656 + context.clip();
  657 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  658 + context.restore();
  659 + }
  660 +
  661 + //把画板内容绘制成图片,并回调 画板图片路径
  662 + context.draw(false, function () {
  663 + setTimeout(function () {
  664 + wx.canvasToTempFilePath({
  665 + x: 0, y: 0,
  666 + width: 750,
  667 + height: 1217,
  668 + destWidth: 750 * 750 / that.data.screenWidth,
  669 + destHeight: 1217 * 750 / that.data.screenWidth,
  670 + canvasId: 'share',
  671 + success: function (res) {
  672 +
  673 + that.setData({
  674 + shareImgPath: res.tempFilePath, canvasHidden: false,
  675 + })
  676 + if (!res.tempFilePath) {
  677 + wx.showModal({
  678 + title: '提示',
  679 + content: '图片绘制中,请稍后重试',
  680 + showCancel: false
  681 + })
  682 + return false;
  683 + }
  684 +
  685 + // wx.previewImage({
  686 + // //将图片预览出来
  687 + // urls: [that.data.shareImgPath]
  688 + // });
  689 +
  690 + that.setData({
  691 + showPoster: true,
  692 + });
  693 +
  694 + wx.hideLoading();
  695 + }
  696 + })
  697 + },500)
  698 + });
  699 + });
  700 + }
  701 + });
  702 + },
  703 +
  704 +
  705 + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
  706 + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) {
  707 + var lineWidth = 0;
  708 + var lastSubStrIndex = 0; //每次开始截取的字符串的索引
  709 + var han = 0;
  710 + for (let i = 0; i < str.length; i++) {
  711 + if (han == 2) return;
  712 +
  713 + //lineWidth += ctx.measureText(str[i]).width;
  714 + lineWidth += ut.measureText(str[i], 21.3 * unit);
  715 +
  716 + if (lineWidth > canvasWidth) {
  717 + han++;
  718 + if (han == 2)
  719 + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分
  720 + else
  721 + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight);
  722 +
  723 + initHeight += 22; //22为字体的高度
  724 + lineWidth = 0;
  725 + lastSubStrIndex = i;
  726 + titleHeight += 20;
  727 + }
  728 + if (i == str.length - 1) { //绘制剩余部分
  729 + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight);
  730 + }
  731 + }
  732 + },
  733 +
  734 + //c点击打开拼团弹窗
  735 + cpd: function() {
  736 + console.log("heheh");
  737 + this.setData({ pd_xx: 1,})
  738 + },
  739 +
  740 + //点击关闭拼团弹窗
  741 + close_pt_xx: function() {
  742 + this.setData({ pd_xx: 0, })
  743 + },
  744 +
  745 + go_goodsinfo:function (e) {
  746 + var index=e.currentTarget.dataset.index;
  747 + var item=this.data.pageteam[index];
  748 + var gid=item.goods_id;
  749 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+item.id+"&prom_type=6";
  750 + if(item.goods_type==1){
  751 + url="/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+item.id+"&prom_type=6";
  752 + }
  753 + getApp().goto(url); //跳到非tabbar页
  754 + },
  755 +
  756 + gohome:function () {
  757 + getApp().goto("/pages/index/index/index");
  758 + },
  759 +
  760 + //--获取头像的本地缓存,回调写法--
  761 + get_head_temp:function (tt,func) {
  762 + var ee=this;
  763 + if(ee.data.share_head){
  764 + tt(func);
  765 + return false;
  766 + }
  767 + //---获取分享图片的本地地址,头像和商品图片----
  768 + var path2 = getApp().globalData.userInfo.head_pic;
  769 + if(path2==""){
  770 + ee.data.share_head ="../../../images/share/hui_hear_pic.png";
  771 + tt(func);
  772 + }else {
  773 + path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn");
  774 + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn");
  775 + wx.getImageInfo({
  776 + src: path2,
  777 + success: function (res) {
  778 + //res.path是网络图片的本地地址
  779 + ee.data.share_head = res.path;
  780 + tt(func);;
  781 + },
  782 + fail: function (res) {
  783 + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
  784 + tt(func);
  785 + }
  786 + });
  787 + }
  788 + },
  789 +
  790 + //--获取商品图片的本地缓存,回调写法--
  791 + get_goods_temp:function (tt) {
  792 + var ee=this;
  793 + if(ee.data.share_img_localpath) {
  794 + tt();
  795 + return false;
  796 + }
  797 + var path2 = os.imghost + ee.data.teamlist.share_imgurl;
  798 + //获取商品是分享图信息
  799 + wx.getImageInfo({
  800 + src: path2,
  801 + success: function (res) {
  802 + //res.path是网络图片的本地地址
  803 + ee.data.share_img_localpath = res.path;
  804 + tt();
  805 + },
  806 + fail: function (res) {
  807 + ee.data.share_img_localpath= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的
  808 + tt();
  809 + }
  810 + });
  811 + },
  812 +
  813 + go_pay_wk:function(){
  814 + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id;
  815 + getApp().goto(url);
  816 + },
  817 +
  818 + img_show_err:function(e){
  819 + var err_img = e.currentTarget.dataset.err;
  820 + var ob={};
  821 + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  822 + this.setData(ob);
  823 +
  824 + },
  825 +
  826 + //------ 分享配置 --------
  827 + onShareAppMessage: function (e) {
  828 + getApp().globalData.no_clear=1;
  829 + var th=this;
  830 + var scene=this.data.teamgroup.id;
  831 + var goods_id=this.data.teamlist.goods_id;
  832 + var url="/pages/team/team_show/team_show?tg_id="+scene+"&goods_id="+goods_id;
  833 + //--分享图片--
  834 + var img=th.data.iurl+th.data.teamlist.share_imgurl;
  835 + //--把会员分享出去--
  836 + if(getApp().globalData.user_id){
  837 + if(url.indexOf("?")>0)
  838 + url+="&first_leader="+getApp().globalData.user_id;
  839 + else
  840 + url+="?first_leader="+getApp().globalData.user_id;
  841 + }
  842 + // console.log('url+++++>>>>>', url, th.data.teamlist.title);
  843 +
  844 + var share_title=th.data.teamlist.title;
  845 + if(th.data.teamlist.share_title){
  846 + share_title=th.data.teamlist.share_title;
  847 + }
  848 + return {
  849 + path:url,
  850 + title: share_title,
  851 + imageUrl: img,
  852 + }
  853 + },
  854 +
  855 + clickShare() {
  856 + if(!getApp().globalData.user_id){
  857 + getApp().goto("/pages/togoin/togoin");
  858 + return false;
  859 + }
  860 + this.setData({
  861 + share_hidden: true,
  862 + });
  863 + },
  864 +
  865 + send() {
  866 + this.setData({
  867 + share_hidden:false,
  868 + });
  869 + },
  870 +
  871 + cancel() {
  872 + this.setData({
  873 + share_hidden:false,
  874 + });
  875 + },
  876 +
  877 +
  878 + closePoster() {
  879 + this.setData({
  880 + showPoster: false,
  881 + });
  882 + },
  883 +
  884 +
  885 + // 保存图片到手机
  886 + savePic() {
  887 + console.log('保存图片');
  888 + var self = this;
  889 + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限
  890 + this.getSetting().then((res) => {
  891 + // 判断用户是否授权了保存到相册的权限,如果没有发起授权
  892 + if (!res.authSetting['scope.writePhotosAlbum']) {
  893 + this.authorize().then(() => {
  894 + // 同意授权后保存下载文件
  895 + this.saveImage(self.data.shareImgPath)
  896 + .then(() => {
  897 + self.setData({
  898 + showPoster: false
  899 + });
  900 + });
  901 + })
  902 + } else {
  903 + // 如果已经授权,保存下载文件
  904 + this.saveImage(self.data.shareImgPath)
  905 + .then(() => {
  906 + self.setData({
  907 + showPoster: false
  908 + });
  909 + });
  910 + }
  911 +
  912 + })
  913 + },
  914 +
  915 +
  916 + // 保存图片到系统相册
  917 + saveImage(saveUrl) {
  918 + var self = this;
  919 + return new Promise((resolve, reject) => {
  920 + wx.saveImageToPhotosAlbum({
  921 + filePath: saveUrl,
  922 + success: (res) => {
  923 + wx.showToast({
  924 + title: '保存成功',
  925 + duration: 1000,
  926 + });
  927 + self.setData({
  928 + showPlaybill: 'true'
  929 + });
  930 + resolve();
  931 + },
  932 + fail: () => {
  933 + wx.showToast({
  934 + title: '保存失败',
  935 + duration: 1000,
  936 + });
  937 + }
  938 + })
  939 + })
  940 + },
  941 +
  942 + // 获取用户已经授予了哪些权限
  943 + getSetting() {
  944 + return new Promise((resolve, reject) => {
  945 + wx.getSetting({
  946 + success: res => {
  947 + resolve(res)
  948 + }
  949 + })
  950 + })
  951 + },
  952 +
  953 + // 发起首次授权请求
  954 + authorize() {
  955 + // isFirst 用来记录是否为首次发起授权,
  956 + // 如果首次授权拒绝后,isFirst赋值为1
  957 + let isFirst = wx.getStorageSync('isFirst') || 0;
  958 + return new Promise((resolve, reject) => {
  959 + wx.authorize({
  960 + scope: 'scope.writePhotosAlbum',
  961 + // 同意授权
  962 + success: () => {
  963 + resolve();
  964 + },
  965 + // 拒绝授权,这里是用户拒绝授权后的回调
  966 + fail: res => {
  967 + if(isFirst === 0) {
  968 + wx.setStorageSync('isFirst', 1);
  969 + wx.showToast({
  970 + title: '保存失败',
  971 + icon: 'none',
  972 + duration: 1000
  973 + })
  974 + } else {
  975 + this.showModal();
  976 + }
  977 + console.log('拒绝授权');
  978 + reject();
  979 + }
  980 + })
  981 + })
  982 + },
  983 +
  984 +
  985 + go_to:function (e) {
  986 + var url=e.currentTarget.dataset.url;
  987 + getApp().goto(url);
  988 + }
  989 +
  990 +})
  991 +
... ...
packageA/pages/serviceCard_pd/team_success/team_success.json 0 → 100644
  1 +{
  2 + "windom": {
  3 + "navigationBarTitleText": "拼团订单",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
  8 + },
  9 + "usingComponents": {
  10 + "share": "/components/share/share"
  11 + }
  12 +}
0 13 \ No newline at end of file
... ...
packageA/pages/serviceCard_pd/team_success/team_success.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
  2 +<!---- //文字"-->
  3 +<view wx:if="{{is_show}}">
  4 +
  5 + <view class='center' bindtap="go_to" data-url="/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id={{goods.card_id}}&prom_type=6&prom_id={{teamlist.id}}">
  6 + <view class='cenleft'>
  7 + <image src='{{image}}' binderror='img_show_err' data-err="image"></image>
  8 + </view>
  9 + <view class='cenright'>
  10 + <!----//图片区域---->
  11 + <view class='cenrt'>
  12 + <view class='xc-goods-details ellipsis-2 fs30'>
  13 + {{goods.service_name}}
  14 + </view>
  15 + </view>
  16 + <view class='cenrcen flex-vertical-between'>
  17 + <view>
  18 + <view class="fs40 xc-wc" style='font-size:40rpx'>
  19 + <span class="fs28 xc-rmbs" style="font-weight:500;">¥</span>{{teamlist.price}}</view>
  20 + <view class="fs22 word-line xc-wc" style="width:172rpx;">
  21 + 零售价¥{{goods.show_price}}
  22 + </view>
  23 + </view>
  24 + <view class="xc-wc fs24">
  25 + <view>
  26 + <view class="">已拼{{teamlist.buy_num}}件</view>
  27 + <view class="flex xc-valframe t-c">
  28 + <view class="xc-frame-img">
  29 + <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image>
  30 + </view>
  31 + <view class="xc-people-val">
  32 + {{teamlist.ct_num}}人拼
  33 + </view>
  34 + </view>
  35 + </view>
  36 + </view>
  37 + </view>
  38 + </view>
  39 + <view class='clear'></view>
  40 + </view>
  41 + <!----以上商品显示完成---->
  42 +
  43 +
  44 + <view class='body'>
  45 + <!-- 阶梯团 -->
  46 + <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}">
  47 + 当前价格
  48 + <text class="xc-wc">¥{{ct_price}}</text>,
  49 + <block wx:if="{{max_num-ordertx.length>0}}">
  50 + <text class="xc-wc">还差{{max_num-ordertx.length}}</text>人享受最低价格<text class="xc-wc">¥{{min_price}}</text>
  51 + </block>
  52 + <block wx:else>
  53 + 该团已经拼购到最低价了哦~
  54 + </block>
  55 + </view>
  56 + <!-- 拼团成功 -->
  57 + <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}">
  58 + <view class="xc-wc">拼团成功</view>,当前价格
  59 + <text class="xc-wc">¥{{ct_price}}</text>
  60 + <view class="xc-img-frame oh">
  61 + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
  62 + </view>
  63 + </view>
  64 +
  65 + <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view>
  66 +
  67 +
  68 + <!-- 阶梯团失败 -->
  69 + <view class=".xc-fail-ladder flex-level fs28" wx:if="{{pay_f==1 || order.pt_status==3}}">
  70 + <view class="xc-wc">拼团失败</view>
  71 + <view class="xc-img-frame oh" >
  72 + <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image>
  73 + </view>
  74 + </view>
  75 +
  76 + <!-- 会员团和商家团 -->
  77 + <view class='bodytop' wx:if="{{(teamlist.kttype==2 || teamlist.kttype==1) && p_status==1}}">
  78 + 还差
  79 + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人成团,组团成功为您节省
  80 + <text class="xc-wc">{{filters.toFix(goods.show_price-teamlist.price,2)}}</text>元
  81 + </view>
  82 + <!-- 拼团成功 -->
  83 + <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}">
  84 + <view class="xc-wc">拼团成功</view>,为您节省
  85 + <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元
  86 + <view class="xc-img-frame oh">
  87 + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
  88 + </view>
  89 + </view>
  90 +
  91 + <!----//// //头像---->
  92 + <view class="flex_tou">
  93 + <view class='bodyimg flex-level'>
  94 + <view class='d' wx:for="{{ordertx2}}" wx:key>
  95 + <image src='{{item.head_pic}}'></image>
  96 + <span wx:if="{{item.is_pt_tz==1}}">团长</span>
  97 + </view>
  98 + <view class='d' wx:for="{{sf_arr}}" wx:if="{{p_status!=2}}">
  99 + <image src='{{iurl}}/miniapp/images/shafa.png'></image>
  100 + </view>
  101 +
  102 + <view class='xc-ellipsis-img flex-vertical' wx:if="{{ordertx.length>5}}">
  103 + <image class="pictures " src="{{iurl}}/miniapp/images/xc_ellipsis.png"></image>
  104 + </view>
  105 + </view>
  106 + </view>
  107 +
  108 + <view class='bodytime'>
  109 + <!----/ //旁边直线---->
  110 + <view class='bodytimeleft'>
  111 + <view class='xian'></view>
  112 + </view>
  113 +
  114 + <!-- 阶梯团 开始-->
  115 + <view class='bodytimecen' wx:if='{{p_status==1}}'>
  116 + 剩余
  117 +
  118 + <span>{{obj.hou}}</span>:
  119 + <span>{{obj.hou}}</span>:
  120 + <span>{{obj.min}}</span>:
  121 + <span>{{obj.sec}}</span>结束
  122 + </view>
  123 +
  124 + <!-- 阶梯团 成功-->
  125 + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==2 && is_pay_wk!=1}}'>
  126 + 剩余支付时间:
  127 +
  128 + <span>{{obj.hou}}</span>时
  129 + <span>{{obj.min}}</span>分
  130 + <span>{{obj.sec}}</span>秒
  131 + </view>
  132 +
  133 + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==4 }}'>
  134 + 拼团已结束
  135 + </view>
  136 +
  137 + <!-- </block> -->
  138 + <!-- 阶梯团失败 -->
  139 + <view class='bodytimecen' wx:if='{{p_status==3}}'>
  140 + 还差
  141 + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人参团, 拼团失败。
  142 + </view>
  143 + <!-- 会员团 -->
  144 + <view class='bodytimecen' wx:if='{{(teamlist.kttype==1 || teamlist.kttype==2) && p_status==2}}'>
  145 + 已经有
  146 + <text class="xc-wc">{{ordertx.length}}</text>人参团, 拼团成功。
  147 + </view>
  148 +
  149 + <!----//旁边直线---->
  150 + <view class='bodytimeright'>
  151 + <view class='xian'></view>
  152 + </view>
  153 + </view>
  154 +
  155 + <!-- 阶梯团 -->
  156 + <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'>
  157 + 拼团成功, 规定时间内支付尾款即发货
  158 + </view>
  159 + <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{p_status==1}}">
  160 + 点击下方按钮分享给小伙伴,可快速成团!
  161 + </view>
  162 +
  163 + <!-- <block wx:if="{{pay_f!=1 && order.pt_status<2}}"> -->
  164 + <!----/ // // // //按钮---->
  165 +
  166 + <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'>
  167 + <!-- 阶梯团 -->
  168 + <button wx:if="{{p_status==1}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'>
  169 + <!-- <button wx:if="{{p_status==1}}" bindtap="clickShare" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> -->
  170 + 邀请好友参团
  171 + </button>
  172 + <button bindtap="go_pay_wk" style='background-color:#42c780;' wx:if="{{order.pt_status==2 && order.is_zsorder==4 }}">
  173 + 支付尾款
  174 + </button>
  175 + </view>
  176 +
  177 + <!--会员团 商家团-->
  178 + <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare'
  179 + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button>
  180 +
  181 + <view class="xc-home-page-frame">
  182 + <button class="xc-home-page" bindtap='gohome'> 返回首页</button>
  183 + </view>
  184 +
  185 + <view class='zspan' hidden="{{hiddenName}}" bindtap='click'>查看拼团列表
  186 + <view class='down-arrow1'></view>
  187 + </view>
  188 +
  189 + </view>
  190 +
  191 + <!---/ // // // // //展开拼团列表---->
  192 + <view class='bodyfoot'>
  193 + <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'>
  194 + <span>查看拼团列表
  195 + <view class='down-arrow'></view>
  196 + </span>
  197 + </view>
  198 +
  199 + <view class='zhangxi' hidden="{{hiddenName}}" wx:for="{{ordertx}}" wx:for-index="ky">
  200 + <view class='img rel'>
  201 + <view class="xc-list" wx:if="{{item.is_pt_tz}}">
  202 + <span>团长</span>
  203 + </view>
  204 + <image src='{{item.head_pic}}'></image>{{item.nickname}}
  205 + </view>
  206 +
  207 + <view class='zssj' wx:if="{{ky==0 &&teamlist.kttype!=1}}">{{item.add_time_date}}
  208 + <text>开团</text>
  209 + </view>
  210 + <view class='zssj' wx:else>{{item.add_time_date}} 参团</view>
  211 + <view class="clear"></view>
  212 + </view>
  213 +
  214 +
  215 + <view class='clear'></view>
  216 + </view>
  217 + <view class='clear'></view>
  218 +
  219 + <!----//大家都在团---->
  220 + <view class='goodslist'>
  221 + <view class='goodslisttop'>
  222 + <!-- 推荐商品 -->
  223 + <view class="flex-center rel xc-linellae-frame">
  224 + <view class="xc-linellae"></view>
  225 + <view class="abs flex-center xc-recommend-frame ">
  226 + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png">
  227 + </image>
  228 + <view class="xc-recommend-word">大家都在团</view>
  229 + </view>
  230 + </view>
  231 + <view class='goodslisttopright'></view>
  232 + </view>
  233 + <view class="changxin">
  234 + <view class='onegoods' wx:for="{{pageteam}}" wx:key="{{index}}" bindtap="go_goodsinfo" data-index="{{index}}">
  235 + <view class='onegoodsimg'>
  236 + <image src="{{imageurl+item.share_imgurl}}"></image>
  237 + </view>
  238 + <view class="xc-buttmo-frame">
  239 + <view class='onegoodsdesc '>
  240 +
  241 + <view class='price flex-vertical-between'>
  242 + <view class='jgleft fs32 flex-center xc-wc'>
  243 + <view class="xc-ping xc-wc fs26 t-c">拼</view>
  244 + <text class="fs20"style='height:39rpx;margin-right:5rpx;margin-left:15rpx;' >¥</text>{{item.price}}
  245 + </view>
  246 + <view class='jgright'>{{item.ct_num}}
  247 + <span>人参团</span>
  248 + </view>
  249 + </view>
  250 + </view>
  251 + <view class="xc-shuoming ellipsis-2 fs26">
  252 + <text>{{item.goods_name}}</text>
  253 + </view>
  254 + </view>
  255 + </view>
  256 + </view>
  257 + </view>
  258 +</view>
  259 +
  260 +
  261 +<!--二维码显示页面-->
  262 +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{canvasHidden}}'></canvas>
  263 +<!--拼团玩法弹出框-->
  264 +<!----弹起的---->
  265 +<block wx:if="{{pd_xx}}">
  266 + <view class="bview"></view>
  267 + <view class="juzhong">
  268 + <view class="xq">
  269 + <view class="title" bindtap="close_pt_xx">拼团玩法介绍
  270 + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image>
  271 + </view>
  272 + <view>1.开团:
  273 + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text>
  274 + </view>
  275 + <view>2.参团:
  276 + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text>
  277 + </view>
  278 + <view>3.成团:
  279 + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text>
  280 + </view>
  281 + <view>4.组团失败:
  282 + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text>
  283 + </view>
  284 + <view>5.
  285 + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。 </text>
  286 + </view>
  287 + </view>
  288 + </view>
  289 +</block>
  290 +
  291 +<!-- 分享控件,底部弹出 -->
  292 +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
  293 +
  294 +<view wx:if="{{showPoster}}">
  295 + <view class="mask" catchtap="closePoster"></view>
  296 + <view class="poster-container">
  297 + <view class="poster-wrapper">
  298 + <view class="poster">
  299 + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image>
  300 + <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view>
  301 + </view>
  302 + <view class="btn-container">
  303 + <button class="btn-share" bindtap="savePic">保存到相册</button>
  304 + </view>
  305 + </view>
  306 + </view>
  307 +</view>
  308 +
  309 +
  310 +
... ...
packageA/pages/serviceCard_pd/team_success/team_success.wxss 0 → 100644
  1 +page{
  2 + background-color:#eee;
  3 +}
  4 +.top{
  5 + background-color:rgb(216, 230, 220);
  6 + color: rgb(98, 155, 13);
  7 + text-align: center;
  8 + height:120rpx;
  9 + width: 100%;
  10 + padding-top:24rpx;
  11 +}
  12 +
  13 +.center{
  14 + height: 240rpx;
  15 + width: 100%;
  16 + position: relative;
  17 + background:#fff;
  18 +}
  19 +
  20 +.cenleft{
  21 + width: 240rpx;
  22 + height: 100%;
  23 +
  24 + float: left;
  25 + display:flex;
  26 + justify-content: center;
  27 + align-items: center;
  28 +}
  29 +
  30 +.cenleft image{
  31 + background-color:white ;
  32 + width: 200rpx;
  33 + height: 200rpx;
  34 +
  35 +}
  36 +
  37 +
  38 +.cenrt{
  39 + width: 460rpx; margin-top: 10rpx;
  40 +}
  41 +
  42 +.cenright{
  43 + height: 100%;
  44 + width: 460rpx;
  45 +
  46 + float: left;
  47 +}
  48 +
  49 +.cenrtop{
  50 + margin-top: 10rpx;
  51 + background-color: red;
  52 + color: white;
  53 + border-radius:10rpx;
  54 + padding-left: 16rpx;
  55 + width: 140rpx;
  56 + font-size: 32rpx;
  57 + float: left;
  58 + height: 40rpx;
  59 +}
  60 +
  61 +.cenrtoptitle{
  62 + float: left;
  63 + width: 295rpx;
  64 + height: 40rpx;
  65 + margin-left: 12rpx;
  66 + font-size: 28rpx;
  67 + margin-top:12rpx;
  68 +}
  69 +
  70 +.cenrtoptitle>span{
  71 + width: 100%;
  72 + display: inline-block;
  73 + overflow:hidden;
  74 + text-overflow:ellipsis;
  75 + white-space:nowrap
  76 +}
  77 +
  78 +.cenrcen{
  79 + height: 70rpx;
  80 + margin-top: 35rpx;
  81 + width:474rpx;
  82 +}
  83 +.jg{ font-size: 40rpx;
  84 + margin-right: 30rpx;}
  85 +.jgx{
  86 + font-size: 28rpx;
  87 + color: #777;
  88 + text-decoration:line-through;
  89 + margin-left: 20rpx;
  90 +}
  91 +
  92 +.cenrfoot{
  93 + align-content: center;
  94 + text-align: center;
  95 + border: 2rpx solid red;
  96 + border-radius:10rpx;
  97 + color: red;
  98 + float: left;
  99 + font-size: 24rpx;
  100 + padding: 4rpx 16rpx;
  101 +}
  102 +
  103 +.body{
  104 + background-color: white;
  105 + /* min-height:418rpx; */
  106 + width: 100%;
  107 + margin-top: 4rpx;
  108 + border-top:5rpx solid #eee;
  109 + height: auto;
  110 +}
  111 +
  112 +.bodytop{
  113 + background-color: white;
  114 + text-align: center;
  115 + font-size: 28rpx;
  116 + height:100rpx;
  117 + line-height:117rpx;
  118 +
  119 +}
  120 +
  121 +.bodytop span{
  122 + color: red;
  123 +}
  124 +
  125 +
  126 +.bodyimg{
  127 + height:140rpx;
  128 + width:590rpx;
  129 +
  130 +
  131 +
  132 +}
  133 +.bodyimg image{
  134 +
  135 +border-radius:50rpx;
  136 +height: 96rpx;
  137 +width: 96rpx;
  138 +background-color:burlywood;
  139 +margin-top: 30rpx;
  140 + position: absolute;
  141 +
  142 +}
  143 +
  144 +.d{
  145 +width:101rpx;
  146 + height:101rpx;
  147 + display: inline-block;
  148 + margin-right:15rpx;
  149 +
  150 +}
  151 +
  152 +.bodyimg span{
  153 + background-color:#e22b44;
  154 + color: white;
  155 + font-size: 24rpx;
  156 + border-radius:6rpx;
  157 + padding:2rpx 10rpx;
  158 + position: relative;
  159 + top: 0rpx;
  160 + left: 40rpx;
  161 +}
  162 +
  163 +
  164 +
  165 +.bodyspan{
  166 + color: red;
  167 + text-align: center;
  168 + font-size: 26rpx;
  169 +
  170 +}
  171 +
  172 +.bodyselect{
  173 + line-height: 47rpx;
  174 +}
  175 +
  176 +.bodytime{
  177 + height: 88rpx;
  178 + width: 100%;
  179 + display: flex;
  180 + flex-wrap: nowrap;
  181 + margin-left:40rpx;
  182 + align-items:center;
  183 +
  184 +}
  185 +
  186 +.bodytimeleft{
  187 + text-decoration:line-through;
  188 + flex-grow: 1.7;
  189 +}
  190 +
  191 +
  192 +.bodytimecen-success{
  193 + text-align: center;
  194 + flex-grow: 1;
  195 + line-height:75rpx;
  196 + font-size: 30rpx;
  197 + color: #000;
  198 +}
  199 +.bodytimecen-success span{
  200 +
  201 + color: #18ba5f;
  202 + border-radius:7rpx;
  203 + font-size: 30rpx;
  204 + margin: 0 auto;
  205 +
  206 +}
  207 +.bodytimecen{
  208 + text-align: center;
  209 + flex-grow: 1;
  210 +
  211 + font-size: 30rpx;
  212 + color: #000;
  213 +}
  214 +.bodytimecen span{
  215 + background-color: #333333;
  216 + color: white;
  217 + border-radius:7rpx;
  218 + padding-left: 10rpx;
  219 + font-size: 30rpx;
  220 + margin: 0 auto;
  221 + padding-right:10rpx;
  222 + margin-right:5px
  223 +}
  224 +
  225 +
  226 +.bodytimecen span:last-child{
  227 + margin-right: 10rpx;
  228 +}
  229 +
  230 +.bodytimeright{
  231 + flex-grow: 1.7;
  232 + margin-right:72rpx;
  233 +
  234 +}
  235 +
  236 +.bodybutton{
  237 + width: 90%;
  238 + margin: 0 auto;
  239 + text-align: center;
  240 + line-height: 60rpx;
  241 + border-radius:15rpx;
  242 + height: auto;
  243 +}
  244 +
  245 +.bodybutton button{
  246 + height:60rpx;
  247 + width: 100%;
  248 + background-color: #e4374d;
  249 + color: white;
  250 + font-size:26rpx;
  251 + border-radius:12rpx;
  252 +
  253 +}
  254 +
  255 +.bodyfoot{
  256 +
  257 + width: 100%;
  258 + text-align: center;
  259 +
  260 + font-size: 28rpx;
  261 + color: #000;
  262 + background-color: white;
  263 +}
  264 +
  265 +
  266 +
  267 +
  268 +
  269 +.pintuan{
  270 + width: 100%;
  271 + height: 84rpx;
  272 + background-color: white;
  273 + color: black;
  274 + text-align: center;
  275 + font-size:36rpx;
  276 + margin-top: 60rpx;
  277 +}
  278 +
  279 +.pintuanzhou{
  280 +float: left;
  281 +
  282 +line-height: 84rpx;
  283 +width: 220rpx;
  284 +}
  285 +
  286 +.pintuanyou{
  287 + float: right;
  288 + color: rgb(168, 167, 167);
  289 + line-height: 84rpx;
  290 + font-size: 28rpx;
  291 + margin-right: 20rpx;
  292 +}
  293 +
  294 +.onegoods{
  295 + background-color: white;
  296 + width: 345rpx;
  297 + min-height: 490rpx;
  298 + height:auto;
  299 +
  300 + border:2rpx solid #eee;
  301 +
  302 + float: left;
  303 + margin-right:17rpx;
  304 + border-radius:20rpx;
  305 +}
  306 +
  307 +.goodsl{
  308 + background-color: white;
  309 +}
  310 +
  311 +.onegoodsimg{
  312 + width: 100%;
  313 + height: 360rpx;
  314 +}
  315 +
  316 +.onegoodsimg image{
  317 + height: 100%;
  318 + width: 100%;
  319 + border-radius:20rpx 20rpx 0 0;
  320 +
  321 +}
  322 + .xc-buttmo-frame{
  323 + min-height: 103rpx;
  324 + height: auto;
  325 + padding-bottom:15rpx;
  326 +
  327 + }
  328 +.xc-buttmo-frame .onegoodsdesc {
  329 +
  330 + height: 80rpx;
  331 +}
  332 +
  333 +.xc-buttmo-frame .onegoodsdesc .price{
  334 +
  335 + padding-left:10rpx;
  336 + height:85rpx;
  337 +
  338 +}
  339 +.xc-ping{
  340 + border-radius: 50%;
  341 + background: #fff;
  342 + line-height:34rpx;
  343 +width:34rpx;
  344 +height:34rpx;
  345 +font-size:24rpx;
  346 +
  347 +}
  348 +.jgleft{
  349 +border-radius:36rpx;
  350 +height:45rpx;
  351 +line-height:50rpx;
  352 +color:#fff;
  353 +padding-left:7rpx;
  354 +padding-right:24rpx;
  355 +background:#e4374d;
  356 +}
  357 +
  358 +.jgright{
  359 + font-size: 26rpx;
  360 + height:16rpx;
  361 +padding-right:10rpx;
  362 +color:rgb(168, 167, 167);
  363 +}
  364 +
  365 +.jgright span{
  366 + color: rgb(168, 167, 167);
  367 +}
  368 +
  369 +.goodslisttop{
  370 + width: 100%;
  371 +}
  372 +
  373 +.goodslisttop{
  374 + width: 100%;
  375 + margin-top: 5rpx;
  376 + border-bottom: 4rpx solid #eee;
  377 + text-align: center;
  378 +}
  379 +
  380 +.goodslistspan{
  381 +
  382 + margin: 0 auto;
  383 + padding-top: 20rpx;
  384 +}
  385 +
  386 +.xian{
  387 + width: 100%;
  388 + border-bottom: 2rpx solid #eee;
  389 + float: left;
  390 +}
  391 +
  392 +.bodyselect{
  393 + height: 90rpx;
  394 + background-color: white;
  395 + width: 100%;
  396 + line-height:90rpx;
  397 +
  398 +}
  399 +
  400 +
  401 +.changxin{
  402 + overflow: hidden;
  403 + width: 100%;
  404 + padding-left:20rpx;
  405 +
  406 +}
  407 +
  408 +.zhangxi{
  409 + width: 100%;
  410 + background-color:white;
  411 + color: black;
  412 +}
  413 +
  414 +.img{
  415 + height: 100rpx;
  416 + margin-bottom: 0rpx;
  417 + float: left;
  418 + color: black;
  419 + line-height:100rpx;
  420 +display:flex;
  421 +align-items:center;
  422 +
  423 +}
  424 +
  425 +.zhangxi image{
  426 + border-radius:50rpx;
  427 + height: 60rpx;
  428 + width: 60rpx;
  429 + float: left;
  430 +
  431 + background-color: red;
  432 + margin-left: 40rpx;
  433 + margin-right:10rpx;
  434 +
  435 +}
  436 +
  437 +.zhangxi .zssj{
  438 + width: 413rpx;
  439 + margin-left: 28rpx;
  440 + float: right;
  441 + margin-top:32rpx;
  442 +}
  443 +
  444 +.zspan{
  445 + float: left;
  446 + text-align: center;
  447 + display: flex;
  448 + align-items: center;
  449 + justify-content: center;
  450 + height: 48rpx;
  451 + font-size: 28rpx;
  452 + color:#000;
  453 + margin-bottom: 10rpx;
  454 + padding-bottom: 10rpx;
  455 + width: 100%;
  456 + background: #fff;
  457 + border-bottom:3rpx solid #eee;
  458 + margin-top:20rpx;
  459 +
  460 +}
  461 +
  462 +
  463 +
  464 +.mtop{
  465 + text-align: center;
  466 + color: white;
  467 + background-color:rgba(0, 0, 0, .4);
  468 + width: 100%;
  469 + height: 100%;
  470 + position: fixed;
  471 + z-index: 5;top:0;left: 0;
  472 +
  473 +}
  474 +
  475 +.mt1{
  476 + margin-top: 200rpx;
  477 + margin-bottom: 20rpx;
  478 +}
  479 +
  480 +.mts{
  481 + color:#E1E10B;
  482 +}
  483 +
  484 +.mcou{
  485 + font-size: 48rpx;
  486 +
  487 +}
  488 +
  489 +.mfoot{
  490 + width: 100%;
  491 + margin-top: 700rpx;
  492 +}
  493 +
  494 +
  495 +.mbtn{
  496 + margin-top: 60rrpx;
  497 + width: 400rpx;
  498 + background: #666666;
  499 + color: #fff;
  500 + border-radius: 20rpx;
  501 + font-size: 32rpx;
  502 +}
  503 +
  504 +
  505 +
  506 +
  507 +
  508 +
  509 +
  510 +.etop{
  511 + padding-top: 200rpx;
  512 + width: 100%;
  513 + height: 100%;
  514 + position: fixed;
  515 + left: 0rpx;
  516 + top: 0rpx;
  517 + z-index: 12rpx;
  518 +background-color:rgba(0, 0, 0, .4);
  519 +
  520 +}
  521 +
  522 +.emyimage{
  523 + display:flex;
  524 + justify-content: center;
  525 + align-items: center;
  526 +}
  527 +
  528 +
  529 +.emyimage image{
  530 + background-color: red;
  531 + width: 300rpx;
  532 + height: 300rpx;
  533 + margin: 0 auto;
  534 +
  535 +}
  536 +
  537 +.espan{
  538 + font-size: 32rpx;
  539 + margin-top: 10rpx;
  540 +}
  541 +
  542 +.erweima{
  543 + margin-top: 10rpx;
  544 + display: flex;
  545 + width: 100%;
  546 +
  547 +}
  548 +
  549 +.erzhou{
  550 + width: 200rpx;
  551 +
  552 +
  553 + margin-right: 20rpx;
  554 +}
  555 +
  556 +.erzhou image{
  557 + background-color: blanchedalmond;
  558 + width: 200rpx;
  559 + height: 200rpx;
  560 +}
  561 +
  562 +
  563 +.eright{
  564 + width: 500rpx;
  565 + font-size: 32rpx;
  566 +
  567 +}
  568 +
  569 +
  570 +
  571 +.ecc{
  572 + float: right;
  573 + margin-right: 48rpx;
  574 +}
  575 +
  576 +
  577 +.eee{
  578 + padding-top:40rpx;
  579 +
  580 +width:90%;
  581 +height:70%;
  582 +
  583 +padding-left:32rpx;
  584 +margin-left:20rpx;
  585 +
  586 +background-color:white;
  587 +
  588 +}
  589 +
  590 +.clear{
  591 + clear: both;
  592 +}
  593 +
  594 +.down-arrow {
  595 + display: inline-block;
  596 + position: relative;
  597 + width: 40rpx;
  598 + height: 30rpx;
  599 + margin-right: 20rpx;
  600 +}
  601 +
  602 +.down-arrow::after {
  603 + display: inline-block;
  604 + content: " ";
  605 + height: 18rpx;
  606 + width: 18rpx;
  607 + border-width: 0 2rpx 2rpx 0;
  608 + border-color: #000;
  609 + border-style: solid;
  610 + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  611 + transform-origin: center;
  612 + transition: transform 0.3s;
  613 + position: absolute;
  614 + top: 50%;
  615 + right: 10rpx;
  616 + margin-top: -10rpx;
  617 +}
  618 +
  619 +.down-arrow1 {
  620 + display: inline-block;
  621 + position: relative;
  622 + width: 40rpx;
  623 + height: 30rpx;
  624 + margin-right: 20rpx;
  625 + margin-top: 12rpx;
  626 +}
  627 +
  628 +.down-arrow1::after {
  629 + display: inline-block;
  630 + content: " ";
  631 + height: 18rpx;
  632 + width: 18rpx;
  633 + border-width: 0 2rpx 2rpx 0;
  634 + border-color: #000;
  635 + border-style: solid;
  636 + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  637 + transform-origin: center;
  638 + transition: transform 0.3s;
  639 + position: absolute;
  640 + top: 50%;
  641 + right: 10rpx;
  642 + margin-top: -10rpx;
  643 +}
  644 +
  645 +.down-arrow1::after {
  646 + transform-origin: center;
  647 + transform: rotate(-135deg);
  648 + transition: transform 0.3s;
  649 +}
  650 +
  651 +.bview {
  652 + position: fixed;
  653 + top: 0;
  654 + left: 0;
  655 + width: 100%;
  656 + height: 100%;
  657 + background-color: rgba(0, 0, 0, 0.5);
  658 +}
  659 +
  660 +.juzhong {
  661 + position: fixed;
  662 + top: 0;
  663 + left: 0;
  664 + width: 100%;
  665 + height: 100%;
  666 + display: flex;
  667 + flex-direction: row;
  668 + justify-content: center;
  669 + align-items: center;
  670 +}
  671 +
  672 +.juzhong .xq {
  673 + padding: 0 20rpx;
  674 + background: #fff;
  675 + font-size: 30rpx;
  676 + padding-bottom: 20rpx;
  677 +}
  678 +
  679 +.juzhong .xq .title {
  680 + text-align: center;
  681 + margin: 20rpx 0;
  682 + position: relative;
  683 + height: 50rpx;
  684 +}
  685 +
  686 +.juzhong .xq .hs1 {
  687 + font-size: 28rpx;
  688 + color: #ab8f9e;
  689 +}
  690 +
  691 +.juzhong .xq .title .close {
  692 + position: absolute;
  693 + top: 0;
  694 + right: 0;
  695 + width: 45rpx;
  696 + height: 45rpx;
  697 +}
  698 +
  699 +.pt_qd {
  700 + margin-top: 40rpx;
  701 + height: auto;
  702 +}
  703 +
  704 +.spec-cart-btn.w100 {
  705 + width: 100%;
  706 + margin-left: 0;
  707 + height: 80rpx;
  708 + line-height: 80rpx;
  709 +}
  710 +
  711 +.pt_status_set{
  712 + position: absolute; right: 10rpx; top:50rpx; width: 120rpx; height: 120rpx;
  713 +}
  714 +
  715 +
  716 +
  717 +.xc-goods-details{
  718 +width:479rpx;
  719 +margin-top:20rpx;
  720 +height:77rpx;
  721 +}
  722 +
  723 +.xc-valframe{
  724 + border-radius:7rpx;
  725 +border:1rpx solid;
  726 +margin-top:3rpx;
  727 +}
  728 +.xc-valframe .xc-frame-img{
  729 + width:30rpx;
  730 +height:100%;
  731 +background:#e22b44;
  732 +}
  733 +.xc-valframe .xc-frame-img .picture{
  734 + width:25rpx;
  735 +height:25rpx;
  736 +margin-top:4rpx;
  737 +
  738 +}
  739 +.xc-ellipsis-img{
  740 +width:56rpx;
  741 +height:96rpx;
  742 +
  743 +}
  744 +.xc-ellipsis-img .pictures{
  745 + width:56rpx;height:56rpx;
  746 +}
  747 +.flex_tou{ display: flex; justify-content: center; width: 100%;}
  748 +.xc-ptcomplete{
  749 + width:74%;
  750 +height:105rpx;
  751 +line-height:105rpx;
  752 +float:right;
  753 +
  754 +}
  755 +.xc-ptcomplete .xc-img-frame .img{
  756 + width: 105rpx;
  757 + height: 105rpx;
  758 + float: right;
  759 +}
  760 +.xc-ptcomplete-ladder .xc-img-frame{
  761 + width:201rpx;
  762 + height: 105rpx;
  763 + margin-top:20rpx;
  764 +}
  765 +.xc-ptcomplete-ladder .xc-img-frame .img{
  766 + width: 105rpx;
  767 + height: 105rpx;
  768 + float: right;
  769 + padding-right:6rpx;
  770 +}
  771 +.xc-ptcomplete .xc-img-frame{
  772 + width:190rpx;
  773 + height: 105rpx;
  774 + margin-top:20rpx;
  775 +}
  776 +.xc-ptcomplete .xc-end{
  777 + width:283rpx;
  778 +text-align:right;
  779 +}
  780 +.iw{
  781 +padding-right:33rpx;
  782 +}
  783 +.xc-ptcomplete .xc-img-frames{
  784 + width:360rpx;
  785 +height:105rpx;
  786 +margin-top:20rpx;
  787 +
  788 +}
  789 +.xc-ptcomplete .xc-img-frames .img{
  790 + width: 105rpx;
  791 + height: 105rpx;
  792 + float: right;
  793 + padding-right:6rpx;
  794 +}
  795 +.xc-home-page-frame{
  796 + padding-top:16rpx;
  797 +
  798 +}
  799 +.xc-home-page-frame .xc-home-page{
  800 + background-color: #e22b44;border-radius:15rpx;
  801 +width:90%;
  802 +color:#fff;
  803 +height:60rpx;
  804 +font-size:26rpx;
  805 +line-height:60rpx;
  806 +}
  807 +/* */
  808 +.xc-people-val{
  809 + padding-left:8rpx;
  810 +padding-right:8rpx;
  811 +}
  812 +.xc-onclik{
  813 + width:100%;
  814 +height:70rpx;
  815 +
  816 +}
  817 +.xc-green{
  818 + color: #18ba5f;
  819 + text-align:center;
  820 +flex-grow:1;
  821 +height:90rpx;
  822 +
  823 +
  824 +}
  825 +.xc-ptcomplete-ladder{
  826 + width:74%;
  827 +height:105rpx;
  828 +line-height:105rpx;
  829 +float:right;
  830 +}
  831 +.xc-fail-ladder{
  832 + width:61%;
  833 +height:105rpx;
  834 +line-height:105rpx;
  835 +float:right;
  836 +
  837 +}
  838 +.xc-fail-ladder .xc-img-frame{
  839 + width:61%;
  840 +height:105rpx;
  841 +margin-top:20rpx;
  842 +}
  843 +.xc-fail-ladder .xc-img-frame .img{
  844 + width: 105rpx;
  845 + height: 105rpx;
  846 + float: right;
  847 + padding-right:6rpx;
  848 +}
  849 +.xc-list{
  850 + background-color:#e22b44;
  851 +color:white;
  852 +font-size:17rpx;
  853 +border-radius:6rpx;
  854 +padding:0 5rpx;
  855 +position:absolute;
  856 +top:13rpx;
  857 +left:80rpx;
  858 +width:34rpx;
  859 +line-height:25rpx;
  860 +
  861 +}
  862 +
  863 +.xc-linellae-frame{
  864 + width: 100%;
  865 + height: 60rpx;
  866 + background: #eee;
  867 +}
  868 +.xc-linellae-frame .xc-linellae{
  869 + width: 425rpx;
  870 + height: 1rpx;
  871 + border-bottom: 1rpx solid #a5a5a5;
  872 +}
  873 +.xc-recommend-frame{
  874 +background:#eee;
  875 +width:200rpx;
  876 +height:100%;
  877 +
  878 +}
  879 +.xc-recommend-frame .xc-recommend{
  880 + width: 35rpx;
  881 + height: 27rpx;
  882 + margin-top:7rpx;
  883 +}
  884 +.xc-recommend-frame .xc-recommend-word{
  885 +font-size:26rpx;
  886 +color: #a9a9a9;
  887 +margin-left:5rpx;
  888 +}
  889 +.xc-rmbs{
  890 +
  891 +height:40rpx;
  892 +}
  893 +.xc-shuoming{
  894 + padding-left:10rpx;
  895 +}
  896 +
  897 +
  898 +.poster-container {
  899 + box-sizing: border-box;
  900 + position: fixed;
  901 + top: 50%;
  902 + left: 50%;
  903 + transform: translate(-50%, -50%);
  904 + width: calc(100% - 210rpx);
  905 + z-index: 1000;
  906 +}
  907 +.mask {
  908 + position: fixed;
  909 + top: 0;
  910 + left: 0;
  911 + width: 100%;
  912 + height: 100%;
  913 + z-index: 999;
  914 + background-color: rgba(0,0,0,.4);
  915 +}
  916 +.poster-wrapper {
  917 + width: 100%;
  918 +}
  919 +
  920 +.poster {
  921 + box-sizing: border-box;
  922 + width: 100%;
  923 + height: 905rpx;
  924 + border-radius: 20rpx;
  925 + /* box-shadow: 0 8px 12px #666; */
  926 + position: relative;
  927 + z-index: 999;
  928 + overflow: hidden;
  929 +}
  930 +.poster-img {
  931 + display: block;
  932 + width: 100%;
  933 + height: 100%;
  934 +}
  935 +.btn-container {
  936 + display: flex;
  937 + justify-content: space-around;
  938 +}
  939 +.btn-share {
  940 + display: block;
  941 + background-color: #FE6867;
  942 + color: white;
  943 + border-radius: 8rpx;
  944 + line-height: 80rpx;
  945 + margin-top: 28rpx;
  946 + padding: 0 60rpx;
  947 +}
  948 +
  949 +
  950 +.btn-close {
  951 + /* background-color: rgba(0,0,0,.5); */
  952 + color: #ccc;
  953 + width: 50rpx;
  954 + height: 50rpx;
  955 + line-height: 50rpx;
  956 + text-align: center;
  957 + border-radius: 50%;
  958 + position: absolute;
  959 + right: 20rpx;
  960 + top: 20rpx;
  961 +}
  962 +
  963 +.icon-close {
  964 + font-size: 48rpx;
  965 +}
0 966 \ No newline at end of file
... ...
packageB/pages/zuhegou/index/index.wxss
... ... @@ -338,7 +338,7 @@ page {
338 338 }
339 339 /* 门店分类列表 */
340 340 .sort_store_list{
341   - height: 82%;
  341 + max-height: 700rpx;
342 342 overflow: hidden;
343 343 overflow-y: scroll;
344 344 width: 95%;
... ...
packageB/pages/zuhegou/preindex/index.wxss
... ... @@ -334,7 +334,7 @@ page {
334 334 }
335 335 /* 门店分类列表 */
336 336 .sort_store_list{
337   - height: 82%;
  337 + max-height: 700rpx;
338 338 overflow: hidden;
339 339 overflow-y: scroll;
340 340 width: 95%;
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
... ... @@ -2574,7 +2574,7 @@ line-height: 38rpx;
2574 2574 }
2575 2575 /* 门店分类列表 */
2576 2576 .sort_store_list{
2577   - height: 82%;
  2577 + max-height: 700rpx;
2578 2578 overflow: hidden;
2579 2579 overflow-y: scroll;
2580 2580 width: 95%;
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -1555,10 +1555,8 @@ Page({
1555 1555 if (!title) title = th.data.prom_act.title;
1556 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 1561 var url = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + th.data.gid+"&pre_id="+th.data.pre_arr.id;
1564 1562 if (getApp().globalData.user_id) {
... ... @@ -3133,13 +3131,9 @@ Page({
3133 3131 tt();
3134 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 3139 wx.getImageInfo({
... ...
packageC/pages/presell/goodsInfo/goodsInfo.wxss
... ... @@ -2570,7 +2570,7 @@ line-height: 38rpx;
2570 2570 }
2571 2571 /* 门店分类列表 */
2572 2572 .sort_store_list{
2573   - height: 82%;
  2573 + max-height: 700rpx;
2574 2574 overflow: hidden;
2575 2575 overflow-y: scroll;
2576 2576 width: 95%;
... ...
packageC/pages/presell/list/list.js
... ... @@ -58,6 +58,24 @@ Page({
58 58 }else{
59 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 80 onShow: function (t) {
63 81 var userInfo=getApp().globalData.userInfo;
... ... @@ -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 + });
... ...
packageC/pages/presell/pregoodsInfo/goodsInfo.wxss
... ... @@ -2570,7 +2570,7 @@ line-height: 38rpx;
2570 2570 }
2571 2571 /* 门店分类列表 */
2572 2572 .sort_store_list{
2573   - height: 82%;
  2573 + max-height: 700rpx;
2574 2574 overflow: hidden;
2575 2575 overflow-y: scroll;
2576 2576 width: 95%;
... ...
packageD/pages/user/coupons/filter.wxs
... ... @@ -39,11 +39,11 @@ var numFr = {
39 39 break;
40 40 };
41 41 case 1: {
42   - return '已过从我的专享礼包,期';
  42 + return '从我的专享礼包获取';
43 43 break;
44 44 };
45 45 case 2: {
46   - return '从我的幸运大转盘,';
  46 + return '从我的幸运大转盘获取,';
47 47 break;
48 48 };
49 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 9 var t = getApp(),
2 10 a = t.request,
3 11 o = t.globalData.setting,
... ... @@ -24,7 +32,7 @@ Page({
24 32 return false;
25 33 }
26 34 wx.setNavigationBarTitle({
27   - title: "预存款",
  35 + title: "储值款",
28 36 })
29 37  
30 38 var th = this;
... ...
packageD/pages/user/deposit/deposit.wxml
1 1 <image class="pictuer" src='{{iurl}}/miniapp/images/usermoney/100.jpg'>
2 2 <view class="big">
3   - <view class="font-one">预存款</view>
  3 + <view class="font-one">储值款</view>
4 4 <view class="deposit">
5 5 <view class="rmb" >¥</view><view class="font-two">{{yucun_money}}</view>
6 6 </view>
... ... @@ -9,20 +9,20 @@
9 9 <view class="big-rim">
10 10 <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'>
11 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 13 <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image>
14 14 </view>
15 15 </view>
16 16  
17 17 <view class="min-rim-one" type='primary'>
18 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 20 </view>
21 21  
22 22  
23 23 <view wx:if="{{parameter}}">
24 24  
25   - <view class="mysj">暂无任何预存款</view>
  25 + <view class="mysj">暂无任何储值款</view>
26 26 </view>
27 27 <view wx:else>
28 28 <block wx:for="{{list}}" wx:for-index="idx" wx:for-item="list">
... ...
pages/cart/cart2/cart2.js
... ... @@ -130,8 +130,9 @@ Page({
130 130 ladder_map: {}, //阶梯促销的map表
131 131 is_no_past: 1,
132 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 137 onLoad: function (t) {
137 138 wx.setNavigationBarTitle({ title: "填写订单", })
... ... @@ -171,7 +172,8 @@ Page({
171 172 isget_by_quan: {},
172 173 is_no_by: {},
173 174 is_by: {},
174   - send_gf:{}
  175 + send_gf: {},
  176 + send_lb: {},
175 177 })
176 178 },
177 179  
... ... @@ -188,7 +190,6 @@ Page({
188 190  
189 191 } else {
190 192 this.getuser_addr(function (ie) {
191   -
192 193 console.log("getuser_addr")
193 194 console.log(ie)
194 195 //地址切换要把包邮券清空
... ... @@ -381,7 +382,7 @@ Page({
381 382 to.get_allsto(function (e) {
382 383 th.setData({ allsto: e });
383 384 //-------获取购物车已经选择的商品--------
384   - console.log('购物车结算');
  385 + console.log('购物车结算');
385 386  
386 387 th.get_cart();
387 388 })
... ... @@ -408,7 +409,7 @@ Page({
408 409  
409 410 //-----真的获取购物车,入口--------
410 411 get_cart: function () {
411   - var th = this, app = getApp();
  412 + var th = this, app = getApp();
412 413 var state = 0;
413 414 if (th.data.state) state = 1;
414 415 a.get("/api/weshop/cart/list", {
... ... @@ -452,6 +453,7 @@ Page({
452 453  
453 454 //要把优惠活动加入,prom_goods_map中,赠品不要运算
454 455 if (item1.prom_type == 3 && item1.is_gift != 1) {
  456 + // th.check_is_youhui(item1.goods_id, item1.pick_id);
455 457 await th.add_prom_goods_map(item1);
456 458 }
457 459  
... ... @@ -719,7 +721,7 @@ Page({
719 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 726 break;
725 727 }
... ... @@ -859,7 +861,6 @@ Page({
859 861 et = th.data.bn_exp_type;
860 862 m_wind = th.data.index;
861 863 }
862   -
863 864 //---是不是购买等级卡成功的返回---等级卡显示的判断---
864 865 var is_card_back = getApp().globalData.is_card_back;
865 866 if (is_card_back) {
... ... @@ -915,12 +916,13 @@ Page({
915 916 t.data.data.prom_id = gg.prom_id;
916 917 t.data.data.prom_type = 3;
917 918 //如果是优惠活动,就要调用活动,计算价格
  919 + // th.check_is_youhui(gg.goods_id, gg.pick_id);
918 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 924 if (data.is_bz == 1) {
923   - num = num*data.bs;
  925 + num = num * data.bs;
924 926 if (num > data.gift_limit_num) num = 0;
925 927 }
926 928 //如果赠品数量超出礼品库存,就取消
... ... @@ -943,9 +945,9 @@ Page({
943 945 ob.exp_sum_type = data.gift_exp_sum_type; //商品的物流计算方式
944 946 ob.uniform_exp_sum = data.gift_uniform_exp_sum //统一运费的金额
945 947  
946   - var arr_gf=[];
  948 + var arr_gf = [];
947 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 1176 },
1175 1177  
1176 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 1181 var th = this;
1180 1182 //-- 循环处理 --
1181 1183 for (var i in c_arr) {
... ... @@ -1197,7 +1199,7 @@ Page({
1197 1199 //等待,获取一下优惠活动的信息
1198 1200 await getApp().request.promiseGet("/api/weshop/goods/getDiscount", {
1199 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 1203 goods_num: item_map.goods_num, user_id: getApp().globalData.user_id,
1202 1204 is_bz: item_map.is_bz
1203 1205 }
... ... @@ -1211,12 +1213,13 @@ Page({
1211 1213 item_map.s_intValue = get_data.intValue;
1212 1214 item_map.s_coupon_id = get_data.coupon_id;
1213 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 1224 item_map.gift_id = get_data.gift_id;
1222 1225 item_map.gift_goods_id = get_data.goods_id;
... ... @@ -1238,21 +1241,21 @@ Page({
1238 1241 item_map.zx_libao = get_data.zxlibao;
1239 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 1259 send_gf[pickid].push({
1257 1260 pickup_id: pickid,
1258 1261 giftsinfo: get_data.giftsinfo,
... ... @@ -1261,7 +1264,7 @@ Page({
1261 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 1328 for (var j = 0; j < ord_goods.length; j++) {
1326 1329 if (ord_goods[j].is_gift) continue;
1327 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 1332 ord_goods[j].is_past = item_map.is_past;
1330 1333 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir;
1331 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 1365 if (item_map.s_libao) {
1363 1366 if (!cart_item.s_libao) {
1364 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 1370 else {
1368 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 1376 if (item_map.zx_libao) {
1374 1377 if (!cart_item.zx_libao) {
1375 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 1381 else {
1379 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 1390  
1388 1391 var arr = Object.keys(send_gf);
1389 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 1458 calculatePrice: function (t, s) {
... ... @@ -1404,12 +1461,12 @@ Page({
1404 1461 to.getwuliuprice(async function (rs) {
1405 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 1471 var all_price = 0; //所有的商品总价
1415 1472 var all_shipping_m = 0; //所有的物流总价
... ... @@ -1424,7 +1481,7 @@ Page({
1424 1481  
1425 1482 var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
1426 1483 var freight_free = ee.freight_free; //全场满多少包邮
1427   - var free1=freight_free;
  1484 + var free1 = freight_free;
1428 1485  
1429 1486 var weight_free = ee.weight_free; //多少kg内包邮
1430 1487 var no_ex_id = ee.no_ex_id;
... ... @@ -1596,7 +1653,7 @@ Page({
1596 1653 if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
1597 1654 if (th.check_by_area(by_qc.region_list)) {
1598 1655 freight_free = 0;
1599   - th.data.is_area_by=1;
  1656 + th.data.is_area_by = 1;
1600 1657 //goods_weight = -1;
1601 1658 //out_of_weight = 0;
1602 1659 th.data.is_no_by[pickid] = 1;
... ... @@ -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 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 1686 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
1630 1687 if (goods_weight < 0) goods_weight = 0;
1631 1688 //累积商品重量 每种商品的重量 * 数量
1632 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 1693 if (weight_free > 0) {
1637 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 1705 if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
1649 1706 if (goods_weight < 0) goods_weight = 0;
1650 1707 //累积商品重量 每种商品的重量 * 数量
... ... @@ -1655,7 +1712,7 @@ Page({
1655 1712 }
1656 1713 }
1657 1714  
1658   - if(free1>0) {
  1715 + if (free1 > 0) {
1659 1716 //当商品没有超出的时候
1660 1717 if (out_of_weight >= 0) {
1661 1718 out_of_weight = -by_g_weight;
... ... @@ -1665,7 +1722,7 @@ Page({
1665 1722 }
1666 1723  
1667 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 1728 if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) {
... ... @@ -1751,7 +1808,7 @@ Page({
1751 1808 if (no_ex_good) {
1752 1809 is_good_no_by = th.check_by_goods(no_ex_good, item[j].goods_id);
1753 1810 }
1754   -
  1811 +
1755 1812 //--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算--
1756 1813 if (th.data.using_quan[pickid] && th.data.using_quan[pickid].isby == 1 && !is_good_no_by) {
1757 1814 continue;
... ... @@ -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 1838 switch (item[j]['exp_sum_type']) {
1782 1839 case 1:
1783 1840 //统一运费
... ... @@ -1791,7 +1848,7 @@ Page({
1791 1848 }
1792 1849  
1793 1850  
1794   - }else{
  1851 + } else {
1795 1852 /*--
1796 1853 if(item[j]['exp_sum_type']==2 && out_of_weight!==0){
1797 1854 goods_weight = -1;
... ... @@ -1839,7 +1896,7 @@ Page({
1839 1896 var order_m = 0;
1840 1897 //---判断是不是有订单优惠---
1841 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 1900 }).then(res => {
1844 1901 if (res.data.code == 0) {
1845 1902 var ord_prom = res.data.data;
... ... @@ -2284,9 +2341,9 @@ Page({
2284 2341 var l_txt = "formData.give_zxlb_id";
2285 2342 //这个是json格式的
2286 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 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 2349 } else {
... ... @@ -2343,7 +2400,7 @@ Page({
2343 2400 var l_txt1 = "formData.g_lb_num";
2344 2401 var ob = [{ "num": good.s_lb_num, "l_id": good.s_libao }];
2345 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 2408 var l_txt = "formData.give_zxlb_id";
2352 2409 //这个是json格式的
2353 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 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 2445 }
2389 2446 })
2390 2447 this.setData({
2391   - submit:1,
  2448 + submit: 1,
2392 2449 })
2393 2450 },
2394 2451  
... ... @@ -2523,8 +2580,8 @@ Page({
2523 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 2670 //--如果有赠品的时候,赠品也要提交---
2614 2671 if (th.data.buy_now_gift_goods) {
2615 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 2675 var g_goods = {
2619 2676 'goods_id': gift_gg.goods_id,
2620 2677 'goods_name': gift_gg.goods_name,
... ... @@ -2759,11 +2816,11 @@ Page({
2759 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 2825 item.order_prom_list = order_prom_list;
2769 2826 }
... ... @@ -2809,8 +2866,8 @@ Page({
2809 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 2970 if (pdata.length == 0) return;
2914 2971 var str = JSON.stringify(pdata);
2915 2972  
2916   -
  2973 +
2917 2974 wx.showLoading({ title: "加载中" });
2918 2975 wx.request({
2919 2976 url: oo.url + '/api/weshop/order/createWxdOrder',
... ... @@ -3036,7 +3093,7 @@ Page({
3036 3093 },
3037 3094 complete: function () {
3038 3095 th.setData({
3039   - submit:0,
  3096 + submit: 0,
3040 3097 })
3041 3098 }
3042 3099 })
... ... @@ -3232,8 +3289,8 @@ Page({
3232 3289  
3233 3290 //------超出重量----------
3234 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 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 3314 if (goods_piece > 0 && item['piecemoney']) {
3258 3315 fp_price = parseFloat(item['piecemoney']);
... ... @@ -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 3325 var rspice = parseFloat(price + fw_price + fp_price);
3269 3326 return rspice;
... ... @@ -3481,7 +3538,6 @@ Page({
3481 3538  
3482 3539 },
3483 3540  
3484   -
3485 3541 /*----- 点击选择包邮券 -----*/
3486 3542 sele_quan_item_by: function (e) {
3487 3543 var no_use = e.currentTarget.dataset.no;
... ... @@ -3936,7 +3992,7 @@ Page({
3936 3992 arr[ind].check_quan_ware_list = check_quan_ware_list;
3937 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 3996 //--调用接口,获取优惠券的列表,3秒钟内控制接口请求--
3941 3997 var url = "/api/weshop/couponList/getUseCouponList";
3942 3998 await app.request.promiseGet(url, {
... ... @@ -4045,7 +4101,7 @@ Page({
4045 4101 },
4046 4102 //立即购买获取优惠活动的内容
4047 4103 buy_now_prom_goods: function (prom_id, arr, func) {
4048   - var th=this;
  4104 + var th = this;
4049 4105 var price = arr.shop_price * arr.goods_num;
4050 4106 var prom = null;
4051 4107 var gg = to.get_b_now();
... ... @@ -4068,7 +4124,7 @@ Page({
4068 4124 if (res.data.code == 0) {
4069 4125 var get_data = res.data.data;
4070 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 4128 arr.bs = get_data.bs; //是不是倍数
4073 4129 arr.is_past = get_data.is_past; //是不是包邮
4074 4130 arr.prom_price = get_data.price >= 0 ? get_data.price : price;
... ... @@ -4076,13 +4132,13 @@ Page({
4076 4132 arr.s_coupon_id = get_data.coupon_id;
4077 4133 arr.s_coupon_num = get_data.coupon_num;
4078 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 4142 arr.gift_id = get_data.gift_id;
4087 4143 arr.gift_goods_id = get_data.goods_id;
4088 4144 arr.gift_goods_name = get_data.goods_name;
... ... @@ -4098,34 +4154,34 @@ Page({
4098 4154 }
4099 4155 arr.s_libao = get_data.libao;
4100 4156 arr.s_lb_num = get_data.lb_num;
4101   -
  4157 + arr.lbtitle = get_data.lbtitle;
  4158 + arr.zxlbtitle = get_data.zxlbtitle;
4102 4159 arr.zx_libao = get_data.zxlibao;
4103 4160 arr.zx_lb_num = get_data.zxlb_num;
4104 4161  
4105 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 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 4187 func(arr);
... ... @@ -4137,7 +4193,7 @@ Page({
4137 4193 if (this.data.is_b_now == 1) pick = this.data.bn_pick;
4138 4194 //---获取订单优惠---
4139 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 4197 }).then(res => {
4142 4198 if (res.data.code == 0) {
4143 4199 var data = res.data.data;
... ... @@ -4195,13 +4251,86 @@ Page({
4195 4251 ob.is_xz_yh = prom.is_xz_yh;
4196 4252 ob.goods = new Array();
4197 4253 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
4198   -
4199 4254 var obj = {};
4200 4255 obj[item.prom_id] = ob;
4201 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 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 4338 var goods_weight = -1, goods_piece = -1;
4210 4339  
4211 4340 var gift_shipping_price = 0;
4212   - if (shipping_price)
4213   - {
  4341 + if (shipping_price) {
4214 4342 gift_shipping_price = shipping_price;
4215 4343 }
4216 4344 var th = this;
... ... @@ -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 4359 switch (good['exp_sum_type']) {
4232 4360 case 1:
4233 4361 //统一运费
... ... @@ -4247,7 +4375,7 @@ Page({
4247 4375 case 3:
4248 4376 if (goods_piece < 0) goods_piece = 0;
4249 4377 //累积商品数量
4250   - goods_piece += parseInt(good['buynum']) ;
  4378 + goods_piece += parseInt(good['buynum']);
4251 4379 if (goods_piece1) {
4252 4380 goods_piece += goods_piece1;
4253 4381 }
... ... @@ -4259,14 +4387,14 @@ Page({
4259 4387 if (th.check_by_goods(no_by_data.goods_list, good.goods_id)) {
4260 4388 gift_freight_free = 0;
4261 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 4395 var t_shipping_price =
4268 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 4398 return t_shipping_price;
4271 4399  
4272 4400 },
... ... @@ -4334,6 +4462,20 @@ Page({
4334 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 4480 sure_offline: function () {
4339 4481 var bn_goods = this.data.bn_goods;
... ... @@ -4459,7 +4601,7 @@ Page({
4459 4601 },
4460 4602 //订阅消息提醒
4461 4603 sendsm: function (func) {
4462   - let th =this;
  4604 + let th = this;
4463 4605 var template_id = this.data.template_id;
4464 4606 // //授权订阅
4465 4607 wx.requestSubscribeMessage({
... ... @@ -4467,417 +4609,417 @@ Page({
4467 4609 success(res) {
4468 4610 func();
4469 4611 th.setData({
4470   - submit:0,
  4612 + submit: 0,
4471 4613 })
4472 4614 },
4473 4615 fail(res) {
4474 4616 func();
4475 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 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 8 <block wx:if="{{is_b_now==1}}">
9 9 <view class="tab-container">
10 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 15 </view>
18 16 </view>
19 17 </block>
20   - <!-- 购物购买只有一单的时候 -->
  18 + <!-- 购物购买只有一单的时候 -->
21 19 <block wx:if="{{is_b_now==0 && cartlist.length==1}}">
22 20 <view class="tab-container">
23 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 26 </view>
31 27 </view>
... ... @@ -82,7 +78,7 @@
82 78 <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image>
83 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 82 <view class="goods-name ellipsis-2">{{items.goods_name}}</view>
87 83 <!-- 商品属性 -->
88 84 <view class="flex-vertical fs28 color-gray n_guige">
... ... @@ -104,8 +100,9 @@
104 100 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}">
105 101 <view class="flex">
106 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 106 </view>
110 107 <view>立减 <text style="color:#f23030;">{{filters.toFix(item.card_cut_price,2) }}</text> 元</view>
111 108 </view>
... ... @@ -119,19 +116,7 @@
119 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 122 <view class="set-mes bdr_b-14">
... ... @@ -142,9 +127,8 @@
142 127  
143 128 <!-- 当是物流很多单的时候 -->
144 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 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 134 <block wx:if="{{item.exp_type==1}}">
... ... @@ -166,14 +150,13 @@
166 150 <view class="circle xc-hookts on"></view>
167 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 154 </view>
172 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 160 <view>{{wu_arr[item.wind].name}}</view>
178 161 <view class="xc-right"></view>
179 162 </view>
... ... @@ -181,69 +164,92 @@
181 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 175 </view>
192 176 </view>
193   - </view>
194 177 </block>
195 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 196 <view wx:if="{{send_gf[item.pickup_id]}}">
200 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 208 未选择<text class="bg_jj"></text>
214   - </view>
  209 + </view>
215 210  
216   - </view>
  211 + </view>
217 212 </block>
218 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 230 <view class="coupon-mes flex-vertical">
223 231 <view>留言</view>
224 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 235 </view>
230 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 254 </view>
249 255  
... ... @@ -286,27 +292,27 @@
286 292 </view>
287 293 <!-- 赠品的显示 -->
288 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 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 316 </block>
311 317  
312 318  
... ... @@ -333,12 +339,13 @@
333 339 </view>
334 340 </block>
335 341  
336   - <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
  342 + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
337 343 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
338 344 <view class="flex">
339 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 349 </view>
343 350 <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view>
344 351 </view>
... ... @@ -351,6 +358,55 @@
351 358 <view bindtap="buycard" class="card_op">立即开通</view>
352 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 410 <view class="set-mes bdr_b-14">
355 411  
356 412 <view wx:if="{{order.store_prom}}">
... ... @@ -377,41 +433,20 @@
377 433 <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;">
378 434 <view>选择物流</view>
379 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 438 </view>
383 439 </view>
384 440 </view>
385 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 446 <view class="coupon-mes flex-vertical">
411 447 <view>留言</view>
412 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 450 </view>
416 451 </view>
417 452  
... ... @@ -422,10 +457,10 @@
422 457 省{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}元
423 458 </view>
424 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 461 </block>
427 462 <block wx:else>
428   - <text style="color: #d7642b;">不使用优惠</text>
  463 + <text style="color: #d7642b;">不使用优惠</text>
429 464 </block>
430 465 <!-- 右边点击 -->
431 466 <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view>
... ... @@ -487,7 +522,7 @@
487 522 <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view>
488 523 <!-- <view class="co-red big"></view> -->
489 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 526 </view>
492 527 </form>
493 528  
... ... @@ -519,8 +554,7 @@
519 554 <!-- 中间券内容显示 -->
520 555 <view class="xc-frame flex-level">
521 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 558 <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}">
525 559 <view class="coupon-frame flex rel">
526 560 <!-- 锯齿 -->
... ... @@ -561,8 +595,7 @@
561 595 </view>
562 596 <!-- 包邮券的显示,立即购买 -->
563 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 599 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
567 600 <view class="coupon-frame flex rel">
568 601 <!-- 锯齿 -->
... ... @@ -605,8 +638,7 @@
605 638  
606 639 <!-- 包邮券的显示,购物车购买 -->
607 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 642 <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
611 643 <view class="coupon-frame flex rel">
612 644 <!-- 锯齿 -->
... ... @@ -672,8 +704,7 @@
672 704 </view>
673 705 <view class="express_list">
674 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 709 <block wx:if="{{is_express==idx}}">
679 710 <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>
... ... @@ -703,77 +734,77 @@
703 734 <view style="background-color: #fff; width: 540rpx; margin: 0 auto; border-radius: 20rpx;">
704 735 <view class="fs32" style="text-align: center;height: 80rpx; line-height: 80rpx;">店铺优惠</view>
705 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 743 </view>
711 744 </view>
712 745 </view>
713 746  
714 747 <!-- 多赠品 -->
715 748 <view class="duo_gift_sele" wx:if="{{show_duo_gift}}">
716   - <!-- top search -->
  749 + <!-- top search -->
717 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 752 <view class="pdh20 pdv10 flex ai_c jc_sb">
720 753 <view class="input-box" style="width: 580rpx;display: flex; padding-left: 20rpx">
721 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 756 </view>
724 757 </view>
725 758  
726   - </view>
  759 + </view>
727 760 <!-- top act_name -->
728 761 <view class="flex gift_top_v ai_c fs30" style="padding-left: 70rpx">
729 762 {{gf_pr_name}},可任选{{zp_num}}件商品为赠品
730 763 </view>
731 764 <!-- 赠品选择 -->
732 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 785 </view>
752   - </view>
753 786  
754   - <view class="flex alend jc_sb">
  787 + <view class="flex alend jc_sb">
755 788 <view class="goods-price co-red baseline ellipsis-1">
756 789 <view class="fs20">¥</view>
757 790 <view class="fs28">{{items.goodsinfo.shop_price}}</view>
758 791 </view>
759 792 <view class="count">
760 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 796 </view>
765 797 </view>
766 798  
  799 + </view>
767 800 </view>
768   - </view>
769 801 </scroll-view>
770   - <!-- 确认选择 -->
  802 + <!-- 确认选择 -->
771 803 <view class="pay-for flex-vertical-between" style="bottom: 0">
772 804 <view></view>
773 805 <view>
774   - <button bindtap="sure_this_gift" class="pay-btn">确定</button>
  806 + <button bindtap="sure_this_gift" class="pay-btn">确定</button>
775 807 </view>
776 808 </view>
777 809  
778   -</view>
779   -
  810 +</view>
780 811 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -70,6 +70,7 @@ Page({
70 70 onLoad: function (options) {
71 71 this.setData({
72 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 3 <block wx:if="{{ad_data}}">
3 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 6 </view>
6 7 </block>
7 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 124 </view>
117 125 <!-- 引入提示组件 -->
118 126 <warn id="warn"></warn>
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -333,6 +333,9 @@ Page({
333 333  
334 334  
335 335 var sele_g=res.data.data;
  336 + //需不需要门店,不需要门店返回
  337 + if(!sele_g.is_pickup) return false;
  338 +
336 339 com.wait_for_store_config(_this2);
337 340 com.set_user_mo_store(_this2,os,function () {
338 341 if(sele_g.pickup_list && _this2.data.def_pick_store){
... ...
pages/giftpack/public/buy_com.js
... ... @@ -227,7 +227,7 @@ module.exports = {
227 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 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 99 //-- user_id代过来免登录 --
100 100 getApp().globalData.first_leader=first_leader;
101 101 }
102   -
103   -
  102 +
  103 + if(tt.type) this.data.type= parseInt(tt.type);
104 104 that.get_brand();
105 105  
106 106 clearInterval(that.data.timer);
... ... @@ -267,18 +267,20 @@ Page({
267 267 else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); }
268 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 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 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 281 that.getServiceCategory();
280 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 286 if(that.data.is_show_gb && that.data.select_classify_on == 223){
... ... @@ -370,6 +372,38 @@ Page({
370 372 }
371 373 //console.log(arr)
372 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 5054 var type = this.data.prom_type;
5055 5055 if (type == 2) type = -1;
5056 5056 if (type == 6) type = 2; // 6拼团 2团购
  5057 + if (type == 10) type = -1;
5057 5058  
5058 5059  
5059 5060 if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3;
... ... @@ -5159,8 +5160,7 @@ Page({
5159 5160 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
5160 5161 }
5161 5162  
5162   - }
5163   - ;
  5163 + };
5164 5164  
5165 5165  
5166 5166 var share_title = th.data.data.goods_name;
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -3447,7 +3447,7 @@ margin: auto; */
3447 3447  
3448 3448 /* 门店分类列表 */
3449 3449 .sort_store_list {
3450   - height: 82%;
  3450 + max-height: 700rpx;
3451 3451 overflow: hidden;
3452 3452 overflow-y: scroll;
3453 3453 width: 95%;
... ...
pages/goods/search/search.js
1   -var t = function(t) {
  1 +var t = function (t) {
2 2 return t && t.__esModule ? t : {
3 3 default: t
4 4 };
5 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 8 Page({
9 9 data: {
... ... @@ -18,31 +18,32 @@ Page({
18 18 requestUrl: "",
19 19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
20 20 hotWords: null,
21   - is_no_plus:1,
  21 + is_no_plus: 1,
22 22 tabname: "sort", //排序的字段
23 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 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 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 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 206 item.original_img = th.data.url + item.original_img;
206 207  
207 208 /*--
... ... @@ -218,48 +219,48 @@ Page({
218 219 })--*/
219 220  
220 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 224 var url = "";
224   - switch (prom_type){
  225 + switch (prom_type) {
225 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 228 break;
228 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 231 break;
231 232 case 4:
232   - url ="/api/weshop/integralbuy/get/"+oo.stoid +"/"+prom_id;
  233 + url = "/api/weshop/integralbuy/get/" + oo.stoid + "/" + prom_id;
233 234 break;
234 235 case 6:
235 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 259 break;
259 260 case 8:
260 261 var presell_id = prom_id;
261 262 var url1 = "/api/weshop/marketing/marketingPresellList/list";
262   - var rd= {
  263 + var rd = {
263 264 store_id: oo.stoid,
264 265 presell_id: presell_id,
265 266 goods_id: item.goods_id
... ... @@ -271,287 +272,303 @@ Page({
271 272 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
272 273 var arr = res.data.data[0];
273 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 278 break;
278 279 default:
279 280 break;
280 281 };
281   - if(url!=null && url!=''){
  282 + if (url != null && url != '') {
282 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 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 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 308 e.closeSearchModal();
308 309 })
309 310 },
310   - onReachBottom: function() {
311   - console.log('触发上滑加载事件');
  311 + onReachBottom: function () {
  312 + console.log('触发上滑加载事件');
312 313 this.data.currentPage++
313   - console.log('触发上滑加载事件currentPage',this.data.currentPage);
  314 + console.log('触发上滑加载事件currentPage', this.data.currentPage);
314 315 this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl);
315 316 },
316   -
317   -
318   - openFilterModal: function() {
  317 +
  318 +
  319 + openFilterModal: function () {
319 320 this.setData({
320 321 openFilterModal: !0
321 322 });
322 323 },
323   - closeFilterModal: function() {
  324 + closeFilterModal: function () {
324 325 this.setData({
325 326 openFilterModal: !1
326 327 });
327 328 },
328   - filterGoods: function(t) {
  329 + filterGoods: function (t) {
329 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 346 this.setData({
346 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 352 this.setData({
352 353 openSearchModal: !0
353 354 });
354 355 },
355   - closeSearchModal: function() {
  356 + closeSearchModal: function () {
356 357 this.setData({
357 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 387 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
387   - this.data.key_str=t;
  388 + this.data.key_str = t;
388 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 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 398 var pagePath = curPage.route; //当前页面url
398 399 if (pagePath.indexOf('/') != 0) {
399 400 pagePath = '/' + pagePath;
400 401 }
401 402  
402   - if(this.data.key_str) {
  403 + if (this.data.key_str) {
403 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 416 // console.log("11-11"+pagePath);
416 417 return {
417 418 title: "商品搜索",
418   - path:pagePath,
  419 + path: pagePath,
419 420 }
420 421 },
421 422  
422 423  
423 424 //---------图片失败,默认图片--------
424 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 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 575 \ No newline at end of file
... ...
pages/goods/search/search.json
... ... @@ -3,5 +3,8 @@
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5 5 "share_box": "/components/share_box/share_box"
6   - }
  6 + },
  7 + "componentPlaceholder": {
  8 + "van-popup": "view"
  9 + }
7 10 }
8 11 \ No newline at end of file
... ...
pages/goods/search/search.wxml
... ... @@ -6,7 +6,7 @@
6 6 <form bindsubmit="submitSearch">
7 7 <view class="pdh20 pdv10 flex ai_c jc_sb">
8 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 10 <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text>
11 11 </view>
12 12 <button class="btn" formType="submit" hover-class="none">搜索</button>
... ...
pages/goods/search/search.wxss
1 1 .container {
2 2 color: #666;
3   - overflow: visible;
  3 + overflow: visible;
4 4 }
5 5  
6 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 13 .nav-item {
... ... @@ -15,7 +15,7 @@
15 15 width: 30%;
16 16 height: 90rpx;
17 17 line-height: 90rpx; */
18   - padding: 14rpx 10rpx;
  18 + padding: 14rpx 10rpx;
19 19 display: flex;
20 20 align-items: center;
21 21 justify-content: center;
... ... @@ -82,8 +82,8 @@
82 82 width: 180rpx;
83 83 height: 180rpx;
84 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 89 .img-wrap image {
... ... @@ -98,7 +98,7 @@
98 98 line-height: 36rpx;
99 99 color: #333;
100 100 overflow: hidden;
101   - text-align: justify;
  101 + text-align: justify;
102 102 }
103 103  
104 104 .price {
... ... @@ -185,10 +185,10 @@
185 185 .search-bar {
186 186 /* width: 100%;
187 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 194 .search-input {
... ... @@ -260,13 +260,13 @@
260 260 } */
261 261  
262 262 .card_bg {
263   - box-sizing: border-box;
  263 + box-sizing: border-box;
264 264 padding: 2rpx 10rpx;
265 265 /* height: 28rpx; */
266 266 border-radius: 26rpx;
267 267 font-size: 18rpx;
268 268 /* line-height: 28rpx; */
269   - max-width: 210rpx;
  269 + max-width: 210rpx;
270 270 background: #333;
271 271 color: #fff;
272 272 margin-left: 8rpx;
... ... @@ -276,12 +276,12 @@
276 276 width: 19rpx;
277 277 height: 19rpx;
278 278 margin-right: 8rpx;
279   - flex-shrink: 0;
  279 + flex-shrink: 0;
280 280 }
281 281  
282 282 .card_name {
283   - position: relative;
284   - top: -4rpx;
  283 + position: relative;
  284 + top: -4rpx;
285 285 }
286 286  
287 287 /* .card_bg image {
... ... @@ -299,7 +299,7 @@
299 299 } */
300 300  
301 301 .navigator-hover {
302   - opacity: 1;
  302 + opacity: 1;
303 303 }
304 304  
305 305 .mk_price {
... ... @@ -309,76 +309,134 @@
309 309  
310 310 .item-cont {
311 311 /* line-height: 38rpx; */
312   - flex-grow: 1;
  312 + flex-grow: 1;
313 313 }
314 314  
315 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 322 .history:first-of-type {
323   - /* margin-left: 0; */
  323 + /* margin-left: 0; */
324 324 }
325 325  
326 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 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 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 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 359 .btn::after {
360   - border: none;
  360 + border: none;
361 361 }
362 362  
363 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 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 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 443 \ No newline at end of file
... ...
pages/index/index/index.js
... ... @@ -84,7 +84,10 @@ Page({
84 84 full_ad: null, //全屏广告
85 85 full_screen: 0, //全屏广告
86 86 is_ok_h5: 0, //判断要不要显示关注二维码
  87 +
  88 + container: null,
87 89 },
  90 +
88 91  
89 92 onLoad: async function (tt) {
90 93 wx.showShareMenu({
... ...
pages/index/index/index.json
... ... @@ -21,7 +21,10 @@
21 21 "store_select": "/components/diy_store_select/diy_store_select",
22 22 "presell": "/components/diy_pregoods/diy_pregoods",
23 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 29 "enablePullDownRefresh": false
27 30 }
28 31 \ No newline at end of file
... ...
pages/index/index/index.wxml
... ... @@ -45,6 +45,12 @@
45 45 </view>
46 46 </view>
47 47 </view>
  48 +
  49 +
  50 +
  51 +
  52 +
  53 +
48 54 <!-- 如果有关注,要 -->
49 55 <!-- <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view> -->
50 56 <!-- 如果有顶部门店 -->
... ... @@ -137,6 +143,8 @@
137 143 </view>
138 144 </view>
139 145 </view>
  146 +
  147 +
140 148 <!-- 轮播 -->
141 149 <block wx:if="{{swiperimage.length>0}}">
142 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 469 </block>
462 470 <!--商品分组-->
463 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 474 </block>
467 475 <!--通知-->
... ... @@ -528,7 +536,7 @@
528 536  
529 537 <!-- 服务卡项 -->
530 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 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 16 .pink-b {
2 17 background: #ff7295;
3 18 }
... ... @@ -1010,14 +1025,10 @@ page {
1010 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 1030 .container.nor{
1020   - padding-top: 80rpx;
  1031 + padding-top: 140rpx;
1021 1032 }
1022 1033  
1023 1034 /* page,
... ...
pages/team/team_show/team_show.wxss
... ... @@ -2178,7 +2178,7 @@ page {
2178 2178  
2179 2179  
2180 2180 .sort_store_list{
2181   - height: 82%;
  2181 + max-height: 700rpx;
2182 2182 overflow: hidden;
2183 2183 overflow-y: scroll;
2184 2184 width: 95%;
... ...
pages/template/index.js
... ... @@ -19,7 +19,21 @@ Page({
19 19 this.data.temp_id=e.scene;
20 20 if(!this.data.temp_id)
21 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 108  
95 109 },
96 110  
97   - onShareAppMessage: function(e) {
  111 + onShareAppMessage:async function(e) {
98 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 137 async onShareTimeline(){
105   - getApp().globalData.no_clear=1;
  138 + getApp().globalData.no_clear=1;
106 139 getApp().getConfig(await function(e){
107 140 this.setData({
108 141 store_config:e
109 142 })
110 143 }.bind(this))
111 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 153 var ob = {
114 154 title:share_title,
115   - // path: url,
116   - query:`sence=${temp_id}`,
  155 + path: url,
  156 + //query:`sence=${temp_id}`,
117 157 imageUrl:this.data.url+store_config.store_logo,
118 158 };
119 159 console.log(ob);
... ...
pages/user/express/express.wxml
1 1 <view class="logistics-mes">
2 2 <view class="logistics-num">
3   - <view class="logistics-title">订单编号 : </view>
  3 + <view class="logistics-title">快递单号 : </view>
4 4 <view class="logistics-cont">{{delivery.invoice_no}}</view>
5 5 </view>
6 6 <view class="logistics-num">
... ...
pages/user/index/filter.wxs
... ... @@ -19,6 +19,7 @@ var is_close = function (name,c_list) {
19 19 map['幸运大转盘']="17";
20 20 map['幸运购']="18";
21 21 map['AI测肤']="20";
  22 + map['附近门店']="21";
22 23 var index=map[name];
23 24  
24 25 //我的权益要判断5,和11
... ...
pages/user/index/index.js
... ... @@ -43,8 +43,8 @@ Page({
43 43 actImg: "",
44 44 is_assistance: 0, //助力活动
45 45 ad_img: "",
46   - add_card_data: '', //等级卡的内容
47   -
  46 + add_card_data: '', //等级卡的内容
  47 + getusercode_vailtime:10,//会员二维码时效
48 48 hiddenCS: true,
49 49 },
50 50 goto_nav: function (e) {
... ... @@ -395,8 +395,13 @@ Page({
395 395 th.setData({ sys_switch: t_swi });
396 396 var user_tool = [];
397 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 405 if (parseInt(t_swi.rank_switch) == 2) {
401 406 var userInfo = th.data.userInfo;
402 407 if (userInfo.card_field != null && userInfo.card_field != undefined && userInfo.card_field != "") {
... ... @@ -483,9 +488,10 @@ Page({
483 488  
484 489 //------卡片的显示和关闭--------
485 490 show_tc: function () {
486   - if (!this.data.userInfo) return false;
  491 + if (!this.data.userInfo) return false;
  492 +
487 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 495 val = "^" + ut.base64_encode(val);
490 496  
491 497 qrcode('qrcode', val, 480, 480, this);
... ...
pages/user/index/index.wxml
... ... @@ -38,9 +38,10 @@
38 38  
39 39  
40 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 42 <!-- {{iurl}}/miniapp -->
43 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 45 </view>
45 46 <view class="flex-vertical abs xc-grow-frame rel" style="display: none">
46 47 <view class="xc-grow-up">成长值</view>
... ... @@ -58,7 +59,7 @@
58 59 <view class='numfont'>余额</view>
59 60 </view>
60 61 <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}}
61   - <view class='numfont'>预存款</view>
  62 + <view class='numfont'>储值款</view>
62 63 </view>
63 64 <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}}
64 65 <view class='numfont'>积分</view>
... ... @@ -346,7 +347,7 @@
346 347 <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>-->
347 348 <canvas class="g_img" canvas-id="qrcode" />
348 349 </view>
349   - <view class="s_sao">扫一扫上面的二维码图案,即可消费</view>
  350 + <view class="s_sao">前台收银扫此二维码,即可享受优惠!</view>
350 351 </view>
351 352 </view>
352 353 </view>
... ...
pages/user/index/index.wxss
... ... @@ -145,16 +145,19 @@
145 145 }
146 146  
147 147 .xc-qrcode-frame {
148   - border-radius: 10rpx;
  148 + /* border-radius: 10rpx;
149 149 border: 5rpx solid #fe9db5;
150 150 background: #fe9db5;
151 151 width: 70rpx;
152   - height: 70rpx;
  152 + height: 70rpx; */
153 153 top: 70rpx;
154 154 right: 64rpx;
155 155 }
156 156  
157 157 .xc-qrcode {
  158 + border-radius: 10rpx;
  159 + border: 5rpx solid #fe9db5;
  160 + background: #fe9db5;
158 161 width: 70rpx;
159 162 height: 70rpx;
160 163 }
... ... @@ -301,7 +304,7 @@
301 304 height: 50rpx;
302 305 }
303 306  
304   -.xc-send{
  307 +.xc-send {
305 308 width: 50rpx;
306 309 height: 50rpx;
307 310 }
... ... @@ -455,9 +458,11 @@
455 458 display: block;
456 459 height: 1px;
457 460 width: 100%;
458   - background-color: #999; /*颜色需与主题大背景色一致*/
  461 + background-color: #999;
  462 + /*颜色需与主题大背景色一致*/
459 463 position: relative;
460   - top: 10px; /*调节线高*/
  464 + top: 10px;
  465 + /*调节线高*/
461 466 left: 0;
462 467 }
463 468  
... ... @@ -540,10 +545,10 @@
540 545 .modal-body {
541 546 position: fixed;
542 547 top: 0;
543   - bottom: 0;
  548 + bottom: 0;
544 549 left: 0;
545   - right: 0;
546   - margin: auto;
  550 + right: 0;
  551 + margin: auto;
547 552 z-index: 100;
548 553 background: #fff;
549 554 /* margin-left: 73rpx; */
... ... @@ -666,7 +671,8 @@
666 671 color: #fff;
667 672 }
668 673  
669   -.bg_right.bcolor, .bg_left.bcolor {
  674 +.bg_right.bcolor,
  675 +.bg_left.bcolor {
670 676 border-color: #333;
671 677 }
672 678  
... ... @@ -707,45 +713,47 @@
707 713 margin-top: 8rpx;
708 714 margin-right: 5rpx;
709 715 }
710   -.banner-img{
  716 +
  717 +.banner-img {
711 718 width: 95%;
712 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 726 width: 100%;
719 727 background: #f2f2f2;
720 728 }
721 729  
722   -button::after{ border: 0}
  730 +button::after {
  731 + border: 0
  732 +}
723 733  
724 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 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 745 .icon-dingwei {
736   - color: #EA4F2B;
737   - font-size: 28rpx;
  746 + color: #EA4F2B;
  747 + font-size: 28rpx;
738 748 }
739 749  
740 750 .c-5 {
741   - color: #555;
  751 + color: #555;
742 752 }
743 753  
744 754  
745 755  
746 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 760 \ No newline at end of file
... ...
pages/user/userinfo/userinfo.js
... ... @@ -73,6 +73,7 @@ Page({
73 73 userInfo: {},
74 74 hasUserInfo: false,
75 75 canIUseGetUserProfile: false,
  76 + getusercode_vailtime:10,//会员二维码时效
76 77  
77 78 },
78 79 //通过路径跳转到其他页面
... ... @@ -91,8 +92,12 @@ Page({
91 92 rank_switch:sms_conf.rank_switch,
92 93 is_lable_set: sms_conf.user_label_set, //是不是会员标签设置
93 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 101 if (sms_conf.user_label_set) {
97 102 th.query_checklabels();
98 103 }
... ... @@ -858,7 +863,7 @@ Page({
858 863 show_tc: function() {
859 864 if (!getApp().globalData.userInfo) return false;
860 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 867 val="^"+ut.base64_encode(val);
863 868  
864 869 qrcode('qrcode', val, 480, 480, this);
... ...
pages/user/userinfo/userinfo.wxss
... ... @@ -529,7 +529,7 @@ input {
529 529 /* 门店分类列表 */
530 530  
531 531 .sort_store_list {
532   - height: 82%;
  532 + max-height: 700rpx;
533 533 overflow: hidden;
534 534 overflow-y: scroll;
535 535 width: 95%;
... ...
utils/filter.wxs
... ... @@ -10,6 +10,13 @@ var filters = {
10 10 if (!val) return "不限";
11 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 21 replace_time2: function (val) {
15 22 if (val == null || val == undefined || val == '') return "";
... ... @@ -278,5 +285,6 @@ module.exports = {
278 285 JSONStringify: filters.JSONStringify,
279 286 count: filters.count,
280 287 isExpired: filters.isExpired,
  288 + gettimestamp: filters.gettimestamp,
281 289 showStartAndEndDate: filters.showStartAndEndDate,
282 290 }
283 291 \ No newline at end of file
... ...