Commit 7772cabc authored by 14699's avatar 14699

'fix-bug修改'

parent 65570695
......@@ -188,7 +188,6 @@ const payMoney = () => {
const goPayApp = async (param) => {
let res = await api.getPay({...param,receivets: + new Date() + '',});
console.log(res)
let paramsData = {}
if(res.success){
if(res.rows[0].appPayRequest){
......@@ -220,14 +219,18 @@ const goPayApp = async (param) => {
};
const unifyPay = (paramsData) => {
console.log("paramsData:",paramsData)
window.unifyPayBackNormal = function(res){
console.log('UnifyPay normal = \n\n'+res)
emit('paySuccess', res);
let result = res
try {
result = JSON.parse(res)
} catch (e) {
result = res
}
emit('paySuccess', result);
};
window.unifyPayBackException = function(res) {
console.log('UnifyPay exception = \n\n'+res)
emit('payFail', res);
let result = getPayResult(res)
emit('payFail', result);
};
let params = {
className:"UnifyPayBridge",
......@@ -244,6 +247,27 @@ const handleFinishAmount = () => {
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>
......
......@@ -83,6 +83,7 @@ const handleColse = (param) => {
// 支付成功回调
const paySuccessFunction = (result) => {
console.log("支付成功",result)
showModal.value = false;
let message = '支付成功!'
Dialog.confirm({
......@@ -96,8 +97,8 @@ const paySuccessFunction = (result) => {
// 支付失败回调
const payFailFunction = (result) => {
console.log("支付失败",result)
showModal.value = false;
//{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
let message = result.resultMsg?result.resultMsg:'支付失败,请联系管理员!'
Dialog.confirm({
title: '提示',
......
......@@ -124,7 +124,7 @@ const formBillingInfoArr = [
{
title: '发票抬头',
propName: 'invoiceTitle',
type: 'input',
type: 'textarea',
value: '',
isRequired: false,
disabled: true
......@@ -140,7 +140,7 @@ const formBillingInfoArr = [
{
title: '发票地址',
propName: 'invoiceBpAddressPhoneNum',
type: 'input',
type: 'textarea',
value: '',
isRequired: false,
disabled: true
......@@ -148,7 +148,7 @@ const formBillingInfoArr = [
{
title: '发票开户行',
propName: 'invoiceBpBankAccount',
type: 'input',
type: 'textarea',
value: '',
isRequired: false,
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