Commit 4f7d23d9 by Jony.L

新支付功能测试2.0

parent 7d6edd26
...@@ -420,8 +420,7 @@ function create() { ...@@ -420,8 +420,7 @@ function create() {
// 创建订单(使用旺铺聚合支付) // 创建订单(使用旺铺聚合支付)
createOrderSubmitWpgj(createData).then(res => { createOrderSubmitWpgj(createData).then(res => {
console.log('WPGJ支付响应数据:', res.data); console.log('WPGJ支付响应数据:', res.data);
if (res.data.payOrderId) { // 直接弹出确认对话框(WPGJ接口调用成功就显示)
// 弹出确认对话框
ElMessageBox.confirm( ElMessageBox.confirm(
'确定购买吗?', // 对话框提示文字 '确定购买吗?', // 对话框提示文字
'购买确认', // 对话框标题 '购买确认', // 对话框标题
...@@ -434,8 +433,8 @@ function create() { ...@@ -434,8 +433,8 @@ function create() {
.then(() => { .then(() => {
// WPGJ聚合支付处理 - 后端现在直接返回AppPayOrderSubmitRespVO // WPGJ聚合支付处理 - 后端现在直接返回AppPayOrderSubmitRespVO
if (res.data.displayContent) { if (res.data.displayContent) {
// 使用displayContent字段生成二维码 // 使用displayContent字段生成二维码,使用orderExtensionId作为payOrderId
getCode(res.data.displayContent, null); // WPGJ接口不需要payOrderId getCode(res.data.displayContent, res.data.orderExtensionId);
} else { } else {
ElMessage.error('获取支付信息失败'); ElMessage.error('获取支付信息失败');
} }
...@@ -454,9 +453,9 @@ function create() { ...@@ -454,9 +453,9 @@ function create() {
showDrawer.value = false; showDrawer.value = false;
}) })
}); });
}
}).catch(err => { }).catch(err => {
// 接口调用失败的处理(如提示错误) console.error('创建订单失败:', err);
ElMessage.error('创建订单失败,请重试');
}); });
// 原有支付方式代码(已注释) // 原有支付方式代码(已注释)
......
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 sign in to comment