|
@ -44,11 +44,15 @@ |
|
|
|
|
|
|
|
|
<!-- 支付确认弹窗 --> |
|
|
<!-- 支付确认弹窗 --> |
|
|
<!-- #ifdef H5 --> |
|
|
<!-- #ifdef H5 --> |
|
|
<u-modal v-if="tempUnifyData" v-model="showConfirmModal" title="支付确认" show-cancel-button confirm-text="已完成支付" |
|
|
|
|
|
|
|
|
<u-modal v-if="tempUnifyData" v-model="showConfirmModal" title="支付确认" show-cancel-button |
|
|
|
|
|
confirm-text="已完成支付" |
|
|
:confirm-color="appTheme.mainBg" negative-top="100" :asyncClose="true" |
|
|
:confirm-color="appTheme.mainBg" negative-top="100" :asyncClose="true" |
|
|
@confirm="onTradeQuery(tempUnifyData.outTradeNo, tempUnifyData.method)"> |
|
|
@confirm="onTradeQuery(tempUnifyData.outTradeNo, tempUnifyData.method)"> |
|
|
<view class="modal-content"> |
|
|
<view class="modal-content"> |
|
|
<text>请在{{ PayMethodClientNameEnum[tempUnifyData.method] }}内完成支付,如果您已经支付成功,请点击“已完成支付”按钮</text> |
|
|
|
|
|
|
|
|
<text>请在{{ |
|
|
|
|
|
PayMethodClientNameEnum[tempUnifyData.method] |
|
|
|
|
|
}}内完成支付,如果您已经支付成功,请点击“已完成支付”按钮 |
|
|
|
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
</u-modal> |
|
|
</u-modal> |
|
|
<!-- #endif --> |
|
|
<!-- #endif --> |
|
@ -74,6 +78,7 @@ |
|
|
PayStatusEnum |
|
|
PayStatusEnum |
|
|
} from '@/common/enum/order' |
|
|
} from '@/common/enum/order' |
|
|
import * as CashierApi from '@/api/cashier' |
|
|
import * as CashierApi from '@/api/cashier' |
|
|
|
|
|
import {paymentAsH5} from "../../../core/payment/alipay"; |
|
|
|
|
|
|
|
|
// 支付方式对应的图标 |
|
|
// 支付方式对应的图标 |
|
|
const PayMethodIconEnum = { |
|
|
const PayMethodIconEnum = { |
|
@ -228,7 +233,8 @@ |
|
|
CashierApi.orderPay(app.orderId, { |
|
|
CashierApi.orderPay(app.orderId, { |
|
|
method: app.curPaymentItem.method, |
|
|
method: app.curPaymentItem.method, |
|
|
client: app.platform, |
|
|
client: app.platform, |
|
|
extra: app.getExtraAsUnify(app.curPaymentItem.method) |
|
|
|
|
|
|
|
|
extra: app.getExtraAsUnify(app.curPaymentItem.method), |
|
|
|
|
|
token: uni.getStorageSync('t_token') |
|
|
}) |
|
|
}) |
|
|
.then(result => app.onSubmitCallback(result)) |
|
|
.then(result => app.onSubmitCallback(result)) |
|
|
.finally(err => { |
|
|
.finally(err => { |
|
@ -259,7 +265,10 @@ |
|
|
// 发起支付宝支付 |
|
|
// 发起支付宝支付 |
|
|
if (method === PayMethodEnum.ALIPAY.value) { |
|
|
if (method === PayMethodEnum.ALIPAY.value) { |
|
|
console.log('paymentData', JSON.stringify(paymentData)) |
|
|
console.log('paymentData', JSON.stringify(paymentData)) |
|
|
Alipay.payment(paymentData) |
|
|
|
|
|
|
|
|
// Alipay.payment(paymentData) |
|
|
|
|
|
// .then(res => app.onPaySuccess(res)) |
|
|
|
|
|
// .catch(err => app.onPayFail(err)) |
|
|
|
|
|
Alipay.paymentAsH5({formHtml: result.data.data}) |
|
|
.then(res => app.onPaySuccess(res)) |
|
|
.then(res => app.onPaySuccess(res)) |
|
|
.catch(err => app.onPayFail(err)) |
|
|
.catch(err => app.onPayFail(err)) |
|
|
} |
|
|
} |
|
@ -276,7 +285,6 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
console.log(res, 'res') |
|
|
console.log(res, 'res') |
|
|
app.$toast('非微信环境逻辑') |
|
|
app.$toast('非微信环境逻辑') |
|
@ -311,11 +319,6 @@ |
|
|
}, 500) |
|
|
}, 500) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Wechat.payment({ orderKey: app.orderId, ...paymentData }) |
|
|
// Wechat.payment({ orderKey: app.orderId, ...paymentData }) |
|
|
// .then(res => app.onPaySuccess(res)) |
|
|
// .then(res => app.onPaySuccess(res)) |
|
|
// .catch(err => app.onPayFail(err)) |
|
|
// .catch(err => app.onPayFail(err)) |
|
|