Commit f3f09f948371085b34d70f172fab27049430beec

Authored by 后端研发-苏泰源
1 parent adf33573

服务卡自定义模版分类标题置顶

components/diy_serviceCard/diy_serviceCard.js
@@ -17,7 +17,13 @@ Component({ @@ -17,7 +17,13 @@ Component({
17 type: Object, 17 type: Object,
18 value: null, 18 value: null,
19 }, 19 },
20 - 20 + sticky: {
  21 + type: Number,
  22 + },
  23 + container: {
  24 + type: Object,
  25 + value: null,
  26 + },
21 }, 27 },
22 data: { 28 data: {
23 // 这里是一些组件内部数据 29 // 这里是一些组件内部数据
@@ -49,12 +55,19 @@ Component({ @@ -49,12 +55,19 @@ Component({
49 title_index: 0, 55 title_index: 0,
50 swiper_hei: 0, 56 swiper_hei: 0,
51 title_class: "", 57 title_class: "",
  58 + container: null,
52 }, 59 },
53 60
54 - ready: function() {}, 61 +
55 62
56 lifetimes: { 63 lifetimes: {
  64 + ready: function() {
  65 + this.setData({
  66 + container: () => wx.createSelectorQuery().select('#container')
  67 + });
  68 + },
57 attached: function() { 69 attached: function() {
  70 +
58 let myStyle = ''; 71 let myStyle = '';
59 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法 72 //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法
60 var nav_item = this.data.object; 73 var nav_item = this.data.object;
@@ -172,6 +185,10 @@ Component({ @@ -172,6 +185,10 @@ Component({
172 show: function() { 185 show: function() {
173 //--初始化卡类-- 186 //--初始化卡类--
174 // this.card_init(); 187 // this.card_init();
  188 + // this.setData({
  189 + // container: () => wx.createSelectorQuery().select('#container')
  190 + // });
  191 + console.log('onshow');
175 }, 192 },
176 }, 193 },
177 194
components/diy_serviceCard/diy_serviceCard.json
1 { 1 {
2 "component": true, 2 "component": true,
3 - "usingComponents": {} 3 + "usingComponents": {
  4 + "mp-sticky": "../mp-sticky/mp-sticky"
  5 + }
4 } 6 }
5 \ No newline at end of file 7 \ No newline at end of file
components/diy_serviceCard/diy_serviceCard.wxml
@@ -10,361 +10,219 @@ @@ -10,361 +10,219 @@
10 </view> 10 </view>
11 </view> 11 </view>
12 </block> --> 12 </block> -->
13 -  
14 -<!-- 服务卡项顶部标题 -->  
15 -<!-- class="scroll-view-item {{index == title_index ? 'active':''}}" -->  
16 -<scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">  
17 - <view class="flex" style="{{myStyle}}">  
18 - <view  
19 - wx:for="{{nav_list}}"  
20 - data-index="{{index}}"  
21 - data-idlist="{{item.idlist}}"  
22 - data-wgroup="{{item.wgroup}}"  
23 - data-classstyle="{{item.classstyle}}"  
24 - bindtap="gr_set_nav"  
25 - class="scroll-view-item {{index == title_index ? 'active':''}}"  
26 - style="{{title_class}}">{{item.title}}</view>  
27 - </view>  
28 -</scroll-view>  
29 -  
30 -  
31 -<!--1个列表的时候-->  
32 -<view class="zs_goods_wai" wx:if='{{object.column==1}}'>  
33 - <block wx:for="{{goods_array}}">  
34 - <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>  
35 - <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> -->  
36 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
37 - <view class='zs_top rel'>  
38 -  
39 - <block wx:if="{{object.big_order_type==3}}">  
40 - <view style="position: relative; width: 100%; height: 100%">  
41 - <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image>  
42 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>  
43 - </view>  
44 - </block>  
45 - <block wx:else>  
46 - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img"  
47 - binderror="bind_bnerr3" lazy-load="true" ></image>  
48 - </block>  
49 -  
50 - <block wx:if="{{object.goodicon==3}}">  
51 - <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image>  
52 - </block>  
53 - <block wx:if="{{object.goodicon==1}}">  
54 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
55 - </block>  
56 - <block wx:if="{{object.goodicon==2}}">  
57 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
58 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
59 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}"  
60 - src='{{imghost}}/miniapp/images/hot.png'></image>  
61 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
62 - src='{{imghost}}/miniapp/images/new.png'></image>  
63 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}"  
64 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
65 - </block>  
66 - </view>  
67 - <view class='zs_center'>  
68 - <!-- <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> -->  
69 - <view class='zs_wz1'>{{item.goods_name}}</view>  
70 - <!--如果有显示价格 -->  
71 - <view class='zs_wz2' wx:if="{{object.goodsprice}}">  
72 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
73 - <view class='wz_red'>  
74 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
75 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
76 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
77 - </view>  
78 - <view class='del'>¥{{item.market_price}}</view>  
79 - </block>  
80 - <block wx:else>  
81 -  
82 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
83 - <!-- 当会员是等级卡的时候 -->  
84 - <block wx:if="{{card_field}}">  
85 - <!-- 等级价>0 -->  
86 - <block wx:if="{{item[card_field]>0}}">  
87 - <view class="money flex ai_and">  
88 - <!-- 办卡价 -->  
89 - <view class="flex xc-wc ai_and">  
90 - <view class="fs24 wz_red">¥</view>  
91 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
92 - <view class="card_bg ellipsis-1">  
93 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
94 - <text class="card_name">{{card_name}}</text>  
95 - </view>  
96 - </view>  
97 - </view>  
98 - <view class="flex" style="line-height: 28rpx;" >  
99 - <!-- 原价 -->  
100 - <view class="price flex xc-ash line_th">  
101 - <view class="fs22">¥</view>  
102 - <view class="fs22">{{item.market_price}}</view>  
103 - </view>  
104 - </view>  
105 - </block>  
106 - <blocK wx:else>  
107 - <view class="money flex" >  
108 - <!-- 办卡价 -->  
109 - <view class="flex xc-wc">  
110 - <view class="fs24 wz_red">¥</view>  
111 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
112 - </view>  
113 - </view>  
114 - <view class="flex" style="line-height: 28rpx;" >  
115 - <!-- 原价 -->  
116 - <view class="price flex xc-ash line_th">  
117 - <view class="fs22">¥</view>  
118 - <view class="fs22">{{item.market_price}}</view>  
119 - </view>  
120 - </view>  
121 - </blocK>  
122 - </block>  
123 - <block wx:else>  
124 - <!-- 如果商品有设置等级价大于0的 -->  
125 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
126 - <view class="money flex" >  
127 - <!-- 办卡价 -->  
128 - <view class="flex xc-wc">  
129 - <view class="fs24 wz_red">¥</view>  
130 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
131 - </view>  
132 - <!-- 原价 -->  
133 - <view class="price flex xc-ash line_th">  
134 - <view class="fs22">¥</view>  
135 - <view class="fs22">{{item.market_price}}</view>  
136 - </view>  
137 -  
138 - </view>  
139 - <view class="flex" style="line-height: 28rpx;" >  
140 - <!-- 等级价 -->  
141 - <view class="price flex ai_and">  
142 - <view class="fs22">¥</view>  
143 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
144 - <view class="card_bg ellipsis-1">  
145 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
146 - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>  
147 - </view>  
148 - </view>  
149 - </view>  
150 - </block>  
151 - <block wx:else>  
152 - <view class="money flex" >  
153 - <!-- 办卡价 -->  
154 - <view class="flex xc-wc">  
155 - <view class="fs24 wz_red">¥</view>  
156 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
157 - </view>  
158 - </view>  
159 - <view class="flex" style="line-height: 28rpx;" >  
160 - <!-- 原价 -->  
161 - <view class="price flex xc-ash line_th">  
162 - <view class="fs22">¥</view>  
163 - <view class="fs22">{{item.market_price}}</view>  
164 - </view>  
165 - </view>  
166 - </block>  
167 - </block>  
168 - </block>  
169 -  
170 - <block wx:else>  
171 - <view class='wz_red'>¥{{item.shop_price}}</view>  
172 - <view class='del'>¥{{item.market_price}}</view>  
173 - </block>  
174 -  
175 - </block>  
176 -  
177 - </view>  
178 - <view class='zs_wz4 c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
179 - <!-- <view style="height: 10rpx;"></view> -->  
180 - </view>  
181 - </navigator>  
182 - </view>  
183 - <!-- <view style="height:20rpx"></view> -->  
184 - </block>  
185 -  
186 -</view>  
187 -<!--2个一列-->  
188 -<view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;">  
189 - <block wx:for="{{goods_array}}" >  
190 - <view class="nav-container">  
191 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}">  
192 - <view class="zs_goods_wai_ban">  
193 - <!-- <view class="zs_goods_ban"> -->  
194 - <!-- <view class='zs_goods_2l'> -->  
195 - <view class='zs_top_2l rel'>  
196 -  
197 - <block wx:if="{{object.big_order_type==3}}">  
198 - <view style="position: relative; width: 100%; height: 100%">  
199 - <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
200 - binderror="bind_bnerr3"></image>  
201 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
202 - binderror="bind_bnerr3"></image>  
203 - </view>  
204 - </block>  
205 - <block wx:else>  
206 - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
207 - binderror="bind_bnerr3"></image>  
208 - </block>  
209 -  
210 - <block wx:if="{{object.goodicon==3}}">  
211 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
212 - src='{{object.customicon}}'></image>  
213 - </block>  
214 - <block wx:if="{{object.goodicon==1}}">  
215 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
216 - </block>  
217 - <block wx:if="{{object.goodicon==2}}">  
218 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
219 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
220 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
221 - src='{{imghost}}/miniapp/images/hot.png'></image>  
222 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
223 - src='{{imghost}}/miniapp/images/new.png'></image>  
224 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
225 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
226 - </block>  
227 - </view>  
228 -  
229 - <view class='zs_center_2l'>  
230 - <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
231 - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}">  
232 -  
233 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
234 - <view class='wz_red'>  
235 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
236 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
237 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
238 - </view>  
239 - <view class='del'>¥{{item.market_price}}</view>  
240 - </block>  
241 - <block wx:else>  
242 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
243 - <!-- 当会员是等级卡的时候 -->  
244 - <block wx:if="{{card_field}}">  
245 - <!-- 等级价>0 -->  
246 - <block wx:if="{{item[card_field]>0}}">  
247 - <view class="money flex" >  
248 - <!-- 办卡价 -->  
249 - <view class="flex xc-wc ai_and">  
250 - <view class="fs24 wz_red">¥</view>  
251 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
252 - <view class="card_bg ellipsis-1">  
253 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
254 - <view class="card_name">{{card_name}}</view>  
255 - </view>  
256 - </view>  
257 - </view>  
258 - <view class="flex" style="line-height: 28rpx;" >  
259 - <!-- 原价 -->  
260 - <view class="price flex xc-ash line_th">  
261 - <view class="fs22">¥</view>  
262 - <view class="fs22">{{item.market_price}}</view>  
263 - </view>  
264 - </view>  
265 - </block>  
266 - <blocK wx:else>  
267 - <view class="money flex" >  
268 - <!-- 办卡价 -->  
269 - <view class="flex xc-wc">  
270 - <view class="fs24 wz_red">¥</view>  
271 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
272 - </view>  
273 - </view>  
274 - <view class="flex" style="line-height: 28rpx;" >  
275 - <!-- 原价 -->  
276 - <view class="price flex xc-ash line_th">  
277 - <view class="fs22">¥</view>  
278 - <view class="fs22">{{item.market_price}}</view>  
279 - </view>  
280 - </view>  
281 - </blocK>  
282 - </block>  
283 - <block wx:else>  
284 - <!-- 如果商品有设置等级价大于0的 -->  
285 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
286 - <view class="money flex" >  
287 - <!-- 办卡价 -->  
288 - <view class="flex xc-wc">  
289 - <view class="fs24 wz_red">¥</view>  
290 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
291 - </view>  
292 - <!-- 原价 -->  
293 - <view class="price flex xc-ash line_th">  
294 - <view class="fs22">¥</view>  
295 - <view class="fs22">{{item.market_price}}</view>  
296 - </view>  
297 -  
298 - </view>  
299 - <view class="flex" style="line-height: 28rpx;" >  
300 - <!-- 等级价 -->  
301 - <view class="price flex ai_and">  
302 - <view class="fs22">¥</view>  
303 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
304 - <view class="card_bg ellipsis-1">  
305 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
306 - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> 13 +<view id="container">
  14 +
  15 + <mp-sticky wx:if="{{sticky == 1}}">
  16 + <scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">
  17 + <view class="flex" style="{{myStyle}};">
  18 + <view
  19 + wx:for="{{nav_list}}"
  20 + data-index="{{index}}"
  21 + data-idlist="{{item.idlist}}"
  22 + data-wgroup="{{item.wgroup}}"
  23 + data-classstyle="{{item.classstyle}}"
  24 + bindtap="gr_set_nav"
  25 + class="scroll-view-item {{index == title_index ? 'active':''}}"
  26 + style="{{title_class}}">{{item.title}}</view>
  27 + </view>
  28 + </scroll-view>
  29 + </mp-sticky>
  30 +
  31 + <block wx:else>
  32 + <scroll-view scroll-x="true" enhanced="true" fast-deceleration="true" show-scrollbar="false" wx:if="{{is_nav}}">
  33 + <view class="flex" style="{{myStyle}};">
  34 + <view
  35 + wx:for="{{nav_list}}"
  36 + data-index="{{index}}"
  37 + data-idlist="{{item.idlist}}"
  38 + data-wgroup="{{item.wgroup}}"
  39 + data-classstyle="{{item.classstyle}}"
  40 + bindtap="gr_set_nav"
  41 + class="scroll-view-item {{index == title_index ? 'active':''}}"
  42 + style="{{title_class}}">{{item.title}}</view>
  43 + </view>
  44 + </scroll-view>
  45 + </block>
  46 +
  47 +
  48 +
  49 +
  50 + <!--1个列表的时候-->
  51 + <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
  52 + <block wx:for="{{goods_array}}">
  53 + <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>
  54 + <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> -->
  55 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  56 + <view class='zs_top rel'>
  57 +
  58 + <block wx:if="{{object.big_order_type==3}}">
  59 + <view style="position: relative; width: 100%; height: 100%">
  60 + <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image>
  61 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  62 + </view>
  63 + </block>
  64 + <block wx:else>
  65 + <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img"
  66 + binderror="bind_bnerr3" lazy-load="true" ></image>
  67 + </block>
  68 +
  69 + <block wx:if="{{object.goodicon==3}}">
  70 + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image>
  71 + </block>
  72 + <block wx:if="{{object.goodicon==1}}">
  73 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  74 + </block>
  75 + <block wx:if="{{object.goodicon==2}}">
  76 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  77 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  78 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}"
  79 + src='{{imghost}}/miniapp/images/hot.png'></image>
  80 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  81 + src='{{imghost}}/miniapp/images/new.png'></image>
  82 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}"
  83 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  84 + </block>
  85 + </view>
  86 + <view class='zs_center'>
  87 + <!-- <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> -->
  88 + <view class='zs_wz1'>{{item.goods_name}}</view>
  89 + <!--如果有显示价格 -->
  90 + <view class='zs_wz2' wx:if="{{object.goodsprice}}">
  91 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  92 + <view class='wz_red'>
  93 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  94 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  95 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  96 + </view>
  97 + <view class='del'>¥{{item.market_price}}</view>
  98 + </block>
  99 + <block wx:else>
  100 +
  101 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  102 + <!-- 当会员是等级卡的时候 -->
  103 + <block wx:if="{{card_field}}">
  104 + <!-- 等级价>0 -->
  105 + <block wx:if="{{item[card_field]>0}}">
  106 + <view class="money flex ai_and">
  107 + <!-- 办卡价 -->
  108 + <view class="flex xc-wc ai_and">
  109 + <view class="fs24 wz_red">¥</view>
  110 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  111 + <view class="card_bg ellipsis-1">
  112 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  113 + <text class="card_name">{{card_name}}</text>
  114 + </view>
  115 + </view>
  116 + </view>
  117 + <view class="flex" style="line-height: 28rpx;" >
  118 + <!-- 原价 -->
  119 + <view class="price flex xc-ash line_th">
  120 + <view class="fs22">¥</view>
  121 + <view class="fs22">{{item.market_price}}</view>
  122 + </view>
  123 + </view>
  124 + </block>
  125 + <blocK wx:else>
  126 + <view class="money flex" >
  127 + <!-- 办卡价 -->
  128 + <view class="flex xc-wc">
  129 + <view class="fs24 wz_red">¥</view>
  130 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  131 + </view>
  132 + </view>
  133 + <view class="flex" style="line-height: 28rpx;" >
  134 + <!-- 原价 -->
  135 + <view class="price flex xc-ash line_th">
  136 + <view class="fs22">¥</view>
  137 + <view class="fs22">{{item.market_price}}</view>
  138 + </view>
  139 + </view>
  140 + </blocK>
  141 + </block>
  142 + <block wx:else>
  143 + <!-- 如果商品有设置等级价大于0的 -->
  144 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  145 + <view class="money flex" >
  146 + <!-- 办卡价 -->
  147 + <view class="flex xc-wc">
  148 + <view class="fs24 wz_red">¥</view>
  149 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  150 + </view>
  151 + <!-- 原价 -->
  152 + <view class="price flex xc-ash line_th">
  153 + <view class="fs22">¥</view>
  154 + <view class="fs22">{{item.market_price}}</view>
  155 + </view>
  156 +
  157 + </view>
  158 + <view class="flex" style="line-height: 28rpx;" >
  159 + <!-- 等级价 -->
  160 + <view class="price flex ai_and">
  161 + <view class="fs22">¥</view>
  162 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  163 + <view class="card_bg ellipsis-1">
  164 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  165 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
307 </view> 166 </view>
308 - </view>  
309 - </view>  
310 - </block>  
311 - <block wx:else>  
312 - <view class="money flex" >  
313 - <!-- 办卡价 -->  
314 - <view class="flex xc-wc">  
315 - <view class="fs24 wz_red">¥</view>  
316 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
317 - </view>  
318 - </view>  
319 - <view class="flex" style="line-height: 28rpx;" >  
320 - <!-- 原价 -->  
321 - <view class="price flex xc-ash line_th">  
322 - <view class="fs22">¥</view>  
323 - <view class="fs22">{{item.market_price}}</view>  
324 - </view>  
325 - </view>  
326 - </block>  
327 - </block>  
328 - </block>  
329 - <block wx:else>  
330 - <view class='wz_red'>¥{{item.shop_price}}</view>  
331 - <view class='del'>¥{{item.market_price}}</view>  
332 - </block>  
333 - </block>  
334 - </view>  
335 - <view class='zs_wz5_2l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
336 - <!-- <view style="height: 10rpx;"></view> -->  
337 - </view>  
338 - <!-- </view> -->  
339 - <!-- </view> -->  
340 -  
341 - </view>  
342 - </navigator>  
343 - </view>  
344 -  
345 -</block>  
346 - <!-- <view class="clear"></view> -->  
347 -</view>  
348 -<!--3个一列-->  
349 -<block wx:if='{{object.column==3}}'>  
350 - <view class="flex wrap pdh10">  
351 - <block wx:for="{{goods_array}}" >  
352 - <view class="nav-box">  
353 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
354 - <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" >  
355 - <view class="zs_goods_san">  
356 - <view class='zs_goods_3l'>  
357 - <view class='zs_top_3l rel'> 167 + </view>
  168 + </view>
  169 + </block>
  170 + <block wx:else>
  171 + <view class="money flex" >
  172 + <!-- 办卡价 -->
  173 + <view class="flex xc-wc">
  174 + <view class="fs24 wz_red">¥</view>
  175 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  176 + </view>
  177 + </view>
  178 + <view class="flex" style="line-height: 28rpx;" >
  179 + <!-- 原价 -->
  180 + <view class="price flex xc-ash line_th">
  181 + <view class="fs22">¥</view>
  182 + <view class="fs22">{{item.market_price}}</view>
  183 + </view>
  184 + </view>
  185 + </block>
  186 + </block>
  187 + </block>
  188 +
  189 + <block wx:else>
  190 + <view class='wz_red'>¥{{item.shop_price}}</view>
  191 + <view class='del'>¥{{item.market_price}}</view>
  192 + </block>
  193 +
  194 + </block>
  195 +
  196 + </view>
  197 + <view class='zs_wz4 c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  198 + <!-- <view style="height: 10rpx;"></view> -->
  199 + </view>
  200 + </navigator>
  201 + </view>
  202 + <!-- <view style="height:20rpx"></view> -->
  203 + </block>
  204 +
  205 + </view>
  206 + <!--2个一列-->
  207 + <view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;">
  208 + <block wx:for="{{goods_array}}" >
  209 + <view class="nav-container">
  210 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}">
  211 + <view class="zs_goods_wai_ban">
  212 + <!-- <view class="zs_goods_ban"> -->
  213 + <!-- <view class='zs_goods_2l'> -->
  214 + <view class='zs_top_2l rel'>
  215 +
358 <block wx:if="{{object.big_order_type==3}}"> 216 <block wx:if="{{object.big_order_type==3}}">
359 <view style="position: relative; width: 100%; height: 100%"> 217 <view style="position: relative; width: 100%; height: 100%">
360 - <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" 218 + <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
361 binderror="bind_bnerr3"></image> 219 binderror="bind_bnerr3"></image>
362 <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" 220 <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
363 binderror="bind_bnerr3"></image> 221 binderror="bind_bnerr3"></image>
364 </view> 222 </view>
365 </block> 223 </block>
366 <block wx:else> 224 <block wx:else>
367 - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" 225 + <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
368 binderror="bind_bnerr3"></image> 226 binderror="bind_bnerr3"></image>
369 </block> 227 </block>
370 228
@@ -386,17 +244,17 @@ @@ -386,17 +244,17 @@
386 src='{{imghost}}/miniapp/images/Promotion.png'></image> 244 src='{{imghost}}/miniapp/images/Promotion.png'></image>
387 </block> 245 </block>
388 </view> 246 </view>
389 - <view class='zs_center_3l'>  
390 247
  248 + <view class='zs_center_2l'>
  249 + <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  250 + <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}">
391 251
392 - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
393 - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">  
394 <block wx:if="{{item.prom_price || item.prom_integral}}"> 252 <block wx:if="{{item.prom_price || item.prom_integral}}">
395 <view class='wz_red'> 253 <view class='wz_red'>
396 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
397 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
398 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
399 - </view> 254 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  255 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  256 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  257 + </view>
400 <view class='del'>¥{{item.market_price}}</view> 258 <view class='del'>¥{{item.market_price}}</view>
401 </block> 259 </block>
402 <block wx:else> 260 <block wx:else>
@@ -412,7 +270,7 @@ @@ -412,7 +270,7 @@
412 <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> 270 <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
413 <view class="card_bg ellipsis-1"> 271 <view class="card_bg ellipsis-1">
414 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> 272 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
415 - <text class="card_name">{{card_name}}</text> 273 + <view class="card_name">{{card_name}}</view>
416 </view> 274 </view>
417 </view> 275 </view>
418 </view> 276 </view>
@@ -488,364 +346,529 @@ @@ -488,364 +346,529 @@
488 </block> 346 </block>
489 </block> 347 </block>
490 <block wx:else> 348 <block wx:else>
491 - <view class='wz_red'>¥{{item.shop_price}}</view>  
492 - <view class='del'>¥{{item.market_price}}</view> 349 + <view class='wz_red'>¥{{item.shop_price}}</view>
  350 + <view class='del'>¥{{item.market_price}}</view>
493 </block> 351 </block>
494 </block> 352 </block>
495 </view> 353 </view>
496 - <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>  
497 - <!-- <view style="height: 10rpx;"></view> --> 354 + <view class='zs_wz5_2l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  355 + <!-- <view style="height: 10rpx;"></view> -->
498 </view> 356 </view>
499 - </view>  
500 - </view> 357 + <!-- </view> -->
  358 + <!-- </view> -->
  359 +
501 </view> 360 </view>
502 </navigator> 361 </navigator>
503 </view> 362 </view>
504 -  
505 - </block>  
506 -</view>  
507 - <!-- <view class="clear"></view> -->  
508 -</block>  
509 -<!-- 列表显示 -->  
510 -<view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'>  
511 - <block wx:for="{{goods_array}}" >  
512 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">  
513 - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >  
514 - <view class='zs_top_x'>  
515 - <block wx:if="{{object.big_order_type==3}}">  
516 - <view style="position: relative; width: 100%; height: 100%">  
517 - <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
518 - binderror="bind_bnerr3"></image>  
519 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%;" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
520 - binderror="bind_bnerr3"></image>  
521 - </view>  
522 - </block>  
523 -  
524 - <block wx:else>  
525 - <!-- 原来的 -->  
526 - <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"  
527 - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
528 - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> -->  
529 -  
530 - <!-- 2021.11.27修改 -->  
531 - <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"  
532 - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"  
533 - binderror="bind_bnerr3"></image>  
534 - </block>  
535 -  
536 - <block wx:if="{{object.goodicon==3}}">  
537 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
538 - src='{{object.customicon}}'></image>  
539 - </block>  
540 - <block wx:if="{{object.goodicon==1}}">  
541 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
542 - </block>  
543 - <block wx:if="{{object.goodicon==2}}">  
544 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
545 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
546 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
547 - src='{{imghost}}/miniapp/images/hot.png'></image>  
548 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
549 - src='{{imghost}}/miniapp/images/new.png'></image>  
550 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
551 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
552 - </block>  
553 - </view>  
554 -  
555 - <view class='zs_center_x'>  
556 - <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>  
557 - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}">  
558 -  
559 - <block wx:if="{{item.prom_price || item.prom_integral}}">  
560 - <view class='wz_red'>  
561 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
562 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
563 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
564 - </view>  
565 - <view class='del'>¥{{item.market_price}}</view>  
566 - </block>  
567 - <!-- 不是活动的情况 -->  
568 - <block wx:else>  
569 -  
570 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >  
571 - <!-- 当会员是等级卡的时候 -->  
572 - <block wx:if="{{card_field}}">  
573 - <!-- 等级价>0 -->  
574 - <block wx:if="{{item[card_field]>0}}">  
575 - <view class="money flex" >  
576 - <!-- 办卡价 -->  
577 - <view class="flex xc-wc ai_and">  
578 - <view class="fs24 wz_red">¥</view>  
579 - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>  
580 - <view class="card_bg ellipsis-1">  
581 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
582 - <text class="card_name">{{card_name}}</text>  
583 - </view>  
584 - </view>  
585 - </view>  
586 - <view class="flex" style="line-height: 28rpx;" >  
587 - <!-- 原价 -->  
588 - <view class="price flex xc-ash line_th">  
589 - <view class="fs22">¥</view>  
590 - <view class="fs22">{{item.market_price}}</view>  
591 - </view>  
592 - </view>  
593 - </block>  
594 - <blocK wx:else>  
595 - <view class="money flex" >  
596 - <!-- 办卡价 -->  
597 - <view class="flex xc-wc">  
598 - <view class="fs24">¥</view>  
599 - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>  
600 - </view>  
601 - </view>  
602 - <view class="flex" style="line-height: 28rpx;" >  
603 - <!-- 原价 -->  
604 - <view class="price flex xc-ash line_th">  
605 - <view class="fs22">¥</view>  
606 - <view class="fs22">{{item.market_price}}</view>  
607 - </view>  
608 - </view>  
609 - </blocK>  
610 - </block>  
611 - <block wx:else>  
612 - <!-- 如果商品有设置等级价大于0的 -->  
613 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">  
614 - <view class="money flex" >  
615 - <!-- 办卡价 -->  
616 - <view class="flex xc-wc">  
617 - <view class="fs24">¥</view>  
618 - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>  
619 - </view>  
620 - <!-- 原价 -->  
621 - <view class="price flex xc-ash line_th">  
622 - <view class="fs22">¥</view>  
623 - <view class="fs22">{{item.market_price}}</view>  
624 - </view> 363 +
  364 + </block>
  365 + <!-- <view class="clear"></view> -->
  366 + </view>
  367 + <!--3个一列-->
  368 + <block wx:if='{{object.column==3}}'>
  369 + <view class="flex wrap pdh10">
  370 + <block wx:for="{{goods_array}}" >
  371 + <view class="nav-box">
  372 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  373 + <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" >
  374 + <view class="zs_goods_san">
  375 + <view class='zs_goods_3l'>
  376 + <view class='zs_top_3l rel'>
  377 + <block wx:if="{{object.big_order_type==3}}">
  378 + <view style="position: relative; width: 100%; height: 100%">
  379 + <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  380 + binderror="bind_bnerr3"></image>
  381 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  382 + binderror="bind_bnerr3"></image>
  383 + </view>
  384 + </block>
  385 + <block wx:else>
  386 + <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  387 + binderror="bind_bnerr3"></image>
  388 + </block>
  389 +
  390 + <block wx:if="{{object.goodicon==3}}">
  391 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  392 + src='{{object.customicon}}'></image>
  393 + </block>
  394 + <block wx:if="{{object.goodicon==1}}">
  395 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  396 + </block>
  397 + <block wx:if="{{object.goodicon==2}}">
  398 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  399 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  400 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  401 + src='{{imghost}}/miniapp/images/hot.png'></image>
  402 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  403 + src='{{imghost}}/miniapp/images/new.png'></image>
  404 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  405 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  406 + </block>
  407 + </view>
  408 + <view class='zs_center_3l'>
  409 +
  410 +
  411 + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  412 + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
  413 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  414 + <view class='wz_red'>
  415 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  416 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  417 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  418 + </view>
  419 + <view class='del'>¥{{item.market_price}}</view>
  420 + </block>
  421 + <block wx:else>
  422 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  423 + <!-- 当会员是等级卡的时候 -->
  424 + <block wx:if="{{card_field}}">
  425 + <!-- 等级价>0 -->
  426 + <block wx:if="{{item[card_field]>0}}">
  427 + <view class="money flex" >
  428 + <!-- 办卡价 -->
  429 + <view class="flex xc-wc ai_and">
  430 + <view class="fs24 wz_red">¥</view>
  431 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  432 + <view class="card_bg ellipsis-1">
  433 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  434 + <text class="card_name">{{card_name}}</text>
  435 + </view>
  436 + </view>
  437 + </view>
  438 + <view class="flex" style="line-height: 28rpx;" >
  439 + <!-- 原价 -->
  440 + <view class="price flex xc-ash line_th">
  441 + <view class="fs22">¥</view>
  442 + <view class="fs22">{{item.market_price}}</view>
  443 + </view>
  444 + </view>
  445 + </block>
  446 + <blocK wx:else>
  447 + <view class="money flex" >
  448 + <!-- 办卡价 -->
  449 + <view class="flex xc-wc">
  450 + <view class="fs24 wz_red">¥</view>
  451 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  452 + </view>
  453 + </view>
  454 + <view class="flex" style="line-height: 28rpx;" >
  455 + <!-- 原价 -->
  456 + <view class="price flex xc-ash line_th">
  457 + <view class="fs22">¥</view>
  458 + <view class="fs22">{{item.market_price}}</view>
  459 + </view>
  460 + </view>
  461 + </blocK>
  462 + </block>
  463 + <block wx:else>
  464 + <!-- 如果商品有设置等级价大于0的 -->
  465 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  466 + <view class="money flex" >
  467 + <!-- 办卡价 -->
  468 + <view class="flex xc-wc">
  469 + <view class="fs24 wz_red">¥</view>
  470 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  471 + </view>
  472 + <!-- 原价 -->
  473 + <view class="price flex xc-ash line_th">
  474 + <view class="fs22">¥</view>
  475 + <view class="fs22">{{item.market_price}}</view>
  476 + </view>
  477 +
  478 + </view>
  479 + <view class="flex" style="line-height: 28rpx;" >
  480 + <!-- 等级价 -->
  481 + <view class="price flex ai_and">
  482 + <view class="fs22">¥</view>
  483 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  484 + <view class="card_bg ellipsis-1">
  485 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  486 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
  487 + </view>
  488 + </view>
  489 + </view>
  490 + </block>
  491 + <block wx:else>
  492 + <view class="money flex" >
  493 + <!-- 办卡价 -->
  494 + <view class="flex xc-wc">
  495 + <view class="fs24 wz_red">¥</view>
  496 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  497 + </view>
  498 + </view>
  499 + <view class="flex" style="line-height: 28rpx;" >
  500 + <!-- 原价 -->
  501 + <view class="price flex xc-ash line_th">
  502 + <view class="fs22">¥</view>
  503 + <view class="fs22">{{item.market_price}}</view>
  504 + </view>
  505 + </view>
  506 + </block>
  507 + </block>
  508 + </block>
  509 + <block wx:else>
  510 + <view class='wz_red'>¥{{item.shop_price}}</view>
  511 + <view class='del'>¥{{item.market_price}}</view>
  512 + </block>
  513 + </block>
  514 + </view>
  515 + <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
  516 + <!-- <view style="height: 10rpx;"></view> -->
  517 + </view>
  518 + </view>
  519 + </view>
  520 + </view>
  521 + </navigator>
  522 + </view>
  523 +
  524 + </block>
  525 + </view>
  526 + <!-- <view class="clear"></view> -->
  527 + </block>
  528 + <!-- 列表显示 -->
  529 + <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'>
  530 + <block wx:for="{{goods_array}}" >
  531 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
  532 + <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >
  533 + <view class='zs_top_x'>
  534 + <block wx:if="{{object.big_order_type==3}}">
  535 + <view style="position: relative; width: 100%; height: 100%">
  536 + <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  537 + binderror="bind_bnerr3"></image>
  538 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%;" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  539 + binderror="bind_bnerr3"></image>
  540 + </view>
  541 + </block>
  542 +
  543 + <block wx:else>
  544 + <!-- 原来的 -->
  545 + <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"
  546 + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  547 + binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> -->
  548 +
  549 + <!-- 2021.11.27修改 -->
  550 + <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"
  551 + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  552 + binderror="bind_bnerr3"></image>
  553 + </block>
  554 +
  555 + <block wx:if="{{object.goodicon==3}}">
  556 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  557 + src='{{object.customicon}}'></image>
  558 + </block>
  559 + <block wx:if="{{object.goodicon==1}}">
  560 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  561 + </block>
  562 + <block wx:if="{{object.goodicon==2}}">
  563 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  564 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  565 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  566 + src='{{imghost}}/miniapp/images/hot.png'></image>
  567 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  568 + src='{{imghost}}/miniapp/images/new.png'></image>
  569 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  570 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  571 + </block>
  572 + </view>
  573 +
  574 + <view class='zs_center_x'>
  575 + <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view>
  576 + <view class='zs_wz2_x' wx:if="{{object.goodsprice}}">
625 577
626 - </view>  
627 - <view class="flex" style="line-height: 28rpx;" >  
628 - <!-- 等级价 -->  
629 - <view class="price flex ai_and">  
630 - <view class="fs22">¥</view>  
631 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>  
632 - <view class="card_bg">  
633 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view>  
634 - </view>  
635 - </view>  
636 - </block>  
637 - <block wx:else>  
638 - <view class="money flex" >  
639 - <!-- 办卡价 -->  
640 - <view class="flex xc-wc">  
641 - <view class="fs24 wz_red">¥</view>  
642 - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>  
643 - </view>  
644 - </view>  
645 - <view class="flex" style="line-height: 28rpx;" >  
646 - <!-- 原价 -->  
647 - <view class="price flex xc-ash line_th">  
648 - <view class="fs22">¥</view>  
649 - <view class="fs22">{{item.market_price}}</view>  
650 - </view>  
651 - </view>  
652 - </block>  
653 - </block> 578 + <block wx:if="{{item.prom_price || item.prom_integral}}">
  579 + <view class='wz_red'>
  580 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  581 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  582 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  583 + </view>
  584 + <view class='del'>¥{{item.market_price}}</view>
654 </block> 585 </block>
655 - 586 + <!-- 不是活动的情况 -->
656 <block wx:else> 587 <block wx:else>
657 - <view class='wz_red'>¥{{item.shop_price}}</view>  
658 - <view class='del'>¥{{item.market_price}}</view> 588 +
  589 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" >
  590 + <!-- 当会员是等级卡的时候 -->
  591 + <block wx:if="{{card_field}}">
  592 + <!-- 等级价>0 -->
  593 + <block wx:if="{{item[card_field]>0}}">
  594 + <view class="money flex" >
  595 + <!-- 办卡价 -->
  596 + <view class="flex xc-wc ai_and">
  597 + <view class="fs24 wz_red">¥</view>
  598 + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view>
  599 + <view class="card_bg ellipsis-1">
  600 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  601 + <text class="card_name">{{card_name}}</text>
  602 + </view>
  603 + </view>
  604 + </view>
  605 + <view class="flex" style="line-height: 28rpx;" >
  606 + <!-- 原价 -->
  607 + <view class="price flex xc-ash line_th">
  608 + <view class="fs22">¥</view>
  609 + <view class="fs22">{{item.market_price}}</view>
  610 + </view>
  611 + </view>
  612 + </block>
  613 + <blocK wx:else>
  614 + <view class="money flex" >
  615 + <!-- 办卡价 -->
  616 + <view class="flex xc-wc">
  617 + <view class="fs24">¥</view>
  618 + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
  619 + </view>
  620 + </view>
  621 + <view class="flex" style="line-height: 28rpx;" >
  622 + <!-- 原价 -->
  623 + <view class="price flex xc-ash line_th">
  624 + <view class="fs22">¥</view>
  625 + <view class="fs22">{{item.market_price}}</view>
  626 + </view>
  627 + </view>
  628 + </blocK>
  629 + </block>
  630 + <block wx:else>
  631 + <!-- 如果商品有设置等级价大于0的 -->
  632 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
  633 + <view class="money flex" >
  634 + <!-- 办卡价 -->
  635 + <view class="flex xc-wc">
  636 + <view class="fs24">¥</view>
  637 + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
  638 + </view>
  639 + <!-- 原价 -->
  640 + <view class="price flex xc-ash line_th">
  641 + <view class="fs22">¥</view>
  642 + <view class="fs22">{{item.market_price}}</view>
  643 + </view>
  644 +
  645 + </view>
  646 + <view class="flex" style="line-height: 28rpx;" >
  647 + <!-- 等级价 -->
  648 + <view class="price flex ai_and">
  649 + <view class="fs22">¥</view>
  650 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
  651 + <view class="card_bg">
  652 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view>
  653 + </view>
  654 + </view>
  655 + </block>
  656 + <block wx:else>
  657 + <view class="money flex" >
  658 + <!-- 办卡价 -->
  659 + <view class="flex xc-wc">
  660 + <view class="fs24 wz_red">¥</view>
  661 + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
  662 + </view>
  663 + </view>
  664 + <view class="flex" style="line-height: 28rpx;" >
  665 + <!-- 原价 -->
  666 + <view class="price flex xc-ash line_th">
  667 + <view class="fs22">¥</view>
  668 + <view class="fs22">{{item.market_price}}</view>
  669 + </view>
  670 + </view>
  671 + </block>
  672 + </block>
  673 + </block>
  674 +
  675 + <block wx:else>
  676 + <view class='wz_red'>¥{{item.shop_price}}</view>
  677 + <view class='del'>¥{{item.market_price}}</view>
  678 + </block>
  679 +
659 </block> 680 </block>
660 -  
661 - </block>  
662 - </view>  
663 - <view class='zs_wz5_x c-5' wx:if="{{object.goodsnum}}" style="font-size: 26rpx;">销量:{{item.sales_sum}}件</view>  
664 - </view>  
665 -  
666 - </view>  
667 - </navigator>  
668 - </block>  
669 - <view class="clear"></view> 681 + </view>
  682 + <view class='zs_wz5_x c-5' wx:if="{{object.goodsnum}}" style="font-size: 26rpx;">销量:{{item.sales_sum}}件</view>
  683 + </view>
  684 +
  685 + </view>
  686 + </navigator>
  687 + </block>
  688 + <view class="clear"></view>
  689 + </view>
  690 +
  691 +
  692 + <!-- 商品的显示不是左右 -->
  693 + <block wx:if="{{object.column!=5}}">
  694 + <block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}">
  695 + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" class="c-5">
  696 + {{loadText}}
  697 + </button>
  698 + </view></block>
  699 + <block wx:if="{{classstyle_id!='1' }}">
  700 + <view class="button-wrapper pd20" wx:if="{{object.goodscount * page <total }}">
  701 + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);color: #555;">{{loadText}}</button>
  702 + </view>
  703 + <view class="fs22" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">—— 宝贝已经全部加载 —— </view>
  704 +
  705 + </block>
  706 + </block>
  707 +
  708 +
  709 + <!--商品展示-->
  710 + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">
  711 + <view class="sp">
  712 + <swiper-item class="s_it" wx:for="{{goods_array}}">
  713 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  714 + <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >
  715 + <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}">
  716 + <view class='sp_top'>
  717 + <view class='s_img' style="position: relative; width: 100%">
  718 +
  719 + <block wx:if="{{object.big_order_type==3}}">
  720 + <view style="position: relative; width: 100%; height: 100%">
  721 + <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  722 + binderror="bind_bnerr3"></image>
  723 +
  724 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  725 + </view>
  726 + </block>
  727 +
  728 + <block wx:else>
  729 + <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"
  730 + binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>
  731 + </block>
  732 +
  733 +
  734 + <block wx:if="{{object.goodicon==3}}">
  735 + <image class='{{g_filter.get_class(object.column,object.position)}}'
  736 + src='{{object.customicon}}'></image>
  737 + </block>
  738 + <block wx:if="{{object.goodicon==1}}">
  739 + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>
  740 + </block>
  741 + <block wx:if="{{object.goodicon==2}}">
  742 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"
  743 + src='{{imghost}}/miniapp/images/Recommend.png'></image>
  744 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"
  745 + src='{{imghost}}/miniapp/images/hot.png'></image>
  746 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"
  747 + src='{{imghost}}/miniapp/images/new.png'></image>
  748 + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"
  749 + src='{{imghost}}/miniapp/images/Promotion.png'></image>
  750 + </block>
  751 +
  752 + </view>
  753 + <view class='clear'></view>
  754 + </view>
  755 +
  756 + <view class='pd10'>
  757 + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view>
  758 + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">
  759 + <block wx:if="{{aitem.prom_price || aitem.prom_integral }}">
  760 + <view class='wz_red'>
  761 + <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text>
  762 + <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>
  763 + <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>
  764 + </view>
  765 + <view class='del'>¥{{aitem.market_price}}</view>
  766 + </block>
  767 + <block wx:else>
  768 + <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}" >
  769 + <!-- 当会员是等级卡的时候 -->
  770 + <block wx:if="{{card_field}}">
  771 + <!-- 等级价>0 -->
  772 + <block wx:if="{{aitem[card_field]>0}}">
  773 + <view class="money flex" >
  774 + <!-- 办卡价 -->
  775 + <view class="flex xc-wc ai_and">
  776 + <view class="fs24 wz_red">¥</view>
  777 + <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view>
  778 + <view class="card_bg ellipsis-1">
  779 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  780 + <text class="card_name">{{card_name}}</text>
  781 + </view>
  782 + </view>
  783 + </view>
  784 + <view class="flex" style="line-height: 28rpx;" >
  785 + <!-- 原价 -->
  786 + <view class="price flex xc-ash line_th">
  787 + <view class="fs22">¥</view>
  788 + <view class="fs22">{{aitem.market_price}}</view>
  789 + </view>
  790 + </view>
  791 + </block>
  792 + <blocK wx:else>
  793 + <view class="money flex" >
  794 + <!-- 办卡价 -->
  795 + <view class="flex xc-wc">
  796 + <view class="fs24 wz_red">¥</view>
  797 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  798 + </view>
  799 + </view>
  800 + <view class="flex" style="line-height: 28rpx;" >
  801 + <!-- 原价 -->
  802 + <view class="price flex xc-ash line_th">
  803 + <view class="fs22">¥</view>
  804 + <view class="fs22">{{aitem.market_price}}</view>
  805 + </view>
  806 + </view>
  807 + </blocK>
  808 + </block>
  809 + <block wx:else>
  810 + <!-- 如果商品有设置等级价大于0的 -->
  811 + <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}">
  812 + <view class="money flex" >
  813 + <!-- 办卡价 -->
  814 + <view class="flex xc-wc">
  815 + <view class="fs24 wz_red">¥</view>
  816 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  817 + </view>
  818 + <!-- 原价 -->
  819 + <view class="price flex xc-ash line_th">
  820 + <view class="fs22">¥</view>
  821 + <view class="fs22">{{aitem.market_price}}</view>
  822 + </view>
  823 +
  824 + </view>
  825 + <view class="flex" style="line-height: 28rpx;" >
  826 + <!-- 等级价 -->
  827 + <view class="price flex ai_and">
  828 + <view class="fs22">¥</view>
  829 + <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view>
  830 + <view class="card_bg ellipsis-1">
  831 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  832 + <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text>
  833 + </view>
  834 + </view>
  835 + </view>
  836 + </block>
  837 + <block wx:else>
  838 + <view class="money flex" >
  839 + <!-- 办卡价 -->
  840 + <view class="flex xc-wc">
  841 + <view class="fs24 wz_red">¥</view>
  842 + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
  843 + </view>
  844 + </view>
  845 + <view class="flex" style="line-height: 28rpx;" >
  846 + <!-- 原价 -->
  847 + <view class="price flex xc-ash line_th">
  848 + <view class="fs22">¥</view>
  849 + <view class="fs22">{{aitem.market_price}}</view>
  850 + </view>
  851 + </view>
  852 + </block>
  853 + </block>
  854 + </block>
  855 + <block wx:else>
  856 + <view class='wz_red'>¥{{aitem.shop_price}}</view>
  857 + <view class='del'>¥{{aitem.market_price}}</view>
  858 + </block>
  859 + </block>
  860 + </view>
  861 + <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view>
  862 + <!-- <view style="height: 10rpx;"></view> -->
  863 + </view>
  864 +
  865 + </view>
  866 + </navigator>
  867 + </block>
  868 + </swiper-item>
  869 + </view>
  870 + </swiper>
  871 +
670 </view> 872 </view>
671 -  
672 -  
673 -<!-- 商品的显示不是左右 -->  
674 -<block wx:if="{{object.column!=5}}">  
675 -<block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}">  
676 - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" class="c-5">  
677 - {{loadText}}  
678 - </button>  
679 -</view></block>  
680 -<block wx:if="{{classstyle_id!='1' }}">  
681 - <view class="button-wrapper pd20" wx:if="{{object.goodscount * page <total }}">  
682 - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);color: #555;">{{loadText}}</button>  
683 - </view>  
684 - <view class="fs22" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">—— 宝贝已经全部加载 —— </view>  
685 -  
686 -</block>  
687 -</block>  
688 -  
689 -  
690 -<!--商品展示-->  
691 -<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">  
692 - <view class="sp">  
693 - <swiper-item class="s_it" wx:for="{{goods_array}}">  
694 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">  
695 - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >  
696 - <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}">  
697 - <view class='sp_top'>  
698 - <view class='s_img' style="position: relative; width: 100%">  
699 -  
700 - <block wx:if="{{object.big_order_type==3}}">  
701 - <view style="position: relative; width: 100%; height: 100%">  
702 - <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"  
703 - binderror="bind_bnerr3"></image>  
704 -  
705 - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>  
706 - </view>  
707 - </block>  
708 -  
709 - <block wx:else>  
710 - <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"  
711 - binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>  
712 - </block>  
713 -  
714 -  
715 - <block wx:if="{{object.goodicon==3}}">  
716 - <image class='{{g_filter.get_class(object.column,object.position)}}'  
717 - src='{{object.customicon}}'></image>  
718 - </block>  
719 - <block wx:if="{{object.goodicon==1}}">  
720 - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image>  
721 - </block>  
722 - <block wx:if="{{object.goodicon==2}}">  
723 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}"  
724 - src='{{imghost}}/miniapp/images/Recommend.png'></image>  
725 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}"  
726 - src='{{imghost}}/miniapp/images/hot.png'></image>  
727 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}"  
728 - src='{{imghost}}/miniapp/images/new.png'></image>  
729 - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}"  
730 - src='{{imghost}}/miniapp/images/Promotion.png'></image>  
731 - </block>  
732 -  
733 - </view>  
734 - <view class='clear'></view>  
735 - </view>  
736 -  
737 - <view class='pd10'>  
738 - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view>  
739 - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}">  
740 - <block wx:if="{{aitem.prom_price || aitem.prom_integral }}">  
741 - <view class='wz_red'>  
742 - <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text>  
743 - <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>  
744 - <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>  
745 - </view>  
746 - <view class='del'>¥{{aitem.market_price}}</view>  
747 - </block>  
748 - <block wx:else>  
749 - <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}" >  
750 - <!-- 当会员是等级卡的时候 -->  
751 - <block wx:if="{{card_field}}">  
752 - <!-- 等级价>0 -->  
753 - <block wx:if="{{aitem[card_field]>0}}">  
754 - <view class="money flex" >  
755 - <!-- 办卡价 -->  
756 - <view class="flex xc-wc ai_and">  
757 - <view class="fs24 wz_red">¥</view>  
758 - <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view>  
759 - <view class="card_bg ellipsis-1">  
760 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
761 - <text class="card_name">{{card_name}}</text>  
762 - </view>  
763 - </view>  
764 - </view>  
765 - <view class="flex" style="line-height: 28rpx;" >  
766 - <!-- 原价 -->  
767 - <view class="price flex xc-ash line_th">  
768 - <view class="fs22">¥</view>  
769 - <view class="fs22">{{aitem.market_price}}</view>  
770 - </view>  
771 - </view>  
772 - </block>  
773 - <blocK wx:else>  
774 - <view class="money flex" >  
775 - <!-- 办卡价 -->  
776 - <view class="flex xc-wc">  
777 - <view class="fs24 wz_red">¥</view>  
778 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
779 - </view>  
780 - </view>  
781 - <view class="flex" style="line-height: 28rpx;" >  
782 - <!-- 原价 -->  
783 - <view class="price flex xc-ash line_th">  
784 - <view class="fs22">¥</view>  
785 - <view class="fs22">{{aitem.market_price}}</view>  
786 - </view>  
787 - </view>  
788 - </blocK>  
789 - </block>  
790 - <block wx:else>  
791 - <!-- 如果商品有设置等级价大于0的 -->  
792 - <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}">  
793 - <view class="money flex" >  
794 - <!-- 办卡价 -->  
795 - <view class="flex xc-wc">  
796 - <view class="fs24 wz_red">¥</view>  
797 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
798 - </view>  
799 - <!-- 原价 -->  
800 - <view class="price flex xc-ash line_th">  
801 - <view class="fs22">¥</view>  
802 - <view class="fs22">{{aitem.market_price}}</view>  
803 - </view>  
804 -  
805 - </view>  
806 - <view class="flex" style="line-height: 28rpx;" >  
807 - <!-- 等级价 -->  
808 - <view class="price flex ai_and">  
809 - <view class="fs22">¥</view>  
810 - <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view>  
811 - <view class="card_bg ellipsis-1">  
812 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
813 - <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text>  
814 - </view>  
815 - </view>  
816 - </view>  
817 - </block>  
818 - <block wx:else>  
819 - <view class="money flex" >  
820 - <!-- 办卡价 -->  
821 - <view class="flex xc-wc">  
822 - <view class="fs24 wz_red">¥</view>  
823 - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>  
824 - </view>  
825 - </view>  
826 - <view class="flex" style="line-height: 28rpx;" >  
827 - <!-- 原价 -->  
828 - <view class="price flex xc-ash line_th">  
829 - <view class="fs22">¥</view>  
830 - <view class="fs22">{{aitem.market_price}}</view>  
831 - </view>  
832 - </view>  
833 - </block>  
834 - </block>  
835 - </block>  
836 - <block wx:else>  
837 - <view class='wz_red'>¥{{aitem.shop_price}}</view>  
838 - <view class='del'>¥{{aitem.market_price}}</view>  
839 - </block>  
840 - </block>  
841 - </view>  
842 - <view class='zs_wz5_3l c-5' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view>  
843 - <!-- <view style="height: 10rpx;"></view> -->  
844 - </view>  
845 -  
846 - </view>  
847 - </navigator>  
848 - </block>  
849 - </swiper-item>  
850 - </view>  
851 - </swiper>  
852 \ No newline at end of file 873 \ No newline at end of file
  874 +<!-- 服务卡项顶部标题 -->
  875 +<!-- class="scroll-view-item {{index == title_index ? 'active':''}}" -->
components/mp-sticky/mp-sticky.js 0 → 100644
  1 +const selectQuery = require('./selectQuery')
  2 +const target = '.weui-sticky'
  3 +
  4 +Component({
  5 + options: {
  6 + addGlobalClass: true,
  7 + // 指定所有 _ 开头的数据字段为纯数据字段
  8 + pureDataPattern: /^_/,
  9 + multipleSlots: true // 在组件定义时的选项中启用多slot支持
  10 + },
  11 + behaviors: [selectQuery],
  12 + properties: {
  13 + offsetTop: {
  14 + type: Number,
  15 + value: 0
  16 + },
  17 + zIndex: {
  18 + type: Number,
  19 + value: 99
  20 + },
  21 + disabled: {
  22 + type: Boolean,
  23 + value: false,
  24 + },
  25 + container: {
  26 + type: null
  27 + }
  28 + },
  29 + data: {
  30 + fixed: false,
  31 + height: 0,
  32 + _attached: false,
  33 + _containerHeight: 0,
  34 + },
  35 +
  36 + observers: {
  37 + disabled: function(newVal) {
  38 + if (!this.data._attached) return
  39 + newVal ? this.disconnectObserver() : this.initObserver()
  40 + },
  41 +
  42 + container: function(newVal) {
  43 + if (typeof newVal !== 'function' || !this.data.height) return
  44 + this.observerContainer()
  45 + },
  46 +
  47 + offsetTop: function(newVal){
  48 + if(typeof newVal !== 'number' || !this.data._attached) return
  49 + this.initObserver()
  50 + }
  51 +
  52 + },
  53 +
  54 + lifetimes: {
  55 + attached() {
  56 + this.data._attached = true
  57 + if (!this.data.disabled) this.initObserver()
  58 + },
  59 +
  60 + detached() {
  61 + this.data._attached = false
  62 + this.disconnectObserver()
  63 + }
  64 +
  65 + },
  66 +
  67 + methods: {
  68 + getContainerRect () {
  69 + const nodesRef = this.data.container()
  70 + return new Promise(resolve => nodesRef.boundingClientRect(resolve).exec())
  71 + },
  72 +
  73 + initObserver() {
  74 + this.disconnectObserver()
  75 + this.getRect(target).then(rect => {
  76 + this.setData({
  77 + height: rect.height
  78 + })
  79 + this.observerContent()
  80 + this.observerContainer()
  81 + })
  82 + },
  83 +
  84 + disconnectObserver(observerName) {
  85 + if (observerName) {
  86 + const observer = this[observerName]
  87 + observer && observer.disconnect()
  88 + } else {
  89 + this.contentObserver && this.contentObserver.disconnect()
  90 + this.containerObserver && this.containerObserver.disconnect()
  91 + }
  92 + },
  93 +
  94 + observerContent() {
  95 + const {offsetTop} = this.data
  96 + this.disconnectObserver('contentObserver')
  97 +
  98 + const contentObserver = this.createIntersectionObserver({
  99 + thresholds: [1],
  100 + initialRatio: 1
  101 + })
  102 + contentObserver.relativeToViewport({
  103 + top: -offsetTop
  104 + })
  105 + contentObserver.observe(target, res => {
  106 + if (this.data.disabled) return
  107 + this.setFixed(res.boundingClientRect.top)
  108 + })
  109 + this.contentObserver = contentObserver
  110 + },
  111 +
  112 + observerContainer() {
  113 + const {container, height, offsetTop} = this.data
  114 + if (typeof container !== 'function') return
  115 +
  116 + this.disconnectObserver('containerObserver')
  117 + this.getContainerRect().then(rect => {
  118 + this.getRect(target).then(contentRect => {
  119 + const _contentTop = contentRect.top
  120 + const _containerTop = rect.top
  121 + const _containerHeight = rect.height
  122 + const _relativeTop = _contentTop - _containerTop
  123 + const containerObserver = this.createIntersectionObserver({
  124 + thresholds: [1],
  125 + initialRatio: 1
  126 + })
  127 + containerObserver.relativeToViewport({
  128 + top: _containerHeight - height - offsetTop - _relativeTop
  129 + })
  130 + containerObserver.observe(target, (res) => {
  131 + if (this.data.disabled) return
  132 + this.setFixed(res.boundingClientRect.top);
  133 + })
  134 + this.data._relativeTop = _relativeTop
  135 + this.data._containerHeight = _containerHeight
  136 + this.containerObserver = containerObserver
  137 + })
  138 + })
  139 + },
  140 +
  141 + setFixed(top) {
  142 + const {height, _containerHeight, _relativeTop, offsetTop} = this.data
  143 + const fixed = _containerHeight && height
  144 + ? (top >= height + offsetTop + _relativeTop - _containerHeight) && (top < offsetTop)
  145 + : top < offsetTop
  146 + this.triggerEvent('scroll', {
  147 + scrollTop: top,
  148 + isFixed: fixed
  149 + })
  150 +
  151 + this.setData({fixed})
  152 + }
  153 + }
  154 +})
  155 +
components/mp-sticky/mp-sticky.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/mp-sticky/mp-sticky.wxml 0 → 100644
  1 +<wxs src="./mp-sticky.wxs" module="computed" />
  2 +
  3 +<view class="weui-sticky" style="{{computed.containerStyle({fixed, height, zIndex})}}">
  4 + <view class="{{fixed ? 'weui-sticky__fixed' : ''}}" style="{{computed.wrapStyle({fixed, offsetTop})}}">
  5 + <slot ></slot>
  6 + </view>
  7 +</view>
components/mp-sticky/mp-sticky.wxs 0 → 100644
  1 +
  2 +/* eslint-disable */
  3 +function wrapStyle(data) {
  4 + if (data.fixed) {
  5 + return 'top: ' + data.offsetTop + 'px;'
  6 + }
  7 + return ''
  8 +}
  9 +
  10 +function containerStyle(data) {
  11 + if (data.fixed) {
  12 + return 'height: ' + data.height + 'px; z-index: ' + data.zIndex + ';'
  13 + }
  14 + return ''
  15 +}
  16 +
  17 +module.exports = {
  18 + wrapStyle: wrapStyle,
  19 + containerStyle: containerStyle
  20 +}
components/mp-sticky/mp-sticky.wxss 0 → 100644
  1 +.weui-sticky {
  2 + position: relative;
  3 +}
  4 +
  5 +.weui-sticky__fixed {
  6 + position: fixed;
  7 + left: 0;
  8 + top: 0;
  9 + width: 100%;
  10 + background-color: white;
  11 +}
0 \ No newline at end of file 12 \ No newline at end of file
components/mp-sticky/selectQuery.js 0 → 100644
  1 +module.exports = Behavior({
  2 + methods: {
  3 + getRect(selector) {
  4 + return new Promise((resolve, reject) => {
  5 + this.createSelectorQuery()
  6 + .select(selector)
  7 + .boundingClientRect(rect => {
  8 + if (rect) {
  9 + resolve(rect)
  10 + } else {
  11 + reject(new Error(`can not find selector: ${selector}`))
  12 + }
  13 + }).exec()
  14 + })
  15 + },
  16 +
  17 + getAllRects(selector) {
  18 + return new Promise((resolve, reject) => {
  19 + this.createSelectorQuery()
  20 + .selectAll(selector)
  21 + .boundingClientRect(rects => {
  22 + if (rects && rects.lenght > 0) {
  23 + resolve(rects)
  24 + } else {
  25 + reject(new Error(`can not find selector: ${selector}`))
  26 + }
  27 + }).exec()
  28 + })
  29 + }
  30 + }
  31 +})
pages/index/index/index.js
@@ -84,6 +84,15 @@ Page({ @@ -84,6 +84,15 @@ Page({
84 full_ad: null, //全屏广告 84 full_ad: null, //全屏广告
85 full_screen: 0, //全屏广告 85 full_screen: 0, //全屏广告
86 is_ok_h5: 0, //判断要不要显示关注二维码 86 is_ok_h5: 0, //判断要不要显示关注二维码
  87 +
  88 + container: null,
  89 + },
  90 +
  91 + onReady() {
  92 + this.setData({
  93 + container: () => wx.createSelectorQuery().select('#container')
  94 + })
  95 + console.log('container', this.data.container);
87 }, 96 },
88 97
89 onLoad: async function (tt) { 98 onLoad: async function (tt) {
pages/index/index/index.json
@@ -21,7 +21,10 @@ @@ -21,7 +21,10 @@
21 "store_select": "/components/diy_store_select/diy_store_select", 21 "store_select": "/components/diy_store_select/diy_store_select",
22 "presell": "/components/diy_pregoods/diy_pregoods", 22 "presell": "/components/diy_pregoods/diy_pregoods",
23 "luckyGo": "/components/diy_luckyGo/diy_luckyGo", 23 "luckyGo": "/components/diy_luckyGo/diy_luckyGo",
24 - "serviceCard": "/components/diy_serviceCard/diy_serviceCard" 24 + "serviceCard": "/components/diy_serviceCard/diy_serviceCard",
  25 + "live": "/components/diy_live/diy_live",
  26 + "mp-dialog": "weui-miniprogram/dialog/dialog",
  27 + "mp-sticky": "/components/mp-sticky/mp-sticky"
25 }, 28 },
26 "enablePullDownRefresh": false 29 "enablePullDownRefresh": false
27 } 30 }
28 \ No newline at end of file 31 \ No newline at end of file
pages/index/index/index.wxml
@@ -45,6 +45,12 @@ @@ -45,6 +45,12 @@
45 </view> 45 </view>
46 </view> 46 </view>
47 </view> 47 </view>
  48 +
  49 +
  50 +
  51 +
  52 +
  53 +
48 <!-- 如果有关注,要 --> 54 <!-- 如果有关注,要 -->
49 <!-- <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view> --> 55 <!-- <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view> -->
50 <!-- 如果有顶部门店 --> 56 <!-- 如果有顶部门店 -->
@@ -137,6 +143,8 @@ @@ -137,6 +143,8 @@
137 </view> 143 </view>
138 </view> 144 </view>
139 </view> 145 </view>
  146 +
  147 +
140 <!-- 轮播 --> 148 <!-- 轮播 -->
141 <block wx:if="{{swiperimage.length>0}}"> 149 <block wx:if="{{swiperimage.length>0}}">
142 <!-- <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)" vertical> --> 150 <!-- <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)" vertical> -->
@@ -528,7 +536,7 @@ @@ -528,7 +536,7 @@
528 536
529 <!-- 服务卡项 --> 537 <!-- 服务卡项 -->
530 <block wx:if="{{item.ename=='servicecategory'}}"> 538 <block wx:if="{{item.ename=='servicecategory'}}">
531 - <serviceCard object="{{item.content}}"></serviceCard> 539 + <serviceCard object="{{item.content}}" sticky="{{template_arr[0].content.is_top}}" id="container"></serviceCard>
532 </block> 540 </block>
533 541
534 542