新增支付
This commit is contained in:
parent
79791f71f1
commit
abcc6b3eaa
|
|
@ -973,9 +973,6 @@ export const yzPay = {
|
|||
// Toast("还在请求支付,请等待~");
|
||||
// return;
|
||||
// }
|
||||
console.log(type);
|
||||
|
||||
|
||||
this.isclick = true;
|
||||
if (type == 1) {
|
||||
if(this.$route.params.tag == 'auth'){
|
||||
|
|
@ -1196,10 +1193,55 @@ export const yzPay = {
|
|||
return
|
||||
}
|
||||
} else {
|
||||
// 新整合支付方式,后端进行归类
|
||||
// 按返回的类型进行处理
|
||||
console.log('走新整合支付方式====');
|
||||
this.newPayQuick({ order_pay_id: this.order_pay_id, code: btn.code ,pay_type_id:type});
|
||||
switch (btn.code) {
|
||||
case 'T_JSAPI':
|
||||
case 'T_MINIAPP':
|
||||
case 'T_H5':
|
||||
case 'T_APP':
|
||||
case 'T_NATIVE':
|
||||
case 'A_JSAPI':
|
||||
case 'A_NATIVE':
|
||||
case 'U_NATIVE':
|
||||
case 'U_JSAPI':
|
||||
case 'D_NATIVE':
|
||||
this.HfPay({ order_pay_id: this.order_pay_id, code: btn.code ,pay_type_id:type})
|
||||
break;
|
||||
default:
|
||||
// 新整合支付方式,后端进行归类
|
||||
// 按返回的类型进行处理
|
||||
console.log('走新整合支付方式====');
|
||||
this.newPayQuick({ order_pay_id: this.order_pay_id, code: btn.code ,pay_type_id:type});
|
||||
}
|
||||
}
|
||||
},
|
||||
async HfPay(params){ //汇付支付
|
||||
let {msg, result, data} = await $http.get("order.merge-pay.hfPay", params, ".");
|
||||
if (result == 0) {
|
||||
return this.$dialog.alert({
|
||||
message: msg
|
||||
}).then(() => {
|
||||
this.isclick = false;
|
||||
});
|
||||
}
|
||||
try {
|
||||
console.log(data);
|
||||
switch (data.mode) {
|
||||
case '200': //微信公众支付
|
||||
console.log(data);
|
||||
let pay_info=JSON.parse(data.pay_info);
|
||||
console.log(pay_info);
|
||||
this.newWXPay(pay_info);
|
||||
break;
|
||||
case '201':
|
||||
// console.log()
|
||||
this.navigationURL({url: data.qr_code});// 1 : 直接跳转url
|
||||
break;
|
||||
default:
|
||||
console.log('找不到对应类型的支付方式,请核实!');
|
||||
break;
|
||||
}
|
||||
} catch (error) {
|
||||
this.isclick = false;
|
||||
}
|
||||
},
|
||||
async newPayQuick(params = {}){
|
||||
|
|
|
|||
Loading…
Reference in New Issue