|
@@ -48,19 +48,21 @@ const wechatPay = {
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
// 微信支付请求 返回支付信息
|
|
// 微信支付请求 返回支付信息
|
|
const response = await this.PayService.WeChatMiniWxPay({
|
|
const response = await this.PayService.WeChatMiniWxPay({
|
|
- payAmount: data.payableAmount * 100,
|
|
|
|
|
|
+ payAmount: data.payableAmount,
|
|
payWay: 'WEIXIN',
|
|
payWay: 'WEIXIN',
|
|
|
|
+ payType: 'XCX',
|
|
code: wechatCode,
|
|
code: wechatCode,
|
|
- orderId: data.orderId
|
|
|
|
|
|
+ orderId: data.orderId,
|
|
|
|
+ shopOrderId: data.shopOrderId
|
|
})
|
|
})
|
|
// 处理支付信息 调用微信支付
|
|
// 处理支付信息 调用微信支付
|
|
- const payment = JSON.parse(response.data.data.payInfo)
|
|
|
|
|
|
+ const payment = JSON.parse(response.data.rt10_payInfo)
|
|
const payFlag = await wxRequestPayment(payment)
|
|
const payFlag = await wxRequestPayment(payment)
|
|
// debugger
|
|
// debugger
|
|
// console.log(this.hanldOrder)
|
|
// console.log(this.hanldOrder)
|
|
// 支付成功重定向
|
|
// 支付成功重定向
|
|
uni.setStorageSync('orderInfo', this.hanldOrder.order)
|
|
uni.setStorageSync('orderInfo', this.hanldOrder.order)
|
|
-
|
|
|
|
|
|
+
|
|
if (payFlag) {
|
|
if (payFlag) {
|
|
// 微信支付成功回调 在页面onload中通过this.$on监听orderPaySuccess事件回调
|
|
// 微信支付成功回调 在页面onload中通过this.$on监听orderPaySuccess事件回调
|
|
this.$emit('orderPaySuccess', this.hanldOrder.order)
|
|
this.$emit('orderPaySuccess', this.hanldOrder.order)
|