Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panyongping
uni-pdtravel
Commits
fb589d2d
Commit
fb589d2d
authored
Mar 04, 2025
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
半屏小程序开发
parent
ba31412a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
41 deletions
+30
-41
center.vue
pages/indexs/center/center.vue
+0
-18
orderPayment.vue
pages/payment/orderPayment/orderPayment.vue
+0
-17
paySuccess.vue
pages/payment/paySuccess/paySuccess.vue
+30
-6
No files found.
pages/indexs/center/center.vue
View file @
fb589d2d
...
...
@@ -198,24 +198,6 @@ export default {
}
})
},
aaa
(){
uni
.
openEmbeddedMiniProgram
({
appId
:
'wx888e5ed62eb274db'
,
// 目标小程序的appid
path
:
'pages/payment/orderPayment/orderPayment'
,
// 打开的页面路径,可选
extraData
:
{
// 需要传递给目标小程序的数据,可选
orderId
:
'z0017322618978189e13cc13adb58918'
,
openid
:
'oroHZ5D2kemXkyFtTb_KnJMH1fqc'
},
success
:
(
res
)
=>
{
// 打开成功的回调
console
.
log
(
'打开嵌入的小程序成功'
,
res
)
},
fail
:
(
err
)
=>
{
// 打开失败的回调
console
.
error
(
'打开嵌入的小程序失败'
,
err
)
}
})
},
//---跳转到订单列表
goOrderlist
(
orderStatus
){
uni
.
navigateTo
({
...
...
pages/payment/orderPayment/orderPayment.vue
View file @
fb589d2d
...
...
@@ -76,7 +76,6 @@ export default {
afterBuyUrl
:
'/pages/my/order/electronicTicket/electronicTicket'
,
//支付成功后地址跳转,默认单票跳详情
ifyukuaiCode
:
''
,
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
albumOrderdetail
:
''
,
//是否跳影集订单详情
navigateBackMiniProgram
:
''
,
//是否返回上一个小程序
}
},
onLoad
(
option
)
{
...
...
@@ -88,7 +87,6 @@ export default {
this
.
payType
=
33
//#endif
this
.
orderId
=
this
.
$commonjs
.
getKey
(
option
,
'orderId'
)
this
.
navigateBackMiniProgram
=
this
.
$commonjs
.
getKey
(
option
,
'navigateBackMiniProgram'
)
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
albumOrderdetail
=
option
.
albumOrderdetail
||
''
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
||
''
...
...
@@ -240,21 +238,6 @@ export default {
signType
:
this
.
signType
,
paySign
:
this
.
paySign
,
success
:
res
=>
{
// if(this.navigateBackMiniProgram){
// //如果是需要返回上一个小程序,直接返回上一个小程序
// uni.navigateBackMiniProgram({
// extraData: {
// pay: 'success'
// },
// success(res) {
// // 返回成功
// }
// })
// }else{
// uni.navigateTo({
// url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId+'&afterBuyUrl=' + this.afterBuyUrl + '&ifyukuaiCode=' + this.ifyukuaiCode
// })
// }
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
...
...
pages/payment/paySuccess/paySuccess.vue
View file @
fb589d2d
...
...
@@ -59,10 +59,23 @@ export default {
if
(
res
.
code
==
'00'
)
{
//如果是组合票,直接跳订单列表页面
let
orderType
=
res
.
main
.
orderType
let
apiCategory
=
wx
.
getEnterOptionsSync
().
apiCategory
if
(
orderType
==
'10'
){
if
(
apiCategory
==
'embedded'
){
//如果是半屏小程序直接返回上一个小程序
uni
.
navigateBackMiniProgram
({
extraData
:
{
pdPay
:
'success'
},
success
(
res
)
{
// 返回成功
}
})
}
else
{
uni
.
reLaunch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
}
return
}
this
.
status
=
res
.
main
.
orderStatus
...
...
@@ -70,9 +83,20 @@ export default {
if
(
this
.
status
==
'2'
||
this
.
status
==
'4'
||
this
.
status
==
'5'
)
{
//1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this
.
title
=
'支付成功!'
if
(
apiCategory
==
'embedded'
){
uni
.
navigateBackMiniProgram
({
extraData
:
{
pdPay
:
'success'
},
success
(
res
)
{
// 返回成功
}
})
}
else
{
uni
.
reLaunch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
}
}
else
{
this
.
title
=
res
.
main
.
errorMessage
||
'预订失败'
}
...
...
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