Commit 7772cabc authored by 14699's avatar 14699

'fix-bug修改'

parent 65570695
...@@ -188,7 +188,6 @@ const payMoney = () => { ...@@ -188,7 +188,6 @@ const payMoney = () => {
const goPayApp = async (param) => { const goPayApp = async (param) => {
let res = await api.getPay({...param,receivets: + new Date() + '',}); let res = await api.getPay({...param,receivets: + new Date() + '',});
console.log(res)
let paramsData = {} let paramsData = {}
if(res.success){ if(res.success){
if(res.rows[0].appPayRequest){ if(res.rows[0].appPayRequest){
...@@ -220,14 +219,18 @@ const goPayApp = async (param) => { ...@@ -220,14 +219,18 @@ const goPayApp = async (param) => {
}; };
const unifyPay = (paramsData) => { const unifyPay = (paramsData) => {
console.log("paramsData:",paramsData)
window.unifyPayBackNormal = function(res){ window.unifyPayBackNormal = function(res){
console.log('UnifyPay normal = \n\n'+res) let result = res
emit('paySuccess', res); try {
result = JSON.parse(res)
} catch (e) {
result = res
}
emit('paySuccess', result);
}; };
window.unifyPayBackException = function(res) { window.unifyPayBackException = function(res) {
console.log('UnifyPay exception = \n\n'+res) let result = getPayResult(res)
emit('payFail', res); emit('payFail', result);
}; };
let params = { let params = {
className:"UnifyPayBridge", className:"UnifyPayBridge",
...@@ -244,6 +247,27 @@ const handleFinishAmount = () => { ...@@ -244,6 +247,27 @@ const handleFinishAmount = () => {
pay(); pay();
} }
const getPayResult = (res) => {
let resultList = [
{resultCode:"0000",resultMsg:"支付成功"},
{resultCode:"1000",resultMsg:"取消支付"},
{resultCode:"1001",resultMsg:"参数错误"},
{resultCode:"1002",resultMsg:"网络连接错误"},
{resultCode:"1003",resultMsg:"支付客户端未安装"},
{resultCode:"2001",resultMsg:"订单处理中"},
{resultCode:"2002",resultMsg:"订单号重复"},
{resultCode:"2003",resultMsg:"订单支付失败"},
{resultCode:"9999",resultMsg:"其他支付错误"}
];
let result = {resultCode:"9999",resultMsg:"支付失败,请联系管理员!"}
for(let i = 0; i<resultList.length; i++){
if(res.indexOf(resultList[i].resultCode)!= -1){
result = resultList[i]
}
}
return result;
}
</script> </script>
......
...@@ -83,6 +83,7 @@ const handleColse = (param) => { ...@@ -83,6 +83,7 @@ const handleColse = (param) => {
// 支付成功回调 // 支付成功回调
const paySuccessFunction = (result) => { const paySuccessFunction = (result) => {
console.log("支付成功",result)
showModal.value = false; showModal.value = false;
let message = '支付成功!' let message = '支付成功!'
Dialog.confirm({ Dialog.confirm({
...@@ -96,8 +97,8 @@ const paySuccessFunction = (result) => { ...@@ -96,8 +97,8 @@ const paySuccessFunction = (result) => {
// 支付失败回调 // 支付失败回调
const payFailFunction = (result) => { const payFailFunction = (result) => {
console.log("支付失败",result)
showModal.value = false; showModal.value = false;
//{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
let message = result.resultMsg?result.resultMsg:'支付失败,请联系管理员!' let message = result.resultMsg?result.resultMsg:'支付失败,请联系管理员!'
Dialog.confirm({ Dialog.confirm({
title: '提示', title: '提示',
......
...@@ -124,7 +124,7 @@ const formBillingInfoArr = [ ...@@ -124,7 +124,7 @@ const formBillingInfoArr = [
{ {
title: '发票抬头', title: '发票抬头',
propName: 'invoiceTitle', propName: 'invoiceTitle',
type: 'input', type: 'textarea',
value: '', value: '',
isRequired: false, isRequired: false,
disabled: true disabled: true
...@@ -140,7 +140,7 @@ const formBillingInfoArr = [ ...@@ -140,7 +140,7 @@ const formBillingInfoArr = [
{ {
title: '发票地址', title: '发票地址',
propName: 'invoiceBpAddressPhoneNum', propName: 'invoiceBpAddressPhoneNum',
type: 'input', type: 'textarea',
value: '', value: '',
isRequired: false, isRequired: false,
disabled: true disabled: true
...@@ -148,7 +148,7 @@ const formBillingInfoArr = [ ...@@ -148,7 +148,7 @@ const formBillingInfoArr = [
{ {
title: '发票开户行', title: '发票开户行',
propName: 'invoiceBpBankAccount', propName: 'invoiceBpBankAccount',
type: 'input', type: 'textarea',
value: '', value: '',
isRequired: false, isRequired: false,
disabled: true disabled: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment