Commit c6b81e2d88e72f6084176040f35e48234c9732bc
1 parent
a24be348
1、服务卡项订单详情的bug优化
2、商品详情页面的优化
Showing
13 changed files
with
54 additions
and
34 deletions
packageA/pages/cart2_ser/cart2_ser.js
@@ -510,6 +510,9 @@ Page({ | @@ -510,6 +510,9 @@ Page({ | ||
510 | 'pickup_id': gg.pick_id, | 510 | 'pickup_id': gg.pick_id, |
511 | 'pickup_keyid': list[i].keyid, | 511 | 'pickup_keyid': list[i].keyid, |
512 | }; | 512 | }; |
513 | + if(gg.is_pd_normal){ | ||
514 | + goods.is_pd_normal=1; | ||
515 | + } | ||
513 | } | 516 | } |
514 | 517 | ||
515 | if(getApp().globalData.skinface_id){ | 518 | if(getApp().globalData.skinface_id){ |
@@ -562,6 +565,11 @@ Page({ | @@ -562,6 +565,11 @@ Page({ | ||
562 | goods.skinface_id=getApp().globalData.skinface_id; | 565 | goods.skinface_id=getApp().globalData.skinface_id; |
563 | } | 566 | } |
564 | 567 | ||
568 | + if(this.data.postdata && this.data.postdata.is_pd_normal==1){ | ||
569 | + goods.is_pd_normal=1; | ||
570 | + } | ||
571 | + | ||
572 | + | ||
565 | //--导购分享过来的id-- | 573 | //--导购分享过来的id-- |
566 | if (gg.guide_id) { | 574 | if (gg.guide_id) { |
567 | goods.guide_id = gg.guide_id; | 575 | goods.guide_id = gg.guide_id; |
@@ -634,7 +642,7 @@ Page({ | @@ -634,7 +642,7 @@ Page({ | ||
634 | }); | 642 | }); |
635 | setTimeout(function () { | 643 | setTimeout(function () { |
636 | wx.reLaunch({ | 644 | wx.reLaunch({ |
637 | - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | 645 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, |
638 | }) | 646 | }) |
639 | }, 1000) | 647 | }, 1000) |
640 | 648 |
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -310,6 +310,9 @@ Page({ | @@ -310,6 +310,9 @@ Page({ | ||
310 | var card_id = details.list[i].card_id; | 310 | var card_id = details.list[i].card_id; |
311 | var prom_type = details.list[i].prom_type > 0 ? details.list[i].prom_type : 0; | 311 | var prom_type = details.list[i].prom_type > 0 ? details.list[i].prom_type : 0; |
312 | var is_pd_normal = details.list[i].is_pd_normal; | 312 | var is_pd_normal = details.list[i].is_pd_normal; |
313 | + if(is_pd_normal){ | ||
314 | + newd['is_pd_normal'] = 1; | ||
315 | + } | ||
313 | // 库存 | 316 | // 库存 |
314 | var redisNums = 0; | 317 | var redisNums = 0; |
315 | // 限购数 | 318 | // 限购数 |
packageA/pages/serviceCard_pd/goodsInfo/buy_pt.wxml
@@ -38,10 +38,9 @@ | @@ -38,10 +38,9 @@ | ||
38 | <view style="margin-top: 20rpx"> | 38 | <view style="margin-top: 20rpx"> |
39 | <view class="flex-space-between address ai_end xc-width "> | 39 | <view class="flex-space-between address ai_end xc-width "> |
40 | 40 | ||
41 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
42 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
43 | - | ||
44 | - | 41 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> |
42 | + <text class="fs30 xc-black3 shop_name {{def_pick_store.distance!=null?'max':''}} ">{{def_pick_store.pickup_name}}</text> | ||
43 | + | ||
45 | <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | 44 | <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> |
46 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 45 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
47 | 46 |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
@@ -195,6 +195,8 @@ Page({ | @@ -195,6 +195,8 @@ Page({ | ||
195 | prom_r_null: 0, | 195 | prom_r_null: 0, |
196 | hiddenCS: true, //控制客服操作菜单显示和控制 | 196 | hiddenCS: true, //控制客服操作菜单显示和控制 |
197 | user_order_pt_state: 0, | 197 | user_order_pt_state: 0, |
198 | + | ||
199 | + is_retail_price: 0, | ||
198 | }, | 200 | }, |
199 | 201 | ||
200 | //------初始化加载---------- | 202 | //------初始化加载---------- |
@@ -311,8 +313,10 @@ Page({ | @@ -311,8 +313,10 @@ Page({ | ||
311 | store_config: e, | 313 | store_config: e, |
312 | sys_switch: json_d, | 314 | sys_switch: json_d, |
313 | is_closecoupon: json_d.is_closecoupon, | 315 | is_closecoupon: json_d.is_closecoupon, |
314 | - is_newsales_rules: json_d.is_newsales_rules | 316 | + is_newsales_rules: json_d.is_newsales_rules, |
317 | + is_retail_price: json_d.is_retail_price || 0, | ||
315 | }); | 318 | }); |
319 | + | ||
316 | ee.init(gid); | 320 | ee.init(gid); |
317 | 321 | ||
318 | //------几人评价------ | 322 | //------几人评价------ |
@@ -457,20 +461,10 @@ Page({ | @@ -457,20 +461,10 @@ Page({ | ||
457 | mapurl_f_img = null; | 461 | mapurl_f_img = null; |
458 | 462 | ||
459 | 463 | ||
460 | - // ----> 秒杀 | ||
461 | - let prom_type = this.data.options.prom_type; | ||
462 | 464 | ||
463 | let goods_id = this.data.options.goods_id; | 465 | let goods_id = this.data.options.goods_id; |
464 | if (!goods_id) goods_id = this.data.data.goods_id; | 466 | if (!goods_id) goods_id = this.data.data.goods_id; |
465 | 467 | ||
466 | - if (prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入 | ||
467 | - let prom_id = this.data.options.prom_id; | ||
468 | - // 检查活动是否开始 | ||
469 | - this.check_prom(goods_id, prom_type, prom_id); | ||
470 | - | ||
471 | - } | ||
472 | - | ||
473 | - | ||
474 | //------是否收藏---------- | 468 | //------是否收藏---------- |
475 | await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | 469 | await getApp().request.promiseGet("/api/weshop/goodscollect/page", { |
476 | data: { | 470 | data: { |
@@ -609,6 +603,16 @@ Page({ | @@ -609,6 +603,16 @@ Page({ | ||
609 | }); | 603 | }); |
610 | 604 | ||
611 | 605 | ||
606 | + // ----> 秒杀 | ||
607 | + let prom_type = that.data.options.prom_type; | ||
608 | + | ||
609 | + if (prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入 | ||
610 | + let prom_id = that.data.options.prom_id; | ||
611 | + // 检查活动是否开始 | ||
612 | + that.check_prom(t.data.data.id, prom_type, prom_id); | ||
613 | + } | ||
614 | + | ||
615 | + | ||
612 | that.getTaohe(); | 616 | that.getTaohe(); |
613 | //-----商品详情--- | 617 | //-----商品详情--- |
614 | if (!t.data.data.serviceContent) t.data.data.serviceContent = " "; | 618 | if (!t.data.data.serviceContent) t.data.data.serviceContent = " "; |
@@ -730,8 +734,8 @@ Page({ | @@ -730,8 +734,8 @@ Page({ | ||
730 | 734 | ||
731 | //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- | 735 | //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- |
732 | if (th.data.promcardbuynum != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal != 1) { | 736 | if (th.data.promcardbuynum != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal != 1) { |
733 | - if (th.data.goodsInputNum + th.data.promcardbuynum > th.data.prom_buy_limit) { | ||
734 | 737 | ||
738 | + if (th.data.goodsInputNum + th.data.promcardbuynum > th.data.prom_buy_limit) { | ||
735 | s.my_warnning('超出商品活动限购', 0, th); | 739 | s.my_warnning('超出商品活动限购', 0, th); |
736 | var num = th.data.prom_buy_limit - th.data.promcardbuynum; | 740 | var num = th.data.prom_buy_limit - th.data.promcardbuynum; |
737 | if (num < 0) num = 0; | 741 | if (num < 0) num = 0; |
@@ -3024,6 +3028,7 @@ Page({ | @@ -3024,6 +3028,7 @@ Page({ | ||
3024 | ee.countDown(endTime2); | 3028 | ee.countDown(endTime2); |
3025 | } | 3029 | } |
3026 | } | 3030 | } |
3031 | + | ||
3027 | //-------查看有多少人在开这个团------- | 3032 | //-------查看有多少人在开这个团------- |
3028 | th.get_team_group(prom_id); | 3033 | th.get_team_group(prom_id); |
3029 | } | 3034 | } |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
@@ -79,9 +79,9 @@ | @@ -79,9 +79,9 @@ | ||
79 | <view class="flex fs35 xc-qtsign">¥</view> | 79 | <view class="flex fs35 xc-qtsign">¥</view> |
80 | <view class="fs50 val">{{prom_price}}</view> | 80 | <view class="fs50 val">{{prom_price}}</view> |
81 | </view> | 81 | </view> |
82 | - <view class="word-line fs20 xc-qtunit-price"> | ||
83 | - 零售价¥{{filters.toFix(data.market_price,2)}} | ||
84 | - </view> | 82 | + <view wx:if="{{is_retail_price}}" class="fs20 xc-qtunit-price t-l" >零售价¥{{filters.toFix(data.market_price,2)}}</view> |
83 | + <view wx:else class="fs20 xc-qtunit-price t-l">¥{{filters.toFix(data.shop_price,2)}}</view> | ||
84 | + | ||
85 | </view> | 85 | </view> |
86 | 86 | ||
87 | <view class="abs white xc-nanber"> | 87 | <view class="abs white xc-nanber"> |
@@ -667,7 +667,7 @@ | @@ -667,7 +667,7 @@ | ||
667 | </block> | 667 | </block> |
668 | <view class="address-frame xc-ash"> | 668 | <view class="address-frame xc-ash"> |
669 | <view class="flex-vertical-between butttem5"> | 669 | <view class="flex-vertical-between butttem5"> |
670 | - <view class="flex xc-ash"> | 670 | + <view class="flex xc-ash" style="flex-shrink:0;max-width: 69%;" > |
671 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | 671 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} |
672 | <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> | 672 | <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> |
673 | <text class="no_store">(配送不匹配)</text> | 673 | <text class="no_store">(配送不匹配)</text> |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss
pages/cart/cart/cart.js
@@ -1355,7 +1355,7 @@ Page({ | @@ -1355,7 +1355,7 @@ Page({ | ||
1355 | continue; | 1355 | continue; |
1356 | } | 1356 | } |
1357 | 1357 | ||
1358 | - if (item.prom_type == 0) { | 1358 | + if (item.prom_type == 0 && !item.is_integral_normal && !item.is_pd_normal ) { |
1359 | var prom = null; | 1359 | var prom = null; |
1360 | var now = ut.gettimestamp(); | 1360 | var now = ut.gettimestamp(); |
1361 | await getApp().request.promiseGet(`/api/weshop/activitylist/listGoodActInfo2`, { | 1361 | await getApp().request.promiseGet(`/api/weshop/activitylist/listGoodActInfo2`, { |
pages/goods/goodsInfo/buy_com_pop.wxml
@@ -29,8 +29,8 @@ | @@ -29,8 +29,8 @@ | ||
29 | <!-- 选择门店模块 --> | 29 | <!-- 选择门店模块 --> |
30 | <view class="flex-space-between address ai_end xc-width "> | 30 | <view class="flex-space-between address ai_end xc-width "> |
31 | 31 | ||
32 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
33 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | 32 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> |
33 | + <text class="fs30 xc-black3 shop_name {{def_pick_store.distance!=null?'max':''}}">{{def_pick_store.pickup_name}}</text> | ||
34 | <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | 34 | <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> |
35 | 距离:{{def_pick_store.distance > 1000 ? filters.toFix(def_pick_store.distance / 1000, 2) + "km" : filters.toFix(def_pick_store.distance, 0) + "m"}} | 35 | 距离:{{def_pick_store.distance > 1000 ? filters.toFix(def_pick_store.distance / 1000, 2) + "km" : filters.toFix(def_pick_store.distance, 0) + "m"}} |
36 | 36 |
pages/goods/goodsInfo/buy_integral.wxml
@@ -26,9 +26,9 @@ | @@ -26,9 +26,9 @@ | ||
26 | <!-- 选择门店模块 --> | 26 | <!-- 选择门店模块 --> |
27 | <view class="flex-space-between address ai_end xc-width "> | 27 | <view class="flex-space-between address ai_end xc-width "> |
28 | 28 | ||
29 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
30 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
31 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | 29 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> |
30 | + <text class="fs30 xc-black3 shop_name {{def_pick_store.distance!=null?'max':''}} ">{{def_pick_store.pickup_name}}</text> | ||
31 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | ||
32 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 32 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
33 | 33 | ||
34 | </view> | 34 | </view> |
pages/goods/goodsInfo/buy_pt.wxml
@@ -47,11 +47,10 @@ | @@ -47,11 +47,10 @@ | ||
47 | <view style="margin-top: 20rpx"> | 47 | <view style="margin-top: 20rpx"> |
48 | <view class="flex-space-between address ai_end xc-width "> | 48 | <view class="flex-space-between address ai_end xc-width "> |
49 | 49 | ||
50 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
51 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
52 | - | ||
53 | - | ||
54 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | 50 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> |
51 | + <text class="fs30 xc-black3 shop_name {{def_pick_store.distance!=null?'max':''}}">{{def_pick_store.pickup_name}}</text> | ||
52 | + | ||
53 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | ||
55 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 54 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
56 | 55 | ||
57 | </view> | 56 | </view> |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -130,6 +130,7 @@ | @@ -130,6 +130,7 @@ | ||
130 | 130 | ||
131 | <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | 131 | <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c">零售价:¥{{filters.toFix(data.market_price,2)}}</view> |
132 | <view wx:else class="word-line no_line_x fs20 xc-qtunit-price">¥{{filters.toFix(data.shop_price,2)}}</view> | 132 | <view wx:else class="word-line no_line_x fs20 xc-qtunit-price">¥{{filters.toFix(data.shop_price,2)}}</view> |
133 | + | ||
133 | </view> | 134 | </view> |
134 | 135 | ||
135 | <view class="abs white xc-nanber"> | 136 | <view class="abs white xc-nanber"> |
pages/user/order_list/order_list.js
@@ -2469,6 +2469,7 @@ Page({ | @@ -2469,6 +2469,7 @@ Page({ | ||
2469 | 2469 | ||
2470 | // 卡项订单 - 立即支付 | 2470 | // 卡项订单 - 立即支付 |
2471 | pay: async function (e) { | 2471 | pay: async function (e) { |
2472 | + let th=this; | ||
2472 | let index = e.currentTarget.dataset.index; | 2473 | let index = e.currentTarget.dataset.index; |
2473 | let item = this.data.cardList[index]; | 2474 | let item = this.data.cardList[index]; |
2474 | let order_sn = item.order_sn; | 2475 | let order_sn = item.order_sn; |
pages/user/order_list/order_list.wxml
@@ -422,10 +422,10 @@ | @@ -422,10 +422,10 @@ | ||
422 | </block> | 422 | </block> |
423 | 423 | ||
424 | <navigator class="commodity_To_evaluate flex-level comment_go" | 424 | <navigator class="commodity_To_evaluate flex-level comment_go" |
425 | - bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type!=6 && item.pay_status==0}}">立即支付</navigator> | 425 | + bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type!=6 && item.pay_status==0 && item.order_status<2}}">立即支付</navigator> |
426 | 426 | ||
427 | <navigator class="commodity_To_evaluate flex-level comment_go" | 427 | <navigator class="commodity_To_evaluate flex-level comment_go" |
428 | - bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type==6 && item.pt_status==0}}">立即支付</navigator> | 428 | + bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type==6 && item.pt_status==0 && item.order_status<2}}">立即支付</navigator> |
429 | 429 | ||
430 | <navigator class="commodity_To_evaluate flex-level comment_go" url="/packageA/pages/serviceCard_pd/cart_wk/cart_wk?order_id={{item.order_id}}" | 430 | <navigator class="commodity_To_evaluate flex-level comment_go" url="/packageA/pages/serviceCard_pd/cart_wk/cart_wk?order_id={{item.order_id}}" |
431 | data-idx="{{index}}" wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">支付尾款</navigator> | 431 | data-idx="{{index}}" wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">支付尾款</navigator> |