Commit 8b6d72ec0bcf35cc5176fac7d5eb4e24c35f06bd
1 parent
f6f10167
支付成功页面
Showing
4 changed files
with
234 additions
and
0 deletions
pages/payment/pay_success/pay_success.js
0 → 100644
| 1 | +var e = getApp(); | |
| 2 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | |
| 3 | +Page({ | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + url: e.globalData.setting.imghost, | |
| 9 | + resourceUrl: e.globalData.setting.resourceUrl, | |
| 10 | + iurl: e.globalData.setting.imghost, | |
| 11 | + order:null, | |
| 12 | + type:1, | |
| 13 | + allmoney:0, | |
| 14 | + order_sn:"", | |
| 15 | + pick:null, | |
| 16 | + }, | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 生命周期函数--监听页面加载 | |
| 20 | + */ | |
| 21 | + onLoad:async function(options) { | |
| 22 | + wx.setNavigationBarTitle({ | |
| 23 | + title: '支付成功', | |
| 24 | + }); | |
| 25 | + | |
| 26 | + var type=options.type,order_sn=options.order_sn; | |
| 27 | + var th=this,order=null; | |
| 28 | + //如果是等1,就是单个订单的订单号 | |
| 29 | + if(type==1){ | |
| 30 | + await getApp().request.promiseGet("/api/weshop/order/page", | |
| 31 | + {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{ | |
| 32 | + order=res.data.data.pageData[0]; | |
| 33 | + th.setData({order:order,order_sn:order_sn}) | |
| 34 | + }) | |
| 35 | + }else{ | |
| 36 | + await getApp().request.promiseGet("/api/weshop/order/page", | |
| 37 | + {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{ | |
| 38 | + | |
| 39 | + var allmoney=0; | |
| 40 | + for(var i in res.data.data.pageData){ | |
| 41 | + var item=res.data.data.pageData[i]; | |
| 42 | + allmoney+=item.order_amount; | |
| 43 | + } | |
| 44 | + order=res.data.data.pageData[0]; | |
| 45 | + th.setData({order:order,type:2,allmoney:allmoney,order_sn:order_sn}) | |
| 46 | + }) | |
| 47 | + } | |
| 48 | + //--获取门店-- | |
| 49 | + if(order.exp_type==1) { | |
| 50 | + await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id, | |
| 51 | + {1:1}).then(res => { | |
| 52 | + th.setData({pick:res.data.data}) | |
| 53 | + }); | |
| 54 | + } | |
| 55 | + }, | |
| 56 | + | |
| 57 | + goto: function() { | |
| 58 | + var url= '/pages/index/index/index'; | |
| 59 | + getApp().goto(url) | |
| 60 | + }, | |
| 61 | +}) | |
| 0 | 62 | \ No newline at end of file | ... | ... |
pages/payment/pay_success/pay_success.json
0 → 100644
pages/payment/pay_success/pay_success.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
| 2 | +<view> | |
| 3 | + <!-- 支付成功提示 --> | |
| 4 | + <view class="payradio"> | |
| 5 | + | |
| 6 | + <!-- 提示框 --> | |
| 7 | + <view class="Success_box flex-center"> | |
| 8 | + <view> | |
| 9 | + <view class="flex-center"> | |
| 10 | + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image> | |
| 11 | + </view> | |
| 12 | + <view class="Success_box_title fs32">订单支付成功!</view> | |
| 13 | + </view> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <!-- 支付信息 --> | |
| 17 | + <view class="payitem_max fs28"> | |
| 18 | + <!-- 订单编号 --> | |
| 19 | + <view class="payitem flex"> | |
| 20 | + <view>订单编号 :</view> | |
| 21 | + <text selectable="true">{{order_sn}}</text> | |
| 22 | + </view> | |
| 23 | + | |
| 24 | + <!-- 实付金额 --> | |
| 25 | + <view class="payitem flex"> | |
| 26 | + <view>实付金额 :</view> | |
| 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>{{allmoney}}元</view> | |
| 30 | + </view> | |
| 31 | + | |
| 32 | + <!-- 支付方式 --> | |
| 33 | + <view class="payitem flex"> | |
| 34 | + <view>支付方式 :</view> | |
| 35 | + <view>微信支付</view> | |
| 36 | + </view> | |
| 37 | + | |
| 38 | + </view> | |
| 39 | + </view> | |
| 40 | + <view class="flex-level"> | |
| 41 | + <view class="line"></view> | |
| 42 | + </view> | |
| 43 | + | |
| 44 | + <!-- 跳转链接 --> | |
| 45 | + <view> | |
| 46 | + <!-- 个人收货信息 --> | |
| 47 | + <view class="pay_User fs28" wx:if="{{order.exp_type==0}}"> | |
| 48 | + <view class="payitem flex"> | |
| 49 | + <view class="pay_Receiving">收货人 :</view> | |
| 50 | + <view class="pay_name ellipsis-1">{{order.consignee}}</view> | |
| 51 | + <view>{{order.mobile}}</view> | |
| 52 | + </view> | |
| 53 | + <view class="payitem flex"> | |
| 54 | + <view class="pay_Receiving">收货地址 :</view> | |
| 55 | + <view class="address ellipsis-2">{{order.more_address}}</view> | |
| 56 | + </view> | |
| 57 | + </view> | |
| 58 | + | |
| 59 | + <!-- 收货门店信息 --> | |
| 60 | + <view class="pay_User fs28" wx:else> | |
| 61 | + <view class="payitem flex"> | |
| 62 | + <view class="pay_Receiving">门店 :</view> | |
| 63 | + <view class="pay_name ellipsis-1">{{pick.pickup_name}}</view> | |
| 64 | + </view> | |
| 65 | + <view class="payitem flex"> | |
| 66 | + <view class="pay_Receiving">门店地址 :</view> | |
| 67 | + <view class="address ellipsis-2">{{pick.pickup_address}}</view> | |
| 68 | + </view> | |
| 69 | + </view> | |
| 70 | + | |
| 71 | + <!-- 链接 --> | |
| 72 | + <view class="fs32"> | |
| 73 | + <view class="flex-center"> | |
| 74 | + <navigator class="pay_order flex-center" url="/pages/user/order_list/order_list"> | |
| 75 | + <view>查看订单</view> | |
| 76 | + </navigator> | |
| 77 | + </view> | |
| 78 | + <view class="flex-center"> | |
| 79 | + <navigator class="pay_home flex-center" bindtap="goto"> | |
| 80 | + <view>回到首页</view> | |
| 81 | + </navigator> | |
| 82 | + </view> | |
| 83 | + </view> | |
| 84 | + </view> | |
| 85 | +</view> | |
| 0 | 86 | \ No newline at end of file | ... | ... |
pages/payment/pay_success/pay_success.wxss
0 → 100644
| 1 | +page { | |
| 2 | + border-top: 2rpx solid rgb(245, 245, 245); | |
| 3 | +} | |
| 4 | +.line { | |
| 5 | + border-top: 2rpx solid rgb(245, 245, 245); | |
| 6 | + width: 700rpx; | |
| 7 | +} | |
| 8 | + | |
| 9 | +.payradio .Success_box { | |
| 10 | + padding-top: 45rpx; | |
| 11 | + padding-bottom: 45rpx; | |
| 12 | +} | |
| 13 | + | |
| 14 | +.payradio .Success_box .Success_box_title { | |
| 15 | + margin-top: 45rpx; | |
| 16 | + color: rgb(8, 8, 8); | |
| 17 | +} | |
| 18 | + | |
| 19 | +.payradio image { | |
| 20 | + width: 140rpx; | |
| 21 | + height: 140rpx; | |
| 22 | + display: flex; | |
| 23 | +} | |
| 24 | + | |
| 25 | +.payitem_max { | |
| 26 | + padding: 0rpx 55rpx; | |
| 27 | + color: rgb(104, 104, 104); | |
| 28 | + padding-bottom: 30rpx; | |
| 29 | +} | |
| 30 | + | |
| 31 | +.payitem_max .payitem { | |
| 32 | + margin-top: 30rpx; | |
| 33 | +} | |
| 34 | + | |
| 35 | +.payitem_max .payitem .pay_nam { | |
| 36 | + width: 200rpx; | |
| 37 | +} | |
| 38 | + | |
| 39 | +.payitem_max .payitem view { | |
| 40 | + margin-right: 50rpx; | |
| 41 | +} | |
| 42 | +.pay_money{ | |
| 43 | + color: rgb(219, 27, 52); | |
| 44 | +} | |
| 45 | + | |
| 46 | +.pay_User { | |
| 47 | + padding-left: 55rpx; | |
| 48 | + color: rgb(104, 104, 104); | |
| 49 | +} | |
| 50 | + | |
| 51 | +.pay_User .payitem { | |
| 52 | + margin-top: 30rpx; | |
| 53 | +} | |
| 54 | + | |
| 55 | +.pay_User .payitem .pay_Receiving { | |
| 56 | + width: 128rpx; | |
| 57 | + margin-right: 50rpx; | |
| 58 | +} | |
| 59 | + | |
| 60 | +.pay_User .payitem .pay_name { | |
| 61 | + margin-right: 38rpx; | |
| 62 | + max-width: 250rpx; | |
| 63 | +} | |
| 64 | + | |
| 65 | +.pay_order { | |
| 66 | + margin-top: 115rpx; | |
| 67 | + color: rgb(104, 104, 104); | |
| 68 | + width: 560rpx; | |
| 69 | + height: 62rpx; | |
| 70 | + border-radius: 30rpx; | |
| 71 | + border: 3rpx solid rgb(209, 209, 209); | |
| 72 | +} | |
| 73 | + | |
| 74 | +.pay_home { | |
| 75 | + margin-top: 35rpx; | |
| 76 | + color: rgb(255, 255, 255); | |
| 77 | + width: 566rpx; | |
| 78 | + height: 68rpx; | |
| 79 | + border-radius: 30rpx; | |
| 80 | + background-color: rgb(219, 27, 52); | |
| 81 | +} | |
| 82 | +.address{ | |
| 83 | + width: 470rpx; | |
| 84 | +} | |
| 0 | 85 | \ No newline at end of file | ... | ... |