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
e75c99e9
Commit
e75c99e9
authored
Mar 17, 2025
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug处理
parent
09032056
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
373 additions
and
13 deletions
+373
-13
manifest.json
manifest.json
+1
-1
orderPayment.vue
pages/payment/orderPayment/orderPayment.vue
+7
-7
paySuccess.vue
pages/payment/paySuccess/paySuccess.vue
+2
-4
orderPay.vue
pages/scenic/scenicComponents/orderPay.vue
+344
-0
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+19
-1
No files found.
manifest.json
View file @
e75c99e9
...
...
@@ -75,7 +75,7 @@
"enable"
:
false
},
"requiredPrivateInfos"
:
[
"getLocation"
],
"embeddedAppIdList"
:
[
"wx888e5ed62eb274db"
,
"wx64134dba0cb21899"
]
//第一个途比达,第二个长江索道
"embeddedAppIdList"
:
[
"wx888e5ed62eb274db"
,
"wx64134dba0cb21899"
]
//第一个途比达,第二个长江索道
},
"mp-alipay"
:
{
"usingComponents"
:
true
,
...
...
pages/payment/orderPayment/orderPayment.vue
View file @
e75c99e9
...
...
@@ -8,7 +8,9 @@
<text>
<text
style=
"font-size:24rpx;"
>
¥
</text>
{{
item
.
unitPrice
}}
<text>
x
</text>
{{
item
.
orderNum
}}
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"item.depositReceived"
>
押金:
{{
item
.
depositReceived
}}
</text>
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"item.depositReceived"
>
押金:
{{
item
.
depositReceived
}}
</text>
</text>
</view>
<view
class=
"coupon"
v-if=
"item.pdDiscountMoney"
>
...
...
@@ -74,7 +76,6 @@ export default {
orderId
:
''
,
//订单Id
openid
:
''
,
//用户Id
afterBuyUrl
:
'/pages/my/order/electronicTicket/electronicTicket'
,
//支付成功后地址跳转,默认单票跳详情
ifyukuaiCode
:
''
,
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
albumOrderdetail
:
''
,
//是否跳影集订单详情
}
},
...
...
@@ -87,7 +88,6 @@ export default {
this
.
payType
=
33
//#endif
this
.
orderId
=
this
.
$commonjs
.
getKey
(
option
,
'orderId'
)
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
albumOrderdetail
=
option
.
albumOrderdetail
||
''
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
||
''
if
(
this
.
openid
)
{
...
...
@@ -182,7 +182,7 @@ export default {
this
.
pdOrderMoney
=
res
.
data
.
pdOrderMoney
if
(
this
.
pdOrderMoney
==
0
&&
res
.
data
.
subOrderType
==
-
1
){
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
}
this
.
errorMessage1
=
res
.
data
.
errorMessage
...
...
@@ -239,7 +239,7 @@ export default {
paySign
:
this
.
paySign
,
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
},
fail
:
function
(
err
)
{
...
...
@@ -264,7 +264,7 @@ export default {
orderInfo
:
this
.
orderInfo
,
// 支付宝订单号
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
},
fail
:
function
(
err
)
{
...
...
@@ -280,7 +280,7 @@ export default {
}
</
script
>
<
style
>
<
style
scoped
>
.bigBox
{
height
:
100%
;
background
:
#fafafc
;
...
...
pages/payment/paySuccess/paySuccess.vue
View file @
e75c99e9
...
...
@@ -19,13 +19,11 @@ export default {
timer
:
''
,
//计时器
loadImg
:
true
,
//控制加载图片显示隐藏
afterBuyUrl
:
''
,
//页面跳转地址
ifyukuaiCode
:
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
}
},
onLoad
(
option
)
{
this
.
orderId
=
option
.
orderId
||
''
this
.
afterBuyUrl
=
option
.
afterBuyUrl
||
''
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
ticketStatus
()
let
intFun
=
()
=>
{
//页面初始化
this
.
timer
=
setTimeout
(()
=>
{
...
...
@@ -74,7 +72,7 @@ export default {
})
}
else
{
uni
.
reLaunch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
})
}
return
...
...
@@ -96,7 +94,7 @@ export default {
})
}
else
{
uni
.
reLaunch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
})
}
}
else
{
...
...
pages/scenic/scenicComponents/orderPay.vue
0 → 100644
View file @
e75c99e9
<
template
>
<u-popup
:show=
"showPop"
:round=
"20"
@
close=
"showPop = false"
closeable
>
<view
class=
"son-wrap"
>
<view
class=
"middle"
v-show=
"orderList.length>0"
>
<view
class=
"middle-wrap"
>
<view
v-for=
"item of orderList"
:key=
"item.id"
class=
"product"
>
<view>
<text>
{{
item
.
merchantName
}}
(
{{
item
.
productName
}}
)
</text>
<text>
<text
style=
"font-size:24rpx;"
>
¥
</text>
{{
item
.
unitPrice
}}
<text>
x
</text>
{{
item
.
orderNum
}}
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"item.depositReceived"
>
押金:
{{
item
.
depositReceived
}}
</text>
</text>
</view>
<view
class=
"coupon"
v-if=
"item.pdDiscountMoney"
>
<text>
券
</text>
<text>
<text
style=
"font-size:24rpx;"
>
-¥
</text>
{{
item
.
pdDiscountMoney
}}
</text>
</view>
</view>
<view
class=
"middle-money"
>
<view>
实际支付
</view>
<view>
<text
style=
"font-size:28rpx;"
>
¥
</text>
{{
pdOrderMoney
}}
</view>
</view>
<view
class=
"middle-image"
>
<!-- #ifdef MP-WEIXIN -->
<image
src=
"@/static/img/orderPayment/weixin.png"
style=
"width:70rpx;height:62rpx;"
/>
<view>
微信支付
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<image
src=
"@/static/img/orderPayment/alipayLogo.png"
style=
"width:70rpx;height:62rpx;"
/>
<view>
支付宝支付
</view>
<!-- #endif -->
<image
src=
"@/static/img/orderPayment/input.png"
style=
"width:32rpx;height: 32rpx;"
/>
</view>
</view>
</view>
<view
v-show=
"errorMessage1||errorMessage2"
>
错误1:
{{
errorMessage1
}}
错误2:
{{
errorMessage2
}}
</view>
<view
class=
"bottom"
>
<view
class=
"bottom-left"
>
<text>
实付款
</text>
<text
v-show=
"pdOrderMoney"
>
<text
style=
"font-size: 28rpx;"
>
¥
</text>
{{
pdOrderMoney
}}
</text>
</view>
<view
class=
"bottom-right"
>
<u-icon
name=
"chat"
size=
"40"
@
click=
"makePhone()"
></u-icon>
<text
@
click=
"goPay()"
:style=
"
{ background: background }">去支付
</text>
</view>
</view>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:[
'orderId'
],
data
()
{
return
{
showPop
:
false
,
//控制弹窗显示隐藏
orderList
:[],
//订单列表
pdOrderMoney
:
''
,
//实际总价
totalMoney
:
''
,
//原价总价
errorMessage1
:
''
,
//错误信息1,接口成功返回的错误信息
errorMessage2
:
''
,
//错误信息2,接口失败返回的错误信息
payType
:
''
,
//支付类型
timeStamp
:
''
,
//微信支付参数
nonceStr
:
''
,
//微信支付参数
package
:
''
,
//微信支付参数
signType
:
''
,
//微信支付参数
paySign
:
''
,
//微信支付参数
orderInfo
:
''
,
//支付宝订单号
background
:
''
,
//去支付的背景颜色
openid
:
''
,
//用户Id
afterBuyUrl
:
'/pages/my/order/electronicTicket/electronicTicket'
,
//支付成功后地址跳转,默认单票跳详情
albumOrderdetail
:
''
,
//是否跳影集订单详情
}
},
created
()
{
//#ifdef MP-WEIXIN
this
.
payType
=
42
//#endif
//#ifdef MP-ALIPAY
this
.
payType
=
33
//#endif
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
||
''
this
.
initDetail
()
},
methods
:
{
//---拨打电话
makePhone
()
{
uni
.
makePhoneCall
({
phoneNumber
:
'400-072-0368'
})
},
//---初始化产品信息,以及获取支付需要的参数
initDetail
()
{
let
data
=
{
orderId
:
this
.
orderId
,
//订单Id
userId
:
this
.
openid
,
//用户Id
payType
:
this
.
payType
//支付类型
}
uni
.
showLoading
({
mask
:
true
})
this
.
$request
(
'orderc/order/findOrderInfo'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
this
.
albumOrderdetail
==
1
){
//主要跳转影集订单详情,暂时是前端写死
this
.
afterBuyUrl
=
'/pages/album/albumOrderdetail/albumOrderdetail'
}
else
{
if
(
res
.
data
.
orderType
==
'10'
){
//组合票和联票跳订单列表
this
.
afterBuyUrl
=
'/pages/my/order/orderList/orderList'
}
}
//支付参数开始
this
.
timeStamp
=
res
.
data
.
timestamp
this
.
nonceStr
=
res
.
data
.
noncestr
this
.
package
=
res
.
data
.
package
this
.
signType
=
res
.
data
.
signType
this
.
paySign
=
res
.
data
.
sign
//支付宝入参
this
.
orderInfo
=
res
.
data
.
payInfo
||
''
//支付参数结束
this
.
pdOrderMoney
=
res
.
data
.
pdOrderMoney
if
(
this
.
pdOrderMoney
==
0
&&
res
.
data
.
subOrderType
==
-
1
){
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
}
this
.
errorMessage1
=
res
.
data
.
errorMessage
this
.
totalMoney
=
res
.
data
.
totalMoney
this
.
orderList
=
res
.
data
.
orderList
||
[]
if
(
this
.
orderList
.
length
==
0
||
res
.
data
.
orderPageShowFlag
==
0
)
{
this
.
orderList
=
[]
this
.
orderList
.
push
({
merchantName
:
res
.
data
.
merchantName
,
productName
:
res
.
data
.
productName
,
unitPrice
:
res
.
data
.
unitPrice
,
orderNum
:
res
.
data
.
orderNum
,
depositReceived
:
res
.
data
.
depositReceived
,
pdDiscountMoney
:
res
.
data
.
pdDiscountMoney
,
endPlayDate
:
res
.
data
.
endPlayDate
})
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
this
.
errorMessage2
=
res
.
message
}
})
},
//----去支付
goPay
()
{
if
(
this
.
errorMessage1
)
{
uni
.
showToast
({
title
:
this
.
errorMessage1
,
icon
:
'none'
})
return
}
this
.
background
=
'#E6E6E6'
setTimeout
(()
=>
{
this
.
background
=
'#3688FF'
},
1000
)
// #ifdef MP-WEIXIN
if
(
!
this
.
timeStamp
||!
this
.
nonceStr
||!
this
.
package
||!
this
.
signType
||!
this
.
paySign
){
uni
.
showToast
({
title
:
'缺少支付参数'
,
icon
:
'none'
})
return
}
uni
.
requestPayment
({
provider
:
'wxpay'
,
timeStamp
:
this
.
timeStamp
,
nonceStr
:
this
.
nonceStr
,
package
:
this
.
package
,
signType
:
this
.
signType
,
paySign
:
this
.
paySign
,
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
},
fail
:
function
(
err
)
{
uni
.
showToast
({
title
:
err
.
errMsg
,
icon
:
'none'
})
}
})
//#endif
// #ifdef MP-ALIPAY
if
(
!
this
.
orderInfo
){
uni
.
showToast
({
title
:
'缺少支付参数'
,
icon
:
'none'
})
return
}
uni
.
requestPayment
({
provider
:
'alipay'
,
// 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo
:
this
.
orderInfo
,
// 支付宝订单号
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
})
},
fail
:
function
(
err
)
{
uni
.
showToast
({
title
:
err
.
errMsg
,
icon
:
'none'
})
}
})
// #endif
}
}
}
</
script
>
<
style
scoped
>
.son-wrap
{
height
:
65vh
;
}
.middle
{
padding
:
30
rpx
24
rpx
0
24
rpx
;
}
.middle-wrap
{
padding
:
10
rpx
24
rpx
20
rpx
24
rpx
;
background
:
#ffffff
;
border-radius
:
20
rpx
;
box-shadow
:
0
0
15
rpx
#e6e6e8
;
}
.product
{
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
25
rpx
0
;
}
.product
view
{
color
:
#000000
;
padding-left
:
10
rpx
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
}
.product
view
text
:first-child
{
flex
:
1
;
}
.product
view
text
:nth-child
(
2
)
{
color
:
#666666
;
font-size
:
28
rpx
;
text-align
:
right
;
}
.product
view
.coupon
{
color
:
#f9690e
;
margin-top
:
10
rpx
;
}
.product
view
.coupon
text
{
font-size
:
30
rpx
;
}
.middle-money
{
height
:
120
rpx
;
color
:
#000000
;
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
25
rpx
0
25
rpx
10
rpx
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
justify-content
:
space-between
;
}
.middle-money
view
:nth-child
(
2
)
{
font-size
:
24
rpx
;
color
:
#666666
;
}
.middle-money
view
:nth-child
(
2
)
{
font-size
:
36
rpx
;
color
:
#f9690e
;
font-weight
:
bold
;
}
.middle-image
{
margin-top
:
50
rpx
;
display
:
flex
;
align-items
:
center
;
}
.middle-image
>
image
:first-child
{
margin
:
0
20
rpx
0
10
rpx
;
}
.middle-image
>
view
{
flex
:
1
;
}
.bottom
{
position
:
fixed
;
bottom
:
0
;
height
:
100
rpx
;
background
:
#ffffff
;
border-top
:
1px
solid
#e5e5e5
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
}
.bottom-left
{
border-right
:
1px
solid
#cccccc
;
padding-left
:
40
rpx
;
width
:
40%
;
}
.bottom-left
text
:nth-child
(
2
)
{
font-size
:
40
rpx
;
color
:
#f9690e
;
margin-left
:
10
rpx
;
font-weight
:
bold
;
}
.bottom-right
{
padding-left
:
30
rpx
;
display
:
flex
;
width
:
60%
;
padding-right
:
30
rpx
;
align-items
:
center
;
}
.bottom-right
text
:nth-child
(
2
)
{
flex
:
1
;
height
:
70
rpx
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
70
rpx
;
background
:
#3688FF
;
color
:
#ffffff
;
margin-left
:
30
rpx
;
border-radius
:
20
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
</
style
>
\ No newline at end of file
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
e75c99e9
...
...
@@ -361,6 +361,7 @@
@
contactListConfig=
'contactListConfig'
></contactList>
<orderCoupon
:couponData=
"couponData"
ref=
"orderCoupon"
@
couponChoose=
"couponChoose"
:chooseCouponObj=
"chooseCouponObj"
></orderCoupon>
<!-- <orderPay :orderId='orderId' ref="orderPay"></orderPay> -->
<!--一个站点时获取排队信息弹窗-->
<u-popup
:show=
"sortInforPop"
:round=
"10"
closeable
@
close=
"sortInforPop = false"
>
<view
style=
"padding: 40rpx 60rpx"
>
...
...
@@ -400,6 +401,7 @@ import chooseArea from '../scenicComponents/chooseArea' //选择站点
import
contactList
from
'../scenicComponents/contactList'
//联系人弹窗
import
editContacts
from
'../scenicComponents/editContacts'
//编辑联系人弹窗
import
times
from
'../scenicComponents/times'
//更多时间弹窗
import
orderPay
from
'../scenicComponents/orderPay.vue'
//支付弹窗
export
default
{
components
:
{
...
...
@@ -410,7 +412,8 @@ export default {
editContacts
,
times
,
chooseArea
,
orderCoupon
orderCoupon
,
orderPay
},
data
()
{
return
{
...
...
@@ -470,6 +473,7 @@ export default {
ableConpon
:
''
,
//没有可用优惠券时,达到一定条件可用,显示达到的条件
timer
:
null
,
//时间函数
sortStatus
:
true
,
//排号状态
orderId
:
''
,
//订单Id
}
},
onUnload
()
{
...
...
@@ -1379,6 +1383,20 @@ export default {
uni
.
navigateTo
({
url
:
'/pages/payment/orderPayment/orderPayment?orderId='
+
res
.
data
.
id
})
// uni.openEmbeddedMiniProgram({
// appId: 'wx64134dba0cb21899', // 目标小程序的appid
// path: 'pages/payment/orderPayment/orderPayment?orderId='+res.data.id, // 打开的页面路径,可选
// success: (res) => {
// // 打开成功的回调
// console.log('打开嵌入的小程序成功', res)
// },
// fail: (err) => {
// // 打开失败的回调
// console.error('打开嵌入的小程序失败', err)
// }
// })
// this.orderId=res.data.id
// this.$refs.orderPay.showPop=true
}
else
{
uni
.
showToast
({
title
:
'下单失败'
,
...
...
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