Commit 3d8d75b7 by 高淑倩

支付金额

parent 431659ee
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
data-type="{{coupon.type}}" data-type="{{coupon.type}}"
data-amount="{{coupon.faceAmount}}" data-amount="{{coupon.faceAmount}}"
bindtap="selectCoupon" bindtap="selectCoupon"
>{{coupon.type}} -- {{coupon.faceAmount}} >
<image <image
wx:if="{{false}}" wx:if="{{false}}"
class="coupon-bg" class="coupon-bg"
......
...@@ -284,11 +284,13 @@ wxService.page({ ...@@ -284,11 +284,13 @@ wxService.page({
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
delete data.appId delete data.appId
console.log('dddd', data.amount)
let amount = data.amount || 0
wx.requestPayment(Object.assign({ wx.requestPayment(Object.assign({
success(res) { success(res) {
wx.hideLoading() wx.hideLoading()
// 支付成功页面 // 支付成功页面
wxService.router('/subPackage/page/pages/paymentStatus/paymentStatus') wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?amount=${amount}`)
}, },
fail(res) { fail(res) {
wx.hideLoading() wx.hideLoading()
......
...@@ -151,9 +151,6 @@ ...@@ -151,9 +151,6 @@
<text class="cost-label">实付款:</text> <text class="cost-label">实付款:</text>
<text class="cost-price">¥{{utils.numberFormat(orderPrice)}}</text> <text class="cost-price">¥{{utils.numberFormat(orderPrice)}}</text>
</view> </view>
<!-- <button form-type="submit" class="theme-color buy-btn">立即购买</button>-->
<!-- <view class="theme-color buy-btn" bindtap="handelGobuy">立即购买</view> -->
<view class="theme-color buy-btn"> <view class="theme-color buy-btn">
<button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button> <button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button>
</view> </view>
......
...@@ -11,7 +11,7 @@ wxService.page({ ...@@ -11,7 +11,7 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
amount: 0
}, },
/** /**
...@@ -32,7 +32,10 @@ wxService.page({ ...@@ -32,7 +32,10 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
const { amount } = this.options
this.setData({
amount
})
}, },
/** /**
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
bindload="" bindload=""
/> />
<view class="status-success">支付成功</view> <view class="status-success">支付成功</view>
<view class="status-price">¥ 306.90</view> <view class="status-price">¥ {{amount}}</view>
<view class="status-time">交易时间: 2019-03-24 至 2019-06-23</view> <view class="status-time">交易时间: 2019-03-24 至 2019-06-23</view>
<view class="status-btn weui-flex"> <view class="status-btn weui-flex">
<view class="btn-detail">查看详情</view> <view class="btn-detail">查看详情</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment