Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
046c0ade
Commit
046c0ade
authored
Oct 27, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
7e6ddcf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
payResultPage.vue
v3/payResultPage/payResultPage.vue
+12
-7
settlementCenter.vue
v3/settlementCenter/settlementCenter.vue
+14
-2
No files found.
v3/payResultPage/payResultPage.vue
View file @
046c0ade
...
...
@@ -147,9 +147,12 @@ export default {
if
(
options
.
failureReason
)
{
this
.
resultData
.
failureReason
=
decodeURIComponent
(
options
.
failureReason
);
}
// 处理订单ID,添加详细日志
if
(
options
.
orderId
)
{
this
.
resultData
.
orderId
=
options
.
orderId
;
console
.
log
(
'接收到的订单ID:'
,
options
.
orderId
);
}
else
{
console
.
warn
(
'未接收到订单ID,options:'
,
options
);
}
// 保存其他参数供后续使用
...
...
@@ -170,13 +173,15 @@ export default {
handleAction
()
{
if
(
this
.
isSuccess
)
{
// 查看订单 - 跳转到订单详情页面
if
(
this
.
resultData
.
orderId
)
{
console
.
log
(
'跳转到订单详情页,订单ID:'
,
this
.
resultData
.
orderId
);
uni
.
navigateTo
({
url
:
`/v3/orderDetail/orderDetail?orderId=
${
this
.
resultData
.
orderId
}
`
});
}
else
{
console
.
log
(
'没有订单ID,跳转到订单列表页'
);
if
(
this
.
resultData
.
orderId
)
{
console
.
log
(
'跳转到订单详情页,订单ID:'
,
this
.
resultData
.
orderId
);
// 确保订单ID被正确编码
const
encodedOrderId
=
encodeURIComponent
(
this
.
resultData
.
orderId
);
uni
.
navigateTo
({
url
:
`/v3/orderDetail/orderDetail?orderId=
${
encodedOrderId
}
`
});
}
else
{
console
.
log
(
'没有订单ID,跳转到订单列表页'
);
// 如果没有订单ID,跳转到订单列表页面
uni
.
navigateTo
({
url
:
'/v3/orderList/orderList'
...
...
v3/settlementCenter/settlementCenter.vue
View file @
046c0ade
...
...
@@ -181,7 +181,7 @@ export default {
// 基础订单参数
this
.
orderParams
=
{
gid
:
options
.
gid
||
''
,
skuld
:
options
.
skuld
||
''
,
skuld
:
options
.
skuld
||
''
,
buy_num
:
parseInt
(
options
.
buy_num
)
||
1
,
phone
:
options
.
phone
||
''
,
amount
:
options
.
amount
||
''
,
...
...
@@ -391,10 +391,22 @@ export default {
// 跳转到支付结果页面
navigateToPayResult
(
isSuccess
,
orderData
=
null
,
errorMsg
=
''
)
{
// 添加详细日志,检查orderData的结构
console
.
log
(
'订单数据结构:'
,
orderData
);
// 获取订单ID,支持多种可能的数据结构
let
orderId
=
''
;
if
(
orderData
)
{
// 优先检查常用的订单ID字段
orderId
=
orderData
.
orderId
||
orderData
.
id
||
orderData
.
order_no
||
orderData
.
orderNum
||
''
;
}
console
.
log
(
'最终订单ID:'
,
orderId
);
const
resultParams
=
{
// 基础结果参数
isSuccess
:
isSuccess
,
orderId
:
order
Data
?
orderData
.
orderId
:
''
,
orderId
:
order
Id
,
// 积分信息
pointsValue
:
`
${
this
.
goodsInfo
.
points
*
this
.
goodsInfo
.
quantity
}${
this
.
goodsInfo
.
creditsTypeName
}
`
,
...
...
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