|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-08 00:39:50
|
|
|
|
* @Date: 2022-05-08 00:39:50
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-29 15:34:08
|
|
|
|
* @LastEditTime: 2022-06-29 16:51:50
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -13,8 +13,8 @@
|
|
|
|
<el-radio label="wx" class="pay-type--item" >
|
|
|
|
<el-radio label="wx" class="pay-type--item" >
|
|
|
|
<img class="pay-type--wx" src="@/assets/img/order/wx.png"/>
|
|
|
|
<img class="pay-type--wx" src="@/assets/img/order/wx.png"/>
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
<el-radio label="zfb" class="pay-type--item" >
|
|
|
|
<el-radio label="ali" class="pay-type--item" >
|
|
|
|
<img class="pay-type--zfb" src="@/assets/img/order/zfb.png"/>
|
|
|
|
<img class="pay-type--ali" src="@/assets/img/order/zfb.png"/>
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -31,7 +31,7 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {ApiPostWxPayCdoeImg, ApiPostZfbPayCdoeImg} from '@/plugins/api/pay'
|
|
|
|
import {ApiPostWxPayCdoeImg, ApiPostAliPayCdoeImg} from '@/plugins/api/pay'
|
|
|
|
import {ApiGetOrderDetail} from '@/plugins/api/order'
|
|
|
|
import {ApiGetOrderDetail} from '@/plugins/api/order'
|
|
|
|
import UiMoney from './UiMoney.vue';
|
|
|
|
import UiMoney from './UiMoney.vue';
|
|
|
|
import UiButton from './UiButton.vue';
|
|
|
|
import UiButton from './UiButton.vue';
|
|
|
@ -63,6 +63,14 @@ export default {
|
|
|
|
myPayType : null
|
|
|
|
myPayType : null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
watch:{
|
|
|
|
|
|
|
|
myPayType(val){
|
|
|
|
|
|
|
|
// 单选框change事件无效,使用watch代替
|
|
|
|
|
|
|
|
if(val){
|
|
|
|
|
|
|
|
this.getQrCode()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
computed:{
|
|
|
|
computed:{
|
|
|
|
myVisible : {
|
|
|
|
myVisible : {
|
|
|
|
get(){
|
|
|
|
get(){
|
|
|
@ -76,7 +84,7 @@ export default {
|
|
|
|
let str = '请选择支付方式';
|
|
|
|
let str = '请选择支付方式';
|
|
|
|
if(this.myPayType === 'wx'){
|
|
|
|
if(this.myPayType === 'wx'){
|
|
|
|
str = '打开微信扫描付款';
|
|
|
|
str = '打开微信扫描付款';
|
|
|
|
}else if(this.myPayType === 'zfb'){
|
|
|
|
}else if(this.myPayType === 'ali'){
|
|
|
|
str = '打开支付宝扫描付款';
|
|
|
|
str = '打开支付宝扫描付款';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return str;
|
|
|
|
return str;
|
|
|
@ -112,17 +120,18 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getQrCode(){
|
|
|
|
getQrCode(){
|
|
|
|
|
|
|
|
console.log(this.myPayType);
|
|
|
|
if(this.myPayType == 'wx'){
|
|
|
|
if(this.myPayType == 'wx'){
|
|
|
|
this.getWxCodeImg();
|
|
|
|
this.getWxCodeImg();
|
|
|
|
}else if(this.myPayType === 'zfb'){
|
|
|
|
}else if(this.myPayType === 'ali'){
|
|
|
|
this.getZfbCodeImg();
|
|
|
|
this.getAliCodeImg();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 支付宝二维码
|
|
|
|
* 支付宝二维码
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
async getZfbCodeImg(){
|
|
|
|
async getAliCodeImg(){
|
|
|
|
const {error, result} = await ApiPostZfbPayCdoeImg({orderId : this.orderId});
|
|
|
|
const {error, result} = await ApiPostAliPayCdoeImg({orderId : this.orderId});
|
|
|
|
if(error){
|
|
|
|
if(error){
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -205,7 +214,7 @@ export default {
|
|
|
|
&--wx{
|
|
|
|
&--wx{
|
|
|
|
width: 108px;
|
|
|
|
width: 108px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&--zfb{
|
|
|
|
&--ali{
|
|
|
|
width: 78px;
|
|
|
|
width: 78px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|