Commit a14e1be6c0d35813a52fbafb17dcdf93ad0e0f8d
1 parent
ab5c060e
订单页面的优惠券,拼单的单独购买,分类的图片,商品详情的立即购买选择门店,支付成功页面的显示
Showing
8 changed files
with
76 additions
and
50 deletions
pages/cart/cart2/cart2.wxml
... | ... | @@ -341,11 +341,13 @@ |
341 | 341 | <text class="xc-rmb-val">{{item.Sum}}</text> |
342 | 342 | </view> |
343 | 343 | |
344 | - <view class="coupon-explain t-c" wx:if="{{item.BuySum==0}}"> | |
345 | - 无使用门槛 | |
344 | + | |
345 | + | |
346 | + <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}"> | |
347 | + 满{{item.BuySum}}元可用 | |
346 | 348 | </view> |
347 | - <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}"> | |
348 | - {{UseObjectName}} | |
349 | + <view class="coupon-explain t-c" wx:else> | |
350 | + 满0元可用 | |
349 | 351 | </view> |
350 | 352 | |
351 | 353 | </view> |
... | ... | @@ -360,9 +362,7 @@ |
360 | 362 | <view class="coupon-wode ib flex ellipsis-2 "> |
361 | 363 | <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}} |
362 | 364 | </text> |
363 | - <block wx:if="{{item.buy_sum>0}}">满{{item.buy_sum}}减{{item.Sum}}优惠券</block> | |
364 | - <block wx:else>全场通用减{{item.Sum}}优惠券</block> | |
365 | - <!-- </view> --> | |
365 | + <block>{{item.Sum}}元优惠券</block> | |
366 | 366 | </view> |
367 | 367 | <view class="coupon-time"> |
368 | 368 | {{filters.replace_time2(item.BeginDate)}}至{{filters.replace_time2(item.BillDate)}}</view> |
... | ... | @@ -425,9 +425,7 @@ |
425 | 425 | <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" > |
426 | 426 | <view class="tops flex"> |
427 | 427 | <view class="top-content fs32"> |
428 | - <view> | |
429 | - 选择物流名字 | |
430 | - </view> | |
428 | + <view>选择物流名字</view> | |
431 | 429 | </view> |
432 | 430 | <view class="close-frame" bindtap='close_express' > |
433 | 431 | <view class="xc-close-express">×</view> | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
... | ... | @@ -338,7 +338,6 @@ Page({ |
338 | 338 | }); |
339 | 339 | }); |
340 | 340 | }, |
341 | - | |
342 | 341 | //--------------------提交订单----------------------- |
343 | 342 | submitForm:function(t){ |
344 | 343 | if(this.data.is_summit_ing==1) return false; //--提交中退出-- |
... | ... | @@ -469,7 +468,7 @@ Page({ |
469 | 468 | util_pay.pay(data.data, function() { |
470 | 469 | setTimeout(function () { |
471 | 470 | wx.navigateTo({ |
472 | - url: "/pages/payment/pay_success/pay_success?type="+1+"&order_sn="+data.data, | |
471 | + url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, | |
473 | 472 | }) |
474 | 473 | },1000) |
475 | 474 | }, function () { |
... | ... | @@ -496,9 +495,12 @@ Page({ |
496 | 495 | th.setData({ isclose: 0 }); |
497 | 496 | |
498 | 497 | if(th.data.is_normal==1){ |
498 | + /*-- | |
499 | 499 | wx.navigateTo({ |
500 | 500 | url: "/pages/user/order_list/order_list", |
501 | - }) | |
501 | + })--*/ | |
502 | + var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; | |
503 | + getApp().goto(url); | |
502 | 504 | }else{ |
503 | 505 | wx.navigateTo({ |
504 | 506 | url: "/pages/team/team_success/team_success?ordersn=" + data.data, | ... | ... |
pages/goods/categoryList/categoryList.js
... | ... | @@ -428,7 +428,14 @@ Page({ |
428 | 428 | _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; |
429 | 429 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
430 | 430 | }, |
431 | - //商品图片失败,默认图片 | |
431 | + //图片失败,默认图片 | |
432 | + bind_bnerr_pp: function (e) { | |
433 | + var _errImg = e.target.dataset.errorimg; | |
434 | + var _errObj = {}; | |
435 | + _errObj[_errImg] = this.data.iurl+"/miniapp/images/no_brand_def.jpg\n"; | |
436 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
437 | + }, | |
438 | + //商品图片失败,默认图片 | |
432 | 439 | goods_bnerr: function (e) { |
433 | 440 | var _errImg = e.target.dataset.err; |
434 | 441 | var _errObj = {}; | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -186,7 +186,7 @@ |
186 | 186 | <view class="brand_img_frame "wx:for="{{brand_list.array}}"wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}" > |
187 | 187 | |
188 | 188 | <view class="brand_img t-c"> |
189 | - <image class=" brand_img" src="{{user.logo}}"data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr"></image> | |
189 | + <image class=" brand_img" src="{{user.logo}}"data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image> | |
190 | 190 | <view class="brand_img_name ellipsis-2 fs24">{{user.name}}</view> |
191 | 191 | </view> |
192 | 192 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -230,7 +230,8 @@ Page({ |
230 | 230 | default_store: {}, //创建添加默认门店地址的对象 |
231 | 231 | |
232 | 232 | comments_no_more:0, |
233 | - get_c:0, | |
233 | + get_c:0, //获取评价是不是成 | |
234 | + is_collect_load:0, //是不是处理 | |
234 | 235 | }, |
235 | 236 | |
236 | 237 | //------初始化加载---------- |
... | ... | @@ -986,9 +987,14 @@ Page({ |
986 | 987 | getApp().showWarning("未登录"); |
987 | 988 | return false; |
988 | 989 | } else { |
990 | + | |
991 | + if(t.data.is_collect_load) return false; | |
992 | + t.data.is_collect_load=1; | |
993 | + | |
989 | 994 | if (t.data.is_collect == 1) { //删除收藏 |
990 | 995 | i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { |
991 | 996 | success: function(e) { |
997 | + t.data.is_collect_load=0; | |
992 | 998 | if (e.data.code == 0) { |
993 | 999 | t.setData({ |
994 | 1000 | is_collect: 0, |
... | ... | @@ -1009,6 +1015,7 @@ Page({ |
1009 | 1015 | i.post("/api/weshop/goodscollect/save", { //添加收藏 |
1010 | 1016 | data: d, |
1011 | 1017 | success: function(e) { |
1018 | + t.data.is_collect_load=0; | |
1012 | 1019 | if (e.data.code == 0) { |
1013 | 1020 | t.setData({ |
1014 | 1021 | is_collect: 1, |
... | ... | @@ -2879,7 +2886,7 @@ Page({ |
2879 | 2886 | activeCategoryId3: val, |
2880 | 2887 | comments: null |
2881 | 2888 | }); |
2882 | - this.requestComments(); | |
2889 | + this.requestComments_new(); | |
2883 | 2890 | }, |
2884 | 2891 | |
2885 | 2892 | //--跳转到商品详情页面-- |
... | ... | @@ -3060,17 +3067,14 @@ Page({ |
3060 | 3067 | th.setData({ |
3061 | 3068 | openSpecModal: !0, |
3062 | 3069 | openSpecModal_ind: openindstore, |
3063 | - | |
3064 | - openSpecModal_pt:1 | |
3065 | 3070 | }); |
3066 | 3071 | } |
3067 | - | |
3068 | 3072 | else if (openindstore == 4) { //4就是拼团 |
3069 | 3073 | th.setData({ |
3070 | 3074 | openSpecModal_pt: 1, //打开拼团购买界面 |
3071 | - store: 0, //关闭门店 | |
3075 | + store: 0, //关闭门店 | |
3072 | 3076 | choice_sort_store: 0, //关闭门店2级 |
3073 | - sort_store: 0, //关闭门店2级 | |
3077 | + sort_store: 0, //关闭门店2级 | |
3074 | 3078 | }); |
3075 | 3079 | } |
3076 | 3080 | |
... | ... | @@ -3122,16 +3126,16 @@ Page({ |
3122 | 3126 | def_pickup_id |
3123 | 3127 | }, |
3124 | 3128 | success: function(res) { |
3125 | - | |
3126 | 3129 | if (res.data.code == 0) { |
3127 | 3130 | if (th.data.choice_sort_store == 0) th.setData({ |
3128 | 3131 | fir_pick_index: 0 |
3129 | 3132 | }); |
3130 | - s.showWarning("设置门店地址成功", null, 500, !1); | |
3133 | + //s.showWarning("设置门店地址成功", null, 500, !1); | |
3131 | 3134 | getApp().globalData.pk_store = item; |
3132 | 3135 | } else { |
3133 | 3136 | console.log("门店地址失败"); |
3134 | - s.showWarning("设置默认门店地址失败", null, 500, !1); | |
3137 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | |
3138 | + getApp().my_warnning("设置默认门店地址失败",0,th) | |
3135 | 3139 | } |
3136 | 3140 | |
3137 | 3141 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -783,14 +783,12 @@ |
783 | 783 | <view class="flex ai_end xc-val-money"> |
784 | 784 | <view class="spec-goods-price" wx:if="{{prom_price==null}}"><text class="fs20">¥</text>{{sele_g.shop_price}}</view> |
785 | 785 | <view class="spec-goods-price" wx:else><text class="fs20">¥</text>{{prom_price}}</view> |
786 | - | |
787 | 786 | </view> |
788 | 787 | |
789 | 788 | <block wx:if="{{prom_type==0}}"> |
790 | 789 | <view class="flex"> |
791 | 790 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> |
792 | 791 | <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> |
793 | - | |
794 | 792 | |
795 | 793 | </view> |
796 | 794 | </block> |
... | ... | @@ -891,26 +889,36 @@ |
891 | 889 | <view class="spec-model"> |
892 | 890 | <view class="pding"> |
893 | 891 | <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
892 | + | |
893 | + <!-- 商品名称 --> | |
894 | 894 | <view class="spec-goods"> |
895 | - <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
895 | + <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
896 | 896 | <view class="spec-goods-info"> |
897 | - <!-- <view class="spec-goods-name ellipsis-1">{{data.goods_name}}</view> --> | |
898 | - <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}}</view> | |
899 | - <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | |
897 | + <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | |
898 | + <view class="flex ai_end xc-val-money"> | |
899 | + <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}}</view> | |
900 | + <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | |
901 | + </view> | |
900 | 902 | |
901 | - <block wx:if="{{is_normal==0}}"> | |
902 | - <view class="spec-goods-stock">已售:{{prom_act.buy_num}}</view> | |
903 | - <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
904 | - <view class="spec-goods-stock">已选:{{sele_g.gg}}</view> | |
903 | + <block wx:if="{{is_normal==1}}"> | |
904 | + <view class="flex"> | |
905 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
906 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | |
907 | + </view> | |
905 | 908 | </block> |
906 | - <block wx:else> | |
907 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
908 | - <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | |
909 | - <view class="spec-goods-stock">已选:{{sku_g_pt[0].gg}}</view> | |
909 | + <block wx:if="{{is_normal==0}}"> | |
910 | + <view class="flex"> | |
911 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num}}</view> | |
912 | + <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | |
913 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
914 | + </view> | |
910 | 915 | </block> |
911 | 916 | </view> |
917 | + | |
912 | 918 | </view> |
913 | 919 | |
920 | + | |
921 | + | |
914 | 922 | <view style="clear: both"></view> |
915 | 923 | <view style="margin-top: 20rpx"> |
916 | 924 | <view class="flex-space-between address ai_end xc-width "> |
... | ... | @@ -956,8 +964,7 @@ |
956 | 964 | </view> |
957 | 965 | |
958 | 966 | |
959 | - <view> | |
960 | - | |
967 | + <view> | |
961 | 968 | <!--<view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}">--> |
962 | 969 | <!--<view wx:if="{{sto_sele_name==''}}">取货门店--> |
963 | 970 | <!--<text class='small'>(选择门店)</text>--> |
... | ... | @@ -1243,7 +1250,6 @@ |
1243 | 1250 | </view> |
1244 | 1251 | </block> |
1245 | 1252 | |
1246 | - | |
1247 | 1253 | <!-- ---------------分享弹窗--------------- --> |
1248 | 1254 | <!--二维码显示页面--> |
1249 | 1255 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{!canvasHidden}}'></canvas> | ... | ... |
pages/payment/pay_success/pay_success.js
... | ... | @@ -37,11 +37,11 @@ Page({ |
37 | 37 | await getApp().request.promiseGet("/api/weshop/order/page", |
38 | 38 | {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{ |
39 | 39 | |
40 | - var allmoney=0; | |
40 | + var allmoney=0,user_money=0; | |
41 | 41 | for(var i in res.data.data.pageData){ |
42 | 42 | var item=res.data.data.pageData[i]; |
43 | 43 | allmoney+=item.order_amount; |
44 | - user_money += item.user_money; | |
44 | + user_money += item.user_money?item.user_money:0; | |
45 | 45 | } |
46 | 46 | order=res.data.data.pageData[0]; |
47 | 47 | th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money}) | ... | ... |
pages/payment/pay_success/pay_success.wxml
... | ... | @@ -25,19 +25,28 @@ |
25 | 25 | <view class="payitem flex"> |
26 | 26 | <view>实付金额 :</view> |
27 | 27 | <!-- {{filters.toFix()}} --> |
28 | - <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money)}}元</view> | |
29 | - <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view> | |
28 | + <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view> | |
29 | + <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view> | |
30 | 30 | </view> |
31 | 31 | |
32 | 32 | <!-- 支付方式 --> |
33 | - <view class="payitem flex"> | |
34 | - <view>支付方式 :</view> | |
33 | + <view class="payitem flex" wx:if="type==1"> | |
34 | + <view>支付方式 :</view> | |
35 | + <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view> | |
36 | + <view wx:elif="{{order.order_amount>0}}">微信支付</view> | |
37 | + <view wx:elif="{{order.user_money>0}}">余额支付</view> | |
38 | + <view wx:else>免单</view> | |
39 | + </view> | |
40 | + <view class="payitem flex" wx:else> | |
41 | + <view>支付方式 :</view> | |
35 | 42 | <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view> |
36 | - <view wx:elif="{{allmoney>0}}">微信支付,余额支付</view> | |
37 | - <view wx:elif="{{user_money>0}}">微信支付,余额支付</view> | |
43 | + <view wx:elif="{{allmoney>0}}">微信支付</view> | |
44 | + <view wx:elif="{{user_money>0}}">余额支付</view> | |
38 | 45 | <view wx:else>免单</view> |
39 | 46 | </view> |
40 | 47 | |
48 | + | |
49 | + | |
41 | 50 | </view> |
42 | 51 | </view> |
43 | 52 | <view class="flex-level"> | ... | ... |