Commit a4266f6eaf0f5b726ddececfcc7c5e24c2cb1a7e
1 parent
7bf4e75b
商品的多规格的优化
Showing
5 changed files
with
95 additions
and
74 deletions
pages/goods/goodsInfo/buy_com_pop.wxml
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | <view class="xc-goods-attribute"> | 72 | <view class="xc-goods-attribute"> |
73 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 73 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
74 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 74 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
75 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" | 75 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" |
76 | data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | 76 | data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> |
77 | {{item.gg}} | 77 | {{item.gg}} |
78 | </view> | 78 | </view> |
pages/goods/goodsInfo/buy_integral.wxml
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <view class="xc-goods-attribute"> | 61 | <view class="xc-goods-attribute"> |
62 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 62 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
63 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 63 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
64 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | 64 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> |
65 | {{item.gg}} | 65 | {{item.gg}} |
66 | </view> | 66 | </view> |
67 | </view> | 67 | </view> |
pages/goods/goodsInfo/buy_pt.wxml
@@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
85 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 85 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
86 | <block wx:if="{{is_normal==0}}"> | 86 | <block wx:if="{{is_normal==0}}"> |
87 | <view hidden="{{ismend==1}}" class="flex"> | 87 | <view hidden="{{ismend==1}}" class="flex"> |
88 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} | 88 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} |
89 | </view> | 89 | </view> |
90 | </view> | 90 | </view> |
91 | </block> | 91 | </block> |
pages/goods/goodsInfo/goodsInfo.js
@@ -1195,7 +1195,8 @@ Page({ | @@ -1195,7 +1195,8 @@ Page({ | ||
1195 | ee.setData({ | 1195 | ee.setData({ |
1196 | data: t.data.data, | 1196 | data: t.data.data, |
1197 | sele_g: t.data.data, | 1197 | sele_g: t.data.data, |
1198 | - userInfo: getApp().globalData.userInfo | 1198 | + userInfo: getApp().globalData.userInfo, |
1199 | + front_g: t.data.data, | ||
1199 | }); | 1200 | }); |
1200 | 1201 | ||
1201 | //获取统一条形码,普通商品和优惠促销的商品 | 1202 | //获取统一条形码,普通商品和优惠促销的商品 |
@@ -3469,8 +3470,9 @@ Page({ | @@ -3469,8 +3470,9 @@ Page({ | ||
3469 | item['disc'] = txt; | 3470 | item['disc'] = txt; |
3470 | if (item) this.setData({ | 3471 | if (item) this.setData({ |
3471 | sele_g: item, | 3472 | sele_g: item, |
3472 | - gid: gid, | ||
3473 | data: item, | 3473 | data: item, |
3474 | + //gid: gid, | ||
3475 | + | ||
3474 | }); | 3476 | }); |
3475 | 3477 | ||
3476 | 3478 | ||
@@ -4267,10 +4269,13 @@ Page({ | @@ -4267,10 +4269,13 @@ Page({ | ||
4267 | } | 4269 | } |
4268 | 4270 | ||
4269 | if(this.data.fir_set_sto==1){ | 4271 | if(this.data.fir_set_sto==1){ |
4272 | + this.data.fir_set_sto=0; | ||
4270 | if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ | 4273 | if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ |
4271 | let cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); | 4274 | let cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); |
4272 | th.setData({ | 4275 | th.setData({ |
4273 | - front_pick:cp_data | 4276 | + front_pick:cp_data, |
4277 | + front_only_pk:th.data.only_pk, | ||
4278 | + front_def_pickpu_list:th.data.def_pickpu_list, | ||
4274 | }) | 4279 | }) |
4275 | } | 4280 | } |
4276 | } | 4281 | } |
@@ -7317,6 +7322,11 @@ Page({ | @@ -7317,6 +7322,11 @@ Page({ | ||
7317 | choice_store: function (ee) { | 7322 | choice_store: function (ee) { |
7318 | var th = this; | 7323 | var th = this; |
7319 | var ind = ee.currentTarget.dataset.ind; | 7324 | var ind = ee.currentTarget.dataset.ind; |
7325 | + var isfront = ee.currentTarget.dataset.isfront; | ||
7326 | + | ||
7327 | + if(isfront) | ||
7328 | + th.data.isfront=1; | ||
7329 | + | ||
7320 | var bconfig = th.data.bconfig; | 7330 | var bconfig = th.data.bconfig; |
7321 | this.setData({ | 7331 | this.setData({ |
7322 | keyword:'' | 7332 | keyword:'' |
@@ -7645,9 +7655,19 @@ Page({ | @@ -7645,9 +7655,19 @@ Page({ | ||
7645 | } | 7655 | } |
7646 | 7656 | ||
7647 | 7657 | ||
7658 | + | ||
7659 | + | ||
7660 | + | ||
7661 | + | ||
7648 | if (!th.data.sele_g) return false; | 7662 | if (!th.data.sele_g) return false; |
7649 | //判断门店的配送方式是不是匹配 | 7663 | //判断门店的配送方式是不是匹配 |
7650 | var g_distr_type = th.data.sele_g.distr_type; | 7664 | var g_distr_type = th.data.sele_g.distr_type; |
7665 | + | ||
7666 | + if(th.data.isfront==1){ | ||
7667 | + g_distr_type = th.data.data.distr_type; | ||
7668 | + } | ||
7669 | + | ||
7670 | + | ||
7651 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { | 7671 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
7652 | wx.showToast({ | 7672 | wx.showToast({ |
7653 | title: "门店配送方式不匹配,请选择其他门店", | 7673 | title: "门店配送方式不匹配,请选择其他门店", |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -115,8 +115,8 @@ | @@ -115,8 +115,8 @@ | ||
115 | 115 | ||
116 | <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} | 116 | <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} |
117 | 117 | ||
118 | - <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
119 | - <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(data.shop_price,2)}}</view> | 118 | + <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
119 | + <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
120 | </view> | 120 | </view> |
121 | 121 | ||
122 | <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> | 122 | <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> |
@@ -143,8 +143,8 @@ | @@ -143,8 +143,8 @@ | ||
143 | <view class="flex fs35 xc-qtsign">¥</view> | 143 | <view class="flex fs35 xc-qtsign">¥</view> |
144 | <view class="fs50 val">{{prom_price}}</view> | 144 | <view class="fs50 val">{{prom_price}}</view> |
145 | </view> | 145 | </view> |
146 | - <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c" style="color:#fff !important ">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
147 | - <view wx:else class="word-line no_line_x fs20 xc-qtunit-price" style="color:#fff !important ">¥{{filters.toFix(data.shop_price,2)}}</view> | 146 | + <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c" style="color:#fff !important ">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
147 | + <view wx:else class="word-line no_line_x fs20 xc-qtunit-price" style="color:#fff !important ">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
148 | </view> | 148 | </view> |
149 | 149 | ||
150 | <view class="abs white xc-nanber"> | 150 | <view class="abs white xc-nanber"> |
@@ -199,7 +199,7 @@ | @@ -199,7 +199,7 @@ | ||
199 | <!-- 许程 商家团主页 --> | 199 | <!-- 许程 商家团主页 --> |
200 | <view class="xc-goods-explain flex-vertical-between"> | 200 | <view class="xc-goods-explain flex-vertical-between"> |
201 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> | 201 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> |
202 | - {{data.goods_name}} | 202 | + {{front_g.goods_name}} |
203 | </view> | 203 | </view> |
204 | <!-- 这个是分享按钮 --> | 204 | <!-- 这个是分享按钮 --> |
205 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | 205 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
@@ -236,7 +236,7 @@ | @@ -236,7 +236,7 @@ | ||
236 | 236 | ||
237 | <block wx:for="{{teamgroup}}" wx:for-index="t_ind"> | 237 | <block wx:for="{{teamgroup}}" wx:for-index="t_ind"> |
238 | <view class='group' wx:if="{{item.open_num>0}}" > | 238 | <view class='group' wx:if="{{item.open_num>0}}" > |
239 | - <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}" data-goodsid="{{data.goods_id}}"> | 239 | + <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}" data-goodsid="{{front_g.goods_id}}"> |
240 | <!-- <view class="flex ai_c"> --> | 240 | <!-- <view class="flex ai_c"> --> |
241 | <!-- //选项框头像 --> | 241 | <!-- //选项框头像 --> |
242 | <view class='gtou'> | 242 | <view class='gtou'> |
@@ -283,11 +283,11 @@ | @@ -283,11 +283,11 @@ | ||
283 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | 283 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> |
284 | 284 | ||
285 | <text wx:if="{{is_retail_price}}" class="rel_txt fs22 no_line_x" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | 285 | <text wx:if="{{is_retail_price}}" class="rel_txt fs22 no_line_x" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> |
286 | - 零售价:¥{{filters.toFix(data.market_price,2)}} | 286 | + 零售价:¥{{filters.toFix(front_g.market_price,2)}} |
287 | </text> | 287 | </text> |
288 | 288 | ||
289 | <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | 289 | <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> |
290 | - ¥{{filters.toFix(data.shop_price,2)}} | 290 | + ¥{{filters.toFix(front_g.shop_price,2)}} |
291 | </text> | 291 | </text> |
292 | 292 | ||
293 | </view> | 293 | </view> |
@@ -304,13 +304,13 @@ | @@ -304,13 +304,13 @@ | ||
304 | {{prom_act.show_time_off}}开始兑换 | 304 | {{prom_act.show_time_off}}开始兑换 |
305 | </view> | 305 | </view> |
306 | <view class="goods-title"> | 306 | <view class="goods-title"> |
307 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
308 | - <view class="goods-name elli">{{data.goods_name}}</view> | 307 | + <image wx:if="{{front_g.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> |
308 | + <view class="goods-name elli">{{front_g.goods_name}}</view> | ||
309 | </view> | 309 | </view> |
310 | <view class="goods-num"> | 310 | <view class="goods-num"> |
311 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> | 311 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> |
312 | <view class="stock"> | 312 | <view class="stock"> |
313 | - 折扣:{{g_filters.num((prom_price?prom_price:0)*10/data.shop_price)}}折 | 313 | + 折扣:{{g_filters.num((prom_price?prom_price:0)*10/front_g.shop_price)}}折 |
314 | </view> | 314 | </view> |
315 | <view class="stock">{{categories3[0].num}}人评价</view> | 315 | <view class="stock">{{categories3[0].num}}人评价</view> |
316 | </view> | 316 | </view> |
@@ -327,21 +327,21 @@ | @@ -327,21 +327,21 @@ | ||
327 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> | 327 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> |
328 | 328 | ||
329 | <view class="market-price flex" style="align-items: baseline;"> | 329 | <view class="market-price flex" style="align-items: baseline;"> |
330 | - <block wx:if="{{card_field && data[card_field]>0}}"> | 330 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> |
331 | <view class="flex ai-center grade-card-frame"> | 331 | <view class="flex ai-center grade-card-frame"> |
332 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 332 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
333 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | 333 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
334 | </view> | 334 | </view> |
335 | <text class="rel yuan">¥</text> | 335 | <text class="rel yuan">¥</text> |
336 | - {{filters.toFix(data[card_field],2)}} | 336 | + {{filters.toFix(front_g[card_field],2)}} |
337 | </block> | 337 | </block> |
338 | 338 | ||
339 | <block wx:else > | 339 | <block wx:else > |
340 | - <text class="rel yuan">¥</text>{{filters.toFix(data.shop_price,2)}} | 340 | + <text class="rel yuan">¥</text>{{filters.toFix(front_g.shop_price,2)}} |
341 | </block> | 341 | </block> |
342 | 342 | ||
343 | <view wx:if="{{is_retail_price}}" class='yj' style="margin-left:10rpx"> | 343 | <view wx:if="{{is_retail_price}}" class='yj' style="margin-left:10rpx"> |
344 | - <text class="no_line_x">零售价:¥{{filters.toFix(data.market_price,2)}}</text> | 344 | + <text class="no_line_x">零售价:¥{{filters.toFix(front_g.market_price,2)}}</text> |
345 | </view> | 345 | </view> |
346 | 346 | ||
347 | </view> | 347 | </view> |
@@ -355,33 +355,33 @@ | @@ -355,33 +355,33 @@ | ||
355 | </view> | 355 | </view> |
356 | <!-- 不是秒杀 --> | 356 | <!-- 不是秒杀 --> |
357 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> | 357 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> |
358 | - <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | 358 | + <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,front_g) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(front_g,card_list,1)!=''}}"> |
359 | <view class="flex ai-center grade-card-frame card-frame"> | 359 | <view class="flex ai-center grade-card-frame card-frame"> |
360 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 360 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
361 | <view class="fs24 white view card-name ellipsis-1"> | 361 | <view class="fs24 white view card-name ellipsis-1"> |
362 | - {{g_filters.get_card_price(data,card_list,1)}} | 362 | + {{g_filters.get_card_price(front_g,card_list,1)}} |
363 | </view> | 363 | </view> |
364 | </view> | 364 | </view> |
365 | <view class="fs32 xc-black3 ai_and carde_frame"> | 365 | <view class="fs32 xc-black3 ai_and carde_frame"> |
366 | - <text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}} | 366 | + <text class="fs26">¥</text>{{g_filters.get_card_price(front_g,card_list,0)}} |
367 | </view> | 367 | </view> |
368 | </view> | 368 | </view> |
369 | <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> | 369 | <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> |
370 | - <block wx:if="{{g_filters.is_has_rank(rank_switch,data) && is_no_plus}}"> | 370 | + <block wx:if="{{g_filters.is_has_rank(rank_switch,front_g) && is_no_plus}}"> |
371 | <!-- 不是秒杀,且会员不是等级会员 --> | 371 | <!-- 不是秒杀,且会员不是等级会员 --> |
372 | - <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | 372 | + <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(front_g,card_list,1)!=''}}"> |
373 | <view class="beauty-makeup-frame flex ai-center"> | 373 | <view class="beauty-makeup-frame flex ai-center"> |
374 | <view class="left flex ai-center jc_sa"> | 374 | <view class="left flex ai-center jc_sa"> |
375 | <view class="flex ai-center grade-card-frame card-frame advert-card"> | 375 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
376 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 376 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
377 | <view class="fs24 white view card-name ellipsis-1"> | 377 | <view class="fs24 white view card-name ellipsis-1"> |
378 | - {{g_filters.get_card_price(data,card_list,1)}} | 378 | + {{g_filters.get_card_price(front_g,card_list,1)}} |
379 | </view> | 379 | </view> |
380 | </view> | 380 | </view> |
381 | <view class="card-effect"> | 381 | <view class="card-effect"> |
382 | <view class="fs24 xc-black3"> | 382 | <view class="fs24 xc-black3"> |
383 | - 成为{{g_filters.get_card_price(data,card_list,1)}}立 | ||
384 | - <text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元 | 383 | + 成为{{g_filters.get_card_price(front_g,card_list,1)}}立 |
384 | + <text class="co-red">省{{filters.toFix(front_g.shop_price-g_filters.get_card_price(front_g,card_list,0),2)}}</text>元 | ||
385 | </view> | 385 | </view> |
386 | <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> | 386 | <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> |
387 | </view> | 387 | </view> |
@@ -393,7 +393,7 @@ | @@ -393,7 +393,7 @@ | ||
393 | </view> | 393 | </view> |
394 | </view> | 394 | </view> |
395 | <!-- 立即续费的显示 --> | 395 | <!-- 立即续费的显示 --> |
396 | - <view wx:elif="{{is_near_date && data[card_field]>0 && prom_type!=1 && prom_type!=2 && card_name!=''}}"> | 396 | + <view wx:elif="{{is_near_date && front_g[card_field]>0 && prom_type!=1 && prom_type!=2 && card_name!=''}}"> |
397 | <view class="beauty-makeup-frame flex ai-center"> | 397 | <view class="beauty-makeup-frame flex ai-center"> |
398 | <view class="left flex ai-center jc_sa"> | 398 | <view class="left flex ai-center jc_sa"> |
399 | <view class="flex ai-center grade-card-frame card-frame advert-card"> | 399 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
@@ -404,7 +404,7 @@ | @@ -404,7 +404,7 @@ | ||
404 | <view class="fs24 xc-black3"> | 404 | <view class="fs24 xc-black3"> |
405 | 成为{{card_name}}立 | 405 | 成为{{card_name}}立 |
406 | <text class="co-red"> | 406 | <text class="co-red"> |
407 | - 省{{filters.toFix(data.shop_price[card_field],2)}} | 407 | + 省{{filters.toFix(front_g.shop_price[card_field],2)}} |
408 | </text> | 408 | </text> |
409 | 元 | 409 | 元 |
410 | </view> | 410 | </view> |
@@ -422,13 +422,13 @@ | @@ -422,13 +422,13 @@ | ||
422 | <!-- 许程商品名字 --> | 422 | <!-- 许程商品名字 --> |
423 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> | 423 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> |
424 | <view class="goods-title"> | 424 | <view class="goods-title"> |
425 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
426 | - <view class="goods-name elli">{{data.goods_name}}</view> | 425 | + <image wx:if="{{front_g.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> |
426 | + <view class="goods-name elli">{{front_g.goods_name}}</view> | ||
427 | </view> | 427 | </view> |
428 | </view> | 428 | </view> |
429 | <view class="goods-num" wx:if="{{prom_type!=1 && prom_type!=2}}"> | 429 | <view class="goods-num" wx:if="{{prom_type!=1 && prom_type!=2}}"> |
430 | - <view class="sales">销量:{{data.sales_sum}}件</view> | ||
431 | - <view class="stock">折扣:{{g_filters.num(data.disc)}}折</view> | 430 | + <view class="sales">销量:{{front_g.sales_sum}}件</view> |
431 | + <view class="stock">折扣:{{g_filters.num(front_g.disc)}}折</view> | ||
432 | <view class="stock">{{categories3[0].num}}人评价</view> | 432 | <view class="stock">{{categories3[0].num}}人评价</view> |
433 | </view> | 433 | </view> |
434 | 434 | ||
@@ -439,8 +439,8 @@ | @@ -439,8 +439,8 @@ | ||
439 | <text class="fs30">¥</text> | 439 | <text class="fs30">¥</text> |
440 | {{prom_price}} | 440 | {{prom_price}} |
441 | </view> | 441 | </view> |
442 | - <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_x">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
443 | - <view wx:else class="word-line no_line_x fs24">¥{{filters.toFix(data.shop_price,2)}}</view> | 442 | + <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_x">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
443 | + <view wx:else class="word-line no_line_x fs24">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
444 | </view> | 444 | </view> |
445 | <!-- 这个是分享按钮 --> | 445 | <!-- 这个是分享按钮 --> |
446 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | 446 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
@@ -453,11 +453,11 @@ | @@ -453,11 +453,11 @@ | ||
453 | 453 | ||
454 | <!-- 秒杀的活动名称 --> | 454 | <!-- 秒杀的活动名称 --> |
455 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4 && prom_type!=2}}"> | 455 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4 && prom_type!=2}}"> |
456 | - {{sele_g.goods_name}} | 456 | + {{front_g.goods_name}} |
457 | </view> | 457 | </view> |
458 | 458 | ||
459 | <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> | 459 | <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> |
460 | - <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{sele_g.goods_name}}</view> | 460 | + <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{front_g.goods_name}}</view> |
461 | <!-- 这个是分享按钮 --> | 461 | <!-- 这个是分享按钮 --> |
462 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> | 462 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> |
463 | <view class="iconfont icon-share"></view> | 463 | <view class="iconfont icon-share"></view> |
@@ -676,7 +676,7 @@ | @@ -676,7 +676,7 @@ | ||
676 | 676 | ||
677 | 677 | ||
678 | <!-- 许程 7.24暂时注释 --> | 678 | <!-- 许程 7.24暂时注释 --> |
679 | - <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && sele_g.is_xz_yh !=1 && fir_quan.length>0 }}"> | 679 | + <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && front_g.is_xz_yh !=1 && fir_quan.length>0 }}"> |
680 | <view data-coupon="1" bindtap="switchCoupon" class="cx-frame flex" style="position: relative"> | 680 | <view data-coupon="1" bindtap="switchCoupon" class="cx-frame flex" style="position: relative"> |
681 | <view class="cx-sizs fs30">领券</view> | 681 | <view class="cx-sizs fs30">领券</view> |
682 | <view class="flex ai_c f1 pdh20"> | 682 | <view class="flex ai_c f1 pdh20"> |
@@ -695,8 +695,8 @@ | @@ -695,8 +695,8 @@ | ||
695 | </view> | 695 | </view> |
696 | 696 | ||
697 | <!-- 门店收货地址 --> | 697 | <!-- 门店收货地址 --> |
698 | - <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | ||
699 | - <view class="address_frame" bindtap="choice_store" data-ind="0"> | 698 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{front_pick!=null?'sn_height':'on_height'}}"> |
699 | + <view class="address_frame" bindtap="choice_store" data-ind="0" data-isfront="1" > | ||
700 | <view class="flex-vertical-between "> | 700 | <view class="flex-vertical-between "> |
701 | <view class="flex-vertical select_store_height"> | 701 | <view class="flex-vertical select_store_height"> |
702 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | 702 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> |
@@ -704,36 +704,36 @@ | @@ -704,36 +704,36 @@ | ||
704 | </view> | 704 | </view> |
705 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | 705 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> |
706 | </view> | 706 | </view> |
707 | - <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | 707 | + <view wx:if="{{front_pick && front_pick.pickup_name}}"> |
708 | <view class="flex-space-between address ai_end pdv10"> | 708 | <view class="flex-space-between address ai_end pdv10"> |
709 | <view> | 709 | <view> |
710 | - <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | 710 | + <text class="fs30 xc-black3 shop_name bold">{{front_pick.pickup_name}}</text> |
711 | </view> | 711 | </view> |
712 | - <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | ||
713 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 712 | + <view class="distance fs24" wx:if="{{front_pick.distance!=null}}"> |
713 | + 距离:{{front_pick.distance>1000?filters.toFix(front_pick.distance/1000,2)+"km":filters.toFix(front_pick.distance,0)+"m"}} | ||
714 | </view> | 714 | </view> |
715 | </view> | 715 | </view> |
716 | - <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | 716 | + <view class="no_store" wx:if="{{front_only_pk && !front_only_pk.length}}">(库存不足)</view> |
717 | <block wx:else> | 717 | <block wx:else> |
718 | - <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | 718 | + <view class="no_store" wx:if="{{front_def_pickpu_list && !front_def_pickpu_list.length}}"> |
719 | (库存不足) | 719 | (库存不足) |
720 | </view> | 720 | </view> |
721 | <block wx:else> | 721 | <block wx:else> |
722 | - <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | 722 | + <view class="no_store" wx:if="{{front_pick && front_pick.is_no_dis}}"> |
723 | (配送不匹配) | 723 | (配送不匹配) |
724 | </view> | 724 | </view> |
725 | - <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}"> | 725 | + <view class="no_store" wx:elif="{{front_pick && front_pick.is_no_dis_nor && prom_type==0}}"> |
726 | (该店不可售) | 726 | (该店不可售) |
727 | </view> | 727 | </view> |
728 | - <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | 728 | + <view class="no_store" wx:elif="{{front_pick && front_pick.is_no_dis_act}}"> |
729 | (该店不可售) | 729 | (该店不可售) |
730 | </view> | 730 | </view> |
731 | - <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> | 731 | + <view class="no_store" wx:elif="{{front_pick && !front_pick.CanOutQty && sales_rules>=2 && prom_type==0 && !front_g.whsle_id}}"> |
732 | (库存不足) | 732 | (库存不足) |
733 | </view> | 733 | </view> |
734 | </block> | 734 | </block> |
735 | </block> | 735 | </block> |
736 | - <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | 736 | + <view class="fs24 xc-ash-9f">地址:{{front_pick.fulladdress}}</view> |
737 | </view> | 737 | </view> |
738 | </view> | 738 | </view> |
739 | </view> | 739 | </view> |
@@ -803,6 +803,7 @@ | @@ -803,6 +803,7 @@ | ||
803 | </view> | 803 | </view> |
804 | </scroll-view> | 804 | </scroll-view> |
805 | </view> | 805 | </view> |
806 | + | ||
806 | <!-- 图文详情 --> | 807 | <!-- 图文详情 --> |
807 | <view class="bdt16"> | 808 | <view class="bdt16"> |
808 | <view class="t_g_info"> | 809 | <view class="t_g_info"> |
@@ -816,7 +817,7 @@ | @@ -816,7 +817,7 @@ | ||
816 | <text>商品名称</text> | 817 | <text>商品名称</text> |
817 | </view> | 818 | </view> |
818 | <view class="item_right"> | 819 | <view class="item_right"> |
819 | - <text>{{data.goods_name}}</text> | 820 | + <text>{{front_g.goods_name}}</text> |
820 | </view> | 821 | </view> |
821 | </view> | 822 | </view> |
822 | <view class="tb_item tb-l"> | 823 | <view class="tb_item tb-l"> |
@@ -824,7 +825,7 @@ | @@ -824,7 +825,7 @@ | ||
824 | <text>商品编号</text> | 825 | <text>商品编号</text> |
825 | </view> | 826 | </view> |
826 | <view class="item_right"> | 827 | <view class="item_right"> |
827 | - <text>{{data.goods_sn}}</text> | 828 | + <text>{{front_g.goods_sn}}</text> |
828 | </view> | 829 | </view> |
829 | </view> | 830 | </view> |
830 | <view class="tb_item tb-l"> | 831 | <view class="tb_item tb-l"> |
@@ -832,7 +833,7 @@ | @@ -832,7 +833,7 @@ | ||
832 | <text>商品条码</text> | 833 | <text>商品条码</text> |
833 | </view> | 834 | </view> |
834 | <view class="item_right"> | 835 | <view class="item_right"> |
835 | - <text>{{data.sku}}</text> | 836 | + <text>{{front_g.sku}}</text> |
836 | </view> | 837 | </view> |
837 | </view> | 838 | </view> |
838 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | 839 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
@@ -864,7 +865,7 @@ | @@ -864,7 +865,7 @@ | ||
864 | <text>规格</text> | 865 | <text>规格</text> |
865 | </view> | 866 | </view> |
866 | <view class="item_right"> | 867 | <view class="item_right"> |
867 | - <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | 868 | + <text>{{filters.show_gui_ge(front_g.goods_spec,front_g.goods_color)}}</text> |
868 | </view> | 869 | </view> |
869 | </view> | 870 | </view> |
870 | <view class="tb_item tb-l"> | 871 | <view class="tb_item tb-l"> |
@@ -872,7 +873,7 @@ | @@ -872,7 +873,7 @@ | ||
872 | <text>上架时间</text> | 873 | <text>上架时间</text> |
873 | </view> | 874 | </view> |
874 | <view class="item_right"> | 875 | <view class="item_right"> |
875 | - <text>{{data.on_time}}</text> | 876 | + <text>{{front_g.on_time}}</text> |
876 | </view> | 877 | </view> |
877 | </view> | 878 | </view> |
878 | </view> | 879 | </view> |
@@ -904,7 +905,7 @@ | @@ -904,7 +905,7 @@ | ||
904 | <text>商品名称</text> | 905 | <text>商品名称</text> |
905 | </view> | 906 | </view> |
906 | <view class="item_right"> | 907 | <view class="item_right"> |
907 | - <text>{{data.goods_name}}</text> | 908 | + <text>{{front_g.goods_name}}</text> |
908 | </view> | 909 | </view> |
909 | </view> | 910 | </view> |
910 | <view class="tb_item tb-l"> | 911 | <view class="tb_item tb-l"> |
@@ -912,7 +913,7 @@ | @@ -912,7 +913,7 @@ | ||
912 | <text>商品编号</text> | 913 | <text>商品编号</text> |
913 | </view> | 914 | </view> |
914 | <view class="item_right"> | 915 | <view class="item_right"> |
915 | - <text>{{data.goods_sn}}</text> | 916 | + <text>{{front_g.goods_sn}}</text> |
916 | </view> | 917 | </view> |
917 | </view> | 918 | </view> |
918 | <view class="tb_item tb-l"> | 919 | <view class="tb_item tb-l"> |
@@ -920,7 +921,7 @@ | @@ -920,7 +921,7 @@ | ||
920 | <text>商品条码</text> | 921 | <text>商品条码</text> |
921 | </view> | 922 | </view> |
922 | <view class="item_right"> | 923 | <view class="item_right"> |
923 | - <text>{{data.sku}}</text> | 924 | + <text>{{front_g.sku}}</text> |
924 | </view> | 925 | </view> |
925 | </view> | 926 | </view> |
926 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | 927 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
@@ -952,7 +953,7 @@ | @@ -952,7 +953,7 @@ | ||
952 | <text>规格</text> | 953 | <text>规格</text> |
953 | </view> | 954 | </view> |
954 | <view class="item_right"> | 955 | <view class="item_right"> |
955 | - <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> | 956 | + <text>{{front_g.goods_spec==""?"规格1":front_g.goods_spec}}</text> |
956 | </view> | 957 | </view> |
957 | </view> | 958 | </view> |
958 | <view class="tb_item tb-l"> | 959 | <view class="tb_item tb-l"> |
@@ -960,7 +961,7 @@ | @@ -960,7 +961,7 @@ | ||
960 | <text>上架时间</text> | 961 | <text>上架时间</text> |
961 | </view> | 962 | </view> |
962 | <view class="item_right"> | 963 | <view class="item_right"> |
963 | - <text>{{data.on_time}}</text> | 964 | + <text>{{front_g.on_time}}</text> |
964 | </view> | 965 | </view> |
965 | </view> | 966 | </view> |
966 | </view> | 967 | </view> |
@@ -1102,13 +1103,13 @@ | @@ -1102,13 +1103,13 @@ | ||
1102 | <view>购物车</view> | 1103 | <view>购物车</view> |
1103 | </navigator> | 1104 | </navigator> |
1104 | </view> | 1105 | </view> |
1105 | - <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}"> | 1106 | + <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{front_g.goods.is_virtual}}"> |
1106 | 立即购买 | 1107 | 立即购买 |
1107 | </view> | 1108 | </view> |
1108 | <!-- 普通商品购买 --> | 1109 | <!-- 普通商品购买 --> |
1109 | <block wx:if="{{prom_type==0 || prom_type==3}}"> | 1110 | <block wx:if="{{prom_type==0 || prom_type==3}}"> |
1110 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | 1111 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> |
1111 | - <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules>=2 }}"> | 1112 | + <block wx:if="{{(front_g.store_count>0 && sales_rules==1) || sales_rules>=2 }}"> |
1112 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | 1113 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
1113 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | 1114 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> |
1114 | </block> | 1115 | </block> |
@@ -1177,11 +1178,11 @@ | @@ -1177,11 +1178,11 @@ | ||
1177 | <block wx:if="{{prom_type==6}}"> | 1178 | <block wx:if="{{prom_type==6}}"> |
1178 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | 1179 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> |
1179 | <view class="fir-v"> | 1180 | <view class="fir-v"> |
1180 | - <!-- ¥{{data.shop_price,2)}} --> | ||
1181 | - <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
1182 | - {{filters.toFix(sele_g[card_field],2)}} | 1181 | + |
1182 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> | ||
1183 | + {{filters.toFix(front_g[card_field],2)}} | ||
1183 | </block> | 1184 | </block> |
1184 | - <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 1185 | + <block wx:else>{{filters.toFix(front_g.shop_price,2)}}</block> |
1185 | </view> | 1186 | </view> |
1186 | <view>单独购买</view> | 1187 | <view>单独购买</view> |
1187 | </view> | 1188 | </view> |
@@ -1236,10 +1237,10 @@ | @@ -1236,10 +1237,10 @@ | ||
1236 | <block wx:if="{{is_shopbuy}}"> | 1237 | <block wx:if="{{is_shopbuy}}"> |
1237 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | 1238 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> |
1238 | <view class="fir-v"> | 1239 | <view class="fir-v"> |
1239 | - <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
1240 | - {{filters.toFix(sele_g[card_field],2)}} | 1240 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> |
1241 | + {{filters.toFix(front_g[card_field],2)}} | ||
1241 | </block> | 1242 | </block> |
1242 | - <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 1243 | + <block wx:else>{{filters.toFix(front_g.shop_price,2)}}</block> |
1243 | </view> | 1244 | </view> |
1244 | <view>单独购买</view> | 1245 | <view>单独购买</view> |
1245 | </view> | 1246 | </view> |
@@ -1390,12 +1391,12 @@ | @@ -1390,12 +1391,12 @@ | ||
1390 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 1391 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
1391 | 1392 | ||
1392 | <block wx:if="{{sku_g_pt}}"> | 1393 | <block wx:if="{{sku_g_pt}}"> |
1393 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | 1394 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> |
1394 | {{item.gg}} | 1395 | {{item.gg}} |
1395 | </view> | 1396 | </view> |
1396 | </block> | 1397 | </block> |
1397 | <block wx:else> | 1398 | <block wx:else> |
1398 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | 1399 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> |
1399 | {{item.gg}} | 1400 | {{item.gg}} |
1400 | </view> | 1401 | </view> |
1401 | </block> | 1402 | </block> |