|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-04-15 17:46:10
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-07-13 17:18:01
|
|
|
|
|
* @LastEditTime: 2022-07-13 18:20:38
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -59,6 +59,7 @@ import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order';
|
|
|
|
|
import {ApiPostCashierPrepay} from '@/common/api/pay';
|
|
|
|
|
import BsPay from '../../../../components/BsPay.vue';
|
|
|
|
|
import ORDER from '@/common/dicts/order';
|
|
|
|
|
const ENV = process.env;
|
|
|
|
|
export default {
|
|
|
|
|
components: { UiButton, UiCell, BsPay },
|
|
|
|
|
props : {
|
|
|
|
@ -130,7 +131,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
async handlePay(){
|
|
|
|
|
|
|
|
|
|
const {error, result} = await ApiPostCashierPrepay({orderId:this.orderInfo.orderId});
|
|
|
|
|
let payType = 'wxjsapi'
|
|
|
|
|
if(!this.$store.state.openId){
|
|
|
|
|
payType = 'h5'
|
|
|
|
|
}
|
|
|
|
|
const {error, result} = await ApiPostCashierPrepay({
|
|
|
|
|
orderId:this.orderInfo.orderId,
|
|
|
|
|
returnUrl : `${ENV.VUE_APP_STATIC_URL}/payResult?orderId=${this.orderInfo.orderId}&payType=${payType}`
|
|
|
|
|
});
|
|
|
|
|
if(error){
|
|
|
|
|
uni.$u.toast(error.message);
|
|
|
|
|
return false;
|
|
|
|
|