|
|
@ -21,10 +21,10 @@ |
|
|
|
|
|
|
|
<view v-if="form.money" class="tip"> |
|
|
|
折后共计{{ |
|
|
|
form.money * |
|
|
|
(form.money * |
|
|
|
(configList.preferential ? |
|
|
|
configList.preferential.keyCentent |
|
|
|
: 1) |
|
|
|
: 1)).toFixed(2) |
|
|
|
}}元 |
|
|
|
</view> |
|
|
|
<view class="select-money"> |
|
|
@ -87,6 +87,16 @@ |
|
|
|
this.$refs.showPrivacy.init(resolve) |
|
|
|
}) |
|
|
|
} |
|
|
|
// wx.getPrivacySetting({ |
|
|
|
// success: res => { |
|
|
|
// console.log(res) |
|
|
|
// if (res.needAuthorization) { |
|
|
|
// // 需要弹出隐私协议 |
|
|
|
// this.$refs.showPrivacy.init() |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// fail: () => {} |
|
|
|
// }) |
|
|
|
this.getRechargePage() |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -118,33 +128,34 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
this.$api('createOrderPay', this.form, res => { |
|
|
|
this.form.money = '' |
|
|
|
if(res.code == 200){ |
|
|
|
// uni.requestPayment({ |
|
|
|
// provider: 'wxpay', // 服务提提供商 |
|
|
|
// timeStamp: res.weChatPayData.timestamp, // 时间戳 |
|
|
|
// nonceStr: res.weChatPayData.noncestr, // 随机字符串 |
|
|
|
// package: res.weChatPayData.package, |
|
|
|
// signType: res.weChatPayData.signtype, // 签名算法 |
|
|
|
// paySign: res.weChatPayData.sign, // 签名 |
|
|
|
// success: function (res) { |
|
|
|
// console.log('支付成功',res); |
|
|
|
// uni.redirectTo({ |
|
|
|
// url: '/pages/center/center' |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// fail: function (err) { |
|
|
|
// console.log('支付失败',err); |
|
|
|
// uni.showToast({ |
|
|
|
// icon:'none', |
|
|
|
// title:"支付失败" |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
icon : 'none', |
|
|
|
title: '支付成功' |
|
|
|
uni.requestPayment({ |
|
|
|
provider: 'wxpay', // 服务提提供商 |
|
|
|
timeStamp: res.result.timeStamp, // 时间戳 |
|
|
|
nonceStr: res.result.nonceStr, // 随机字符串 |
|
|
|
package: res.result.packageValue, |
|
|
|
signType: res.result.signType, // 签名算法 |
|
|
|
paySign: res.result.paySign, // 签名 |
|
|
|
success: function (res) { |
|
|
|
console.log('支付成功',res); |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/center/center' |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: function (err) { |
|
|
|
console.log('支付失败',err); |
|
|
|
uni.showToast({ |
|
|
|
icon:'none', |
|
|
|
title:"支付失败" |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// uni.showToast({ |
|
|
|
// icon : 'none', |
|
|
|
// title: '支付成功' |
|
|
|
// }); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|