Commit 7a87c3db3544d7a97ebd645525ea04136fcd7136
1 parent
bfe84779
支付成功的页面跳转,分类的修改
Showing
5 changed files
with
28 additions
and
27 deletions
pages/cart/cart2/cart2.js
... | ... | @@ -601,8 +601,7 @@ Page({ |
601 | 601 | th.data.cartlist[i].shipping_price=0; |
602 | 602 | } |
603 | 603 | |
604 | - th.data.cartlist[i].shipping_price.toFixed(2); | |
605 | - | |
604 | + th.data.cartlist[i].shipping_price=th.data.cartlist[i].shipping_price.toFixed(2); | |
606 | 605 | //---如果有选择优惠券的情况下--- |
607 | 606 | var quan_price=0; |
608 | 607 | var coupon_price=0,bn_pick=th.data.bn_pick,pickid=cart_item.pickup_id; |
... | ... | @@ -653,6 +652,9 @@ Page({ |
653 | 652 | umoney=0; |
654 | 653 | } |
655 | 654 | } |
655 | + else{ | |
656 | + th.data.cartlist[i].user_money=0; | |
657 | + } | |
656 | 658 | |
657 | 659 | th.data.cartlist[i].user_money = parseFloat(th.data.cartlist[i].user_money).toFixed(2); |
658 | 660 | |
... | ... | @@ -662,14 +664,12 @@ Page({ |
662 | 664 | th.data.cartlist[i].goods_price = o_price.toFixed(2); |
663 | 665 | th.data.cartlist[i].order_amount= th.data.cartlist[i].order_amount- th.data.cartlist[i].user_money; //会员使用余额 |
664 | 666 | |
665 | - all_price += o_price; | |
666 | - all_total_m += th.data.cartlist[i].total_amount; | |
667 | - all_shipping_m += th.data.cartlist[i].shipping_price; | |
668 | - all_order_m += th.data.cartlist[i].order_amount; | |
669 | - all_user_m += th.data.cartlist[i].user_money; | |
670 | - all_coupon_price_m=parseFloat(all_coupon_price_m)+parseFloat(th.data.cartlist[i].coupon_price); | |
671 | - | |
672 | - | |
667 | + all_price += parseFloat(o_price); | |
668 | + all_total_m += parseFloat(th.data.cartlist[i].total_amount); | |
669 | + all_shipping_m += parseFloat(th.data.cartlist[i].shipping_price); | |
670 | + all_order_m += parseFloat(th.data.cartlist[i].order_amount); | |
671 | + all_user_m += parseFloat(th.data.cartlist[i].user_money); | |
672 | + all_coupon_price_m+= parseFloat(th.data.cartlist[i].coupon_price); | |
673 | 673 | } |
674 | 674 | |
675 | 675 | all_shipping_m=parseFloat(all_shipping_m).toFixed(2); |
... | ... | @@ -1013,12 +1013,12 @@ Page({ |
1013 | 1013 | // order_sn: data.data, |
1014 | 1014 | //}, 1); |
1015 | 1015 | util_pay.pay(data.data, function() { |
1016 | - app.my_warnning("支付成功",1,th); | |
1017 | - setTimeout(function () { | |
1016 | + //app.my_warnning("支付成功",1,th); | |
1017 | + //setTimeout(function () { | |
1018 | 1018 | wx.navigateTo({ |
1019 | - url: "/pages/user/order_list/order_list" | |
1019 | + url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data | |
1020 | 1020 | }) |
1021 | - },1000) | |
1021 | + //},1000) | |
1022 | 1022 | |
1023 | 1023 | }, function () { |
1024 | 1024 | //支付失败 |
... | ... | @@ -1038,13 +1038,13 @@ Page({ |
1038 | 1038 | success: function (t) { |
1039 | 1039 | //console.log(t); |
1040 | 1040 | if(t.data.code==0){ |
1041 | - app.my_warnning("支付成功",1,th); | |
1042 | - setTimeout(function () { | |
1041 | + //app.my_warnning("支付成功",1,th); | |
1042 | + //setTimeout(function () { | |
1043 | 1043 | th.setData({ isclose: 0 }); |
1044 | 1044 | wx.navigateTo({ |
1045 | - url: "/pages/user/order_list/order_list" | |
1045 | + url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data, | |
1046 | 1046 | }) |
1047 | - }, 1000) | |
1047 | + //}, 1000) | |
1048 | 1048 | } |
1049 | 1049 | }, |
1050 | 1050 | fail:function () { | ... | ... |
pages/cart/cart_wk/cart_wk.js
... | ... | @@ -541,7 +541,7 @@ Page({ |
541 | 541 | //------支付成功页面-------- |
542 | 542 | jumpPaymentPage: function(order_sn,order_amount) { |
543 | 543 | wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ |
544 | - url: "/pages/payment/payment/payment?order_sn=" + order_sn + "&order_amount=" + order_amount | |
544 | + url: "/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1", | |
545 | 545 | }); |
546 | 546 | }, |
547 | 547 | ... | ... |
pages/goods/categoryList/categoryList.js
... | ... | @@ -293,10 +293,11 @@ Page({ |
293 | 293 | |
294 | 294 | //跳转到分类的商品列表 |
295 | 295 | go_cate:function(t){ |
296 | - var cid= t.currentTarget.dataset.cid; | |
297 | - var pid = t.currentTarget.dataset.pid; | |
298 | - console.log("是这个吗", pid); | |
299 | - var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid +"&pid="+pid; | |
296 | + var cid= t.currentTarget.dataset.cid; | |
297 | + var pid = t.currentTarget.dataset.pid; | |
298 | + var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; | |
299 | + if(pid!=undefined) lurl+="&pid="+pid; | |
300 | + | |
300 | 301 | wx.navigateTo({ url: lurl}); |
301 | 302 | }, |
302 | 303 | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -217,7 +217,7 @@ |
217 | 217 | <view class="classify_content-frame flex-wrap"> |
218 | 218 | <block wx:for="{{goodslist}}"wx:for-item="goods"wx:for-index="indx"> |
219 | 219 | |
220 | - <view class="brand_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="1" bindtap="go_cate"> | |
220 | + <view class="brand_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate"> | |
221 | 221 | <image class="brand_img"src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> |
222 | 222 | <view class="brand_img_name fs24">{{goods.items.name}}</view> |
223 | 223 | </view> |
... | ... | @@ -233,7 +233,7 @@ |
233 | 233 | <view> |
234 | 234 | |
235 | 235 | |
236 | -<view class="classify_name fs32 flex-space-between"data-pid="1"data-cid="{{goods.items.id}}" bindtap='select_more'> | |
236 | +<view class="classify_name fs32 flex-space-between"data-pid="goods.items.parent_id" data-cid="{{goods.items.id}}" bindtap='select_more'> | |
237 | 237 | <view>{{goods.items.name}}</view> |
238 | 238 | <view class="flex select_more" > |
239 | 239 | <view class="red-co fs24" >更多</view> |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | |
245 | 245 | <block wx:if="{{goods.arrays.length>0}}"> |
246 | 246 | <view class="classify_content-frame flex-wrap"> |
247 | - <view class="brand_img_frame t-c ib" data-cid="{{item.id}}" data-pid="2"wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | |
247 | + <view class="brand_img_frame t-c ib" data-cid="{{item.id}}" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | |
248 | 248 | <image class="brand_img"src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> |
249 | 249 | <view class="brand_img_name fs24">{{item.name}}</view> |
250 | 250 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js