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
70668ca0
Commit
70668ca0
authored
Sep 10, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联票电子门票增加取号功能
parent
96e086e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
223 additions
and
204 deletions
+223
-204
jointElectronicTicket.vue
.../my/order/jointElectronicTicket/jointElectronicTicket.vue
+223
-204
No files found.
pages/my/order/jointElectronicTicket/jointElectronicTicket.vue
View file @
70668ca0
...
...
@@ -3,10 +3,10 @@
<!-- 联票电子门票 -->
<view
class=
"top"
>
<text>
{{
orderInfo
.
productName
}}
X
{{
orderInfo
.
orderNum
}}
份
{{
orderInfo
.
productName
||
''
}}
X
{{
orderInfo
.
orderNum
||
''
}}
份
</text>
<text>
¥
{{
orderInfo
.
totalMoney
}}
¥
{{
orderInfo
.
totalMoney
||
''
}}
</text>
</view>
...
...
@@ -47,7 +47,15 @@
</view>
<template
v-else
>
<!-- 等于1为需要排号的景区 -->
<!-- 未排号显示排号按钮 -->
<template
v-if=
"item.showNumberBtn"
>
<view
style=
"text-align: center;padding-top: 30rpx;"
>
<text
class=
"btn"
@
click=
"sortAgain(item)"
>
取号
</text>
</view>
</
template
>
<!-- 已排号显示排号信息 -->
<
template
v-else
>
<view
class=
"product-number"
v-if=
"item.showSortInfo==true"
v-for=
"(item2,a) in item.sorts"
:key=
'a'
>
<!-- 1可进入等候区 -->
<view
v-if=
"item2.sortFair==1"
style=
"background: #31AA6B;color: #ffffff;border: none;"
>
...
...
@@ -196,9 +204,11 @@
温馨提示:
{{
item2
.
config
.
paRowNumHint
}}
</view>
</view>
</view>
<!-- 后端返回了二维码才显示下面内容 -->
<view
class=
"product-code"
v-if=
"item.orderTicketDetailList.length>0&&item.orderTicketDetailList[0].ticketCode"
>
</
template
>
<!-- 后端返回了二维码并且不显示取号按钮时才显示二维码-->
<view
class=
"product-code"
v-if=
"item.orderTicketDetailList.length>0&&item.orderTicketDetailList[0].ticketCode&&!item.showNumberBtn"
>
<view
class=
"code-title"
>
凭「入园码」直接入园
</view>
...
...
@@ -489,7 +499,7 @@ export default {
}
//清除排号信息函数2
if
(
this
.
numberFlag
)
{
clear
Interval
(
this
.
numberFlag
)
clear
Timeout
(
this
.
numberFlag
)
this
.
numberFlag
=
null
}
//清除倒计时函数
...
...
@@ -526,7 +536,7 @@ export default {
}
//清除排号信息函数2
if
(
this
.
numberFlag
)
{
clear
Interval
(
this
.
numberFlag
)
clear
Timeout
(
this
.
numberFlag
)
this
.
numberFlag
=
null
}
//清除倒计时函数
...
...
@@ -563,15 +573,16 @@ export default {
item
.
showRefundDetail
=
false
if
(
item
.
orderStatus
==
2
||
item
.
orderStatus
==
4
||
item
.
orderStatus
==
5
||
item
.
orderStatus
==
7
){
//订单状态为2、4、5、7时才获取排号信息
if
(
item
.
isFetch
==
'1'
){
if
(
item
.
isFetch
==
1
){
//为了提高性能,游玩时间等于今天才获取排号信息
if
(
item
.
playDate
.
substr
(
0
,
10
)
==
this
.
$commonjs
.
today
()){
//获取排号信息
this
.
getSortInfo
(
item
)
//每两分钟刷新一次
this
.
numberFlag
=
setInterval
(()
=>
{
if
(
item
.
fetchNumberVoList
&&
item
.
fetchNumberVoList
.
length
>
0
){
//购买的当天票已经取号
this
.
getSortInfo
(
item
)
},
120
*
1000
)
}
else
{
//还未取号的,显示取号按钮
item
.
showNumberBtn
=
true
}
}
}
}
...
...
@@ -579,10 +590,10 @@ export default {
//subOrderType 子订单类型(0-胖丁分销,1-扫码购,2-自助机,3-组合,4-扫码牌,5-预订,6-反扫,7-收银机,8-码同步,9-押金,94-公众号,96-胖丁分销,99-酒店自营)
//exchangeMode 验证方式:1胖丁二维码,2第三方二维码,3短信,4身份证
if
(
item
.
subOrderType
!=
4
&&
item
.
subOrderType
!=
5
){
//为了提高性能,游玩时间等于今天才获取排号信息
if
(
item
.
playDate
.
substr
(
0
,
10
)
==
this
.
$commonjs
.
today
()){
if
(
item
.
exchangeMode
==
4
||
item
.
exchangeMode
==
5
){
//多个二维码
//为了提高性能,游玩时间等于今天才获取排号信息
if
(
item
.
playDate
.
substr
(
0
,
10
)
==
this
.
$commonjs
.
today
()){
if
(
item
.
orderStatus
==
2
||
item
.
orderStatus
==
4
||
item
.
orderStatus
==
5
||
item
.
orderStatus
==
7
){
//订单状态为2、4、5、7时才获取动态二维码
this
.
getCodeList
(
item
)
...
...
@@ -881,10 +892,10 @@ export default {
againNumber
:
0
//首次排号
}
this
.
$request
(
'distribution/distribution/getNewFetchInfo'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
if
(
res
.
data
.
length
>
0
){
//防止代码bug进入catch里面,一直请求接口影响性能
try
{
if
(
res
.
code
==
'00'
){
if
(
res
.
data
.
length
>
0
){
let
dataObj
=
res
.
data
[
0
]
//由于页面不显示历史排号,所以只取第一个最新的排号信息
item
.
sorts
=
dataObj
.
sorts
.
slice
(
0
,
1
)
||
[]
...
...
@@ -919,27 +930,32 @@ export default {
}
}
})
//子产品获取公司Id,用于重排号传参
if
(
dataObj
.
pays
.
length
>
0
){
item
.
merchantCodeCopy
=
dataObj
.
pays
[
0
].
companyId
}
//
//
子产品获取公司Id,用于重排号传参
//
if(dataObj.pays.length>0){
//
item.merchantCodeCopy = dataObj.pays[0].companyId
//
}
//子产品获取三方Id,用于重排号传参
item
.
thirdIdCopy
=
dataObj
.
order
.
orderId
//子产品获取站点编码,用于重排号传参
if
(
item
.
sorts
.
length
>
0
){
item
.
areaCodeCopy
=
item
.
sorts
[
0
].
projectId
}
//
if(item.sorts.length>0){
//
item.areaCodeCopy=item.sorts[0].projectId
//
}
this
.
$forceUpdate
()
}
catch
(
e
){
//每两分钟刷新一次
this
.
numberFlag
=
setTimeout
(()
=>
{
this
.
getSortInfo
(
item
)
},
120
*
1000
)
}
}
else
{
uni
.
showToast
({
title
:
e
,
title
:
res
.
messag
e
,
icon
:
'none'
})
}
}
}
else
{
}
catch
(
e
){
uni
.
showToast
({
title
:
res
.
messag
e
,
title
:
e
,
icon
:
'none'
})
}
...
...
@@ -959,13 +975,16 @@ export default {
let
data
=
{
againNumber
:
1
,
thirdId
:
item
.
thirdIdCopy
,
//三方订单id
areaCode
:
item
.
areaCode
Copy
,
//站点
areaCode
:
item
.
areaCode
,
//站点
userId
:
this
.
openid
,
merchantCode
:
item
.
merchantCode
Copy
,
merchantCode
:
item
.
merchantCode
,
}
this
.
$request
(
'distribution/distribution/newFetchNumber'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
//隐藏弹窗
this
.
showModal
=
false
//隐藏取号按钮
item
.
showNumberBtn
=
false
this
.
getSortInfo
(
item
)
}
else
{
uni
.
showToast
({
...
...
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