|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-03-20 14:14:53
|
|
|
|
* @Date: 2022-03-20 14:14:53
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-07-13 14:08:54
|
|
|
|
* @LastEditTime: 2022-07-13 18:18:18
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -62,6 +62,7 @@ import {Wxpay, Alipay} from '@/common/utils';
|
|
|
|
import UiButton from '@/components/UiButton.vue';
|
|
|
|
import UiButton from '@/components/UiButton.vue';
|
|
|
|
import UiWhiteBox from '../../components/UiWhiteBox.vue';
|
|
|
|
import UiWhiteBox from '../../components/UiWhiteBox.vue';
|
|
|
|
import UiGoodsInfo from '../../components/UiGoodsInfo.vue';
|
|
|
|
import UiGoodsInfo from '../../components/UiGoodsInfo.vue';
|
|
|
|
|
|
|
|
const ENV = process.env;
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
|
|
|
|
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
|
|
|
|
data(){
|
|
|
|
data(){
|
|
|
@ -174,7 +175,14 @@ export default {
|
|
|
|
uni.$u.toast(error.message);
|
|
|
|
uni.$u.toast(error.message);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const {error:er, result:res} = await ApiPostCashierPrepay({orderId:result.orderId});
|
|
|
|
let payType = 'wxjsapi'
|
|
|
|
|
|
|
|
if(!this.$store.state.openId){
|
|
|
|
|
|
|
|
payType = 'h5'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const {error:er, result:res} = await ApiPostCashierPrepay({
|
|
|
|
|
|
|
|
orderId:result.orderId,
|
|
|
|
|
|
|
|
returnUrl : `${ENV.VUE_APP_STATIC_URL}/payResult?orderId=${result.orderId}&payType=${payType}`
|
|
|
|
|
|
|
|
});
|
|
|
|
if(er){
|
|
|
|
if(er){
|
|
|
|
uni.$u.toast(er.message);
|
|
|
|
uni.$u.toast(er.message);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|