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
75bc906a
Commit
75bc906a
authored
Jan 15, 2025
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联票电子门票bug处理
parent
8c28911f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
16 deletions
+33
-16
jointElectronicTicket.vue
.../my/order/jointElectronicTicket/jointElectronicTicket.vue
+33
-16
No files found.
pages/my/order/jointElectronicTicket/jointElectronicTicket.vue
View file @
75bc906a
...
...
@@ -438,7 +438,6 @@ export default {
},
data
()
{
return
{
codeFlag
:
null
,
//动态二维码函数
countFlag
:
null
,
//倒计时时间函数
detailTimer
:
null
,
//详情时间函数
codeTimer
:
null
,
//动态二维码时间函数
...
...
@@ -508,9 +507,13 @@ export default {
this
.
countFlag
=
null
}
//清除动态二维码函数
if
(
this
.
codeFlag
)
{
clearInterval
(
this
.
codeFlag
)
this
.
codeFlag
=
null
if
(
this
.
orderInfo
&&
this
.
orderInfo
.
childs
.
length
>
0
){
for
(
let
index
=
0
;
index
<
this
.
orderInfo
.
childs
.
length
;
index
++
){
if
(
this
[
'codeFlag'
+
index
])
{
clearInterval
(
this
[
'codeFlag'
+
index
])
this
[
'codeFlag'
+
index
]
=
null
}
}
}
uni
.
setScreenBrightness
({
// 恢复之前屏幕亮度
value
:
this
.
Brightness
...
...
@@ -545,9 +548,13 @@ export default {
this
.
countFlag
=
null
}
//清除动态二维码函数
if
(
this
.
codeFlag
)
{
clearInterval
(
this
.
codeFlag
)
this
.
codeFlag
=
null
if
(
this
.
orderInfo
&&
this
.
orderInfo
.
childs
.
length
>
0
){
for
(
let
index
=
0
;
index
<
this
.
orderInfo
.
childs
.
length
;
index
++
){
if
(
this
[
'codeFlag'
+
index
])
{
clearInterval
(
this
[
'codeFlag'
+
index
])
this
[
'codeFlag'
+
index
]
=
null
}
}
}
uni
.
setScreenBrightness
({
// 恢复之前屏幕亮度
value
:
this
.
Brightness
...
...
@@ -567,7 +574,7 @@ export default {
this
.
orderInfo
=
res
.
data
let
orderInfo
=
res
.
data
this
.
orderInfo
.
childs
.
forEach
(
item
=>
{
this
.
orderInfo
.
childs
.
forEach
(
(
item
,
index
)
=>
{
//默认不显示使用须知
item
.
showUseknow
=
false
//默认不显示退票详情
...
...
@@ -597,7 +604,7 @@ export default {
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
)
this
.
getCodeList
(
item
,
index
)
}
}
else
{
//如果不是今天,为了保持页面完整性,临时放一个静态二维码
...
...
@@ -789,7 +796,7 @@ export default {
return
y
+
'-'
+
m
+
'-'
+
d
},
//---二维码刷新
dynamicCodeRefresh
(
item
){
dynamicCodeRefresh
(
item
,
index
){
let
codeList
=
item
.
codeList
let
codeStart
=
item
.
codeStart
// 获取当前显示第几个二维码
...
...
@@ -806,7 +813,7 @@ export default {
}
// 全部遍历完成后,需要重新获取新的二维码
if
(
code
==
null
){
this
.
getCodeList
(
item
)
this
.
getCodeList
(
item
,
index
)
}
else
{
if
(
code
.
code
!=
this
.
nowCodeNo
){
this
.
nowCodeNo
=
code
.
code
||
''
...
...
@@ -822,7 +829,7 @@ export default {
}
},
//---获取动态二维码列表
getCodeList
(
item
){
getCodeList
(
item
,
index
){
let
codeNo
=
''
if
(
item
.
orderTicketDetailList
.
length
>
0
){
codeNo
=
item
.
orderTicketDetailList
[
0
].
ticketCode
...
...
@@ -832,7 +839,7 @@ export default {
orderId
:
item
.
id
,
//订单号
userId
:
this
.
openid
//openid
}
clearInterval
(
this
.
codeFlag
)
clearInterval
(
this
[
'codeFlag'
+
index
]
)
this
.
$request
(
'distribution/distribution/getAutoCode'
,
data
).
then
((
res
)
=>
{
try
{
if
(
res
.
code
==
'00'
){
...
...
@@ -845,8 +852,8 @@ export default {
return
}
item
.
codeStart
=
new
Date
().
getTime
()
this
.
codeFlag
=
setInterval
(()
=>
{
this
.
dynamicCodeRefresh
(
item
)
this
[
'codeFlag'
+
index
]
=
setInterval
(()
=>
{
this
.
dynamicCodeRefresh
(
item
,
index
)
},
300
)
}
else
{
uni
.
showToast
({
...
...
@@ -862,7 +869,7 @@ export default {
}
}).
catch
((
err
)
=>
{
this
.
codeTimer
=
setTimeout
(()
=>
{
this
.
getCodeList
(
item
)
this
.
getCodeList
(
item
,
index
)
},
2000
)
})
},
...
...
@@ -999,6 +1006,16 @@ export default {
if
(
res
.
code
==
'00'
){
//隐藏弹窗
this
.
showModal
=
false
//清除排号信息函数1
if
(
this
.
numberTimer1
)
{
clearTimeout
(
this
.
numberTimer1
)
this
.
numberTimer1
=
null
}
//清除排号信息函数2
if
(
this
.
numberTimer2
)
{
clearTimeout
(
this
.
numberTimer2
)
this
.
numberTimer2
=
null
}
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