Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
36b98351
authored
Oct 28, 2025
by
Jony.L
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新支付功能测试5.0
parent
4f7d23d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
4 deletions
+50
-4
src/views/computingResource/resourceList.vue
+50
-4
No files found.
src/views/computingResource/resourceList.vue
View file @
36b98351
...
...
@@ -433,8 +433,8 @@ function create() {
.
then
(()
=>
{
// WPGJ聚合支付处理 - 后端现在直接返回AppPayOrderSubmitRespVO
if
(
res
.
data
.
displayContent
)
{
// 使用displayContent字段生成二维码,
使用orderExtensionId作为payOrderId
getCode
(
res
.
data
.
displayContent
,
res
.
data
.
orderExtensionI
d
);
// 使用displayContent字段生成二维码,
直接使用资源订单ID
getCode
(
res
.
data
.
displayContent
,
res
.
data
.
i
d
);
}
else
{
ElMessage
.
error
(
'获取支付信息失败'
);
}
...
...
@@ -513,7 +513,39 @@ function getCode(value, payOrderId) {
createQueryInterval
(
payOrderId
)
}
/** 轮询查询任务 */
/** 轮询查询任务 - WPGJ支付 */
const
createQueryInterval
=
(
id
)
=>
{
if
(
interval
.
value
)
{
return
}
interval
.
value
=
setInterval
(
async
()
=>
{
const
res
=
await
getWpgjOrder
(
id
)
console
.
log
(
res
,
'WPGJ轮询结果'
)
// 已支付
if
(
res
.
data
.
orderStatus
===
'1'
)
{
clearQueryInterval
()
// ElMessage.success('支付成功!')
ElMessageBox
.
confirm
(
'支付成功'
,
'请前往控制台-我的订单查看'
,
{
confirmButtonText
:
'确认'
,
showCancelButton
:
false
,
type
:
'success'
}
).
then
(()
=>
{
})
}
// 已取消或失败
if
(
res
.
data
.
orderStatus
===
'2'
)
{
clearQueryInterval
()
ElMessage
.
error
(
'支付已关闭!'
)
}
},
1000
*
2
)
}
/** 轮询查询任务 - 老代码(已注释) */
/*
const createQueryInterval = (id) => {
if (interval.value) {
return
...
...
@@ -543,8 +575,10 @@ const createQueryInterval = (id) => {
}
}, 1000 * 2)
}
*/
// 查询详情支付订单
// 查询详情支付订单 - 老代码(已注释)
/*
const getOrder = async (id, sync) => {
return await request({
url: '/pay/order/get',
...
...
@@ -555,6 +589,18 @@ const getOrder = async (id, sync) => {
}
})
}
*/
// WPGJ旺铺聚合支付订单查询
const
getWpgjOrder
=
async
(
id
)
=>
{
return
await
request
({
url
:
'/pay/order/wpgj-get'
,
method
:
'get'
,
params
:
{
id
}
})
}
/** 清空查询任务 */
const
clearQueryInterval
=
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment