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
8c28911f
Commit
8c28911f
authored
Jan 15, 2025
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联票bug处理
parent
81a70a06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
111 deletions
+119
-111
jointElectronicTicket.vue
.../my/order/jointElectronicTicket/jointElectronicTicket.vue
+119
-111
No files found.
pages/my/order/jointElectronicTicket/jointElectronicTicket.vue
View file @
8c28911f
...
@@ -438,12 +438,12 @@ export default {
...
@@ -438,12 +438,12 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
detailTimer
:
null
,
//详情时间函数
codeTimer
:
null
,
//动态二维码时间函数
numberTimer
:
null
,
//获取排号信息时间函数
codeFlag
:
null
,
//动态二维码函数
codeFlag
:
null
,
//动态二维码函数
countFlag
:
null
,
//倒计时时间函数
countFlag
:
null
,
//倒计时时间函数
numberFlag
:
null
,
////获取排号信息时间函数2
detailTimer
:
null
,
//详情时间函数
codeTimer
:
null
,
//动态二维码时间函数
numberTimer1
:
null
,
//获取排号信息时间函数1
numberTimer2
:
null
,
////获取排号信息时间函数2
Brightness
:
''
,
//屏幕亮度
Brightness
:
''
,
//屏幕亮度
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//openid
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//openid
companyId
:
''
,
//公司Id
companyId
:
''
,
//公司Id
...
@@ -493,14 +493,14 @@ export default {
...
@@ -493,14 +493,14 @@ export default {
this
.
codeTimer
=
null
this
.
codeTimer
=
null
}
}
//清除排号信息函数
//清除排号信息函数
if
(
this
.
numberTimer
)
{
if
(
this
.
numberTimer
1
)
{
clearTimeout
(
this
.
numberTimer
)
clearTimeout
(
this
.
numberTimer
1
)
this
.
numberTimer
=
null
this
.
numberTimer
1
=
null
}
}
//清除排号信息函数2
//清除排号信息函数2
if
(
this
.
number
Flag
)
{
if
(
this
.
number
Timer2
)
{
clearTimeout
(
this
.
number
Flag
)
clearTimeout
(
this
.
number
Timer2
)
this
.
number
Flag
=
null
this
.
number
Timer2
=
null
}
}
//清除倒计时函数
//清除倒计时函数
if
(
this
.
countFlag
)
{
if
(
this
.
countFlag
)
{
...
@@ -530,14 +530,14 @@ export default {
...
@@ -530,14 +530,14 @@ export default {
this
.
codeTimer
=
null
this
.
codeTimer
=
null
}
}
//清除排号信息函数
//清除排号信息函数
if
(
this
.
numberTimer
)
{
if
(
this
.
numberTimer
1
)
{
clearTimeout
(
this
.
numberTimer
)
clearTimeout
(
this
.
numberTimer
1
)
this
.
numberTimer
=
null
this
.
numberTimer
1
=
null
}
}
//清除排号信息函数2
//清除排号信息函数2
if
(
this
.
number
Flag
)
{
if
(
this
.
number
Timer2
)
{
clearTimeout
(
this
.
number
Flag
)
clearTimeout
(
this
.
number
Timer2
)
this
.
number
Flag
=
null
this
.
number
Timer2
=
null
}
}
//清除倒计时函数
//清除倒计时函数
if
(
this
.
countFlag
)
{
if
(
this
.
countFlag
)
{
...
@@ -561,13 +561,14 @@ export default {
...
@@ -561,13 +561,14 @@ export default {
userId
:
this
.
openid
,
//用户Id
userId
:
this
.
openid
,
//用户Id
}
}
this
.
$request
(
'order/userOrder/findOrderDetail'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'order/userOrder/findOrderDetail'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
try
{
//防止代码bug进入catch里面,一直请求接口影响性能
if
(
res
.
code
==
'00'
){
try
{
//防止代码bug进入catch里面,一直请求接口影响性能
this
.
orderInfo
=
res
.
data
this
.
orderInfo
=
res
.
data
let
orderInfo
=
res
.
data
let
orderInfo
=
res
.
data
this
.
orderInfo
.
childs
.
forEach
(
item
=>
{
this
.
orderInfo
.
childs
.
forEach
(
item
=>
{
//默认不显示使用须知
//默认不显示使用须知
item
.
showUseknow
=
false
item
.
showUseknow
=
false
//默认不显示退票详情
//默认不显示退票详情
item
.
showRefundDetail
=
false
item
.
showRefundDetail
=
false
...
@@ -575,18 +576,18 @@ export default {
...
@@ -575,18 +576,18 @@ export default {
//订单状态为2、4、5、7时才获取排号信息
//订单状态为2、4、5、7时才获取排号信息
if
(
item
.
isFetch
==
1
){
if
(
item
.
isFetch
==
1
){
//为了提高性能,游玩时间等于今天才获取排号信息
//为了提高性能,游玩时间等于今天才获取排号信息
if
(
item
.
playDate
.
substr
(
0
,
10
)
==
this
.
$commonjs
.
today
()){
if
(
item
.
playDate
.
substr
(
0
,
10
)
==
this
.
$commonjs
.
today
()){
if
(
item
.
fetchNumberVoList
&&
item
.
fetchNumberVoList
.
length
>
0
){
if
(
item
.
fetchNumberVoList
&&
item
.
fetchNumberVoList
.
length
>
0
){
//购买的当天票已经取号
//购买的当天票已经取号
this
.
getSortInfo
(
item
)
this
.
getSortInfo
(
item
)
}
else
{
}
else
{
//还未取号的,显示取号按钮
//还未取号的,显示取号按钮
item
.
showNumberBtn
=
true
item
.
showNumberBtn
=
true
}
}
}
}
}
}
}
}
//subOrderType 子订单类型(0-胖丁分销,1-扫码购,2-自助机,3-组合,4-扫码牌,5-预订,6-反扫,7-收银机,8-码同步,9-押金,94-公众号,96-胖丁分销,99-酒店自营)
//subOrderType 子订单类型(0-胖丁分销,1-扫码购,2-自助机,3-组合,4-扫码牌,5-预订,6-反扫,7-收银机,8-码同步,9-押金,94-公众号,96-胖丁分销,99-酒店自营)
//exchangeMode 验证方式:1胖丁二维码,2第三方二维码,3短信,4身份证
//exchangeMode 验证方式:1胖丁二维码,2第三方二维码,3短信,4身份证
if
(
item
.
subOrderType
!=
4
&&
item
.
subOrderType
!=
5
){
if
(
item
.
subOrderType
!=
4
&&
item
.
subOrderType
!=
5
){
...
@@ -604,33 +605,33 @@ export default {
...
@@ -604,33 +605,33 @@ export default {
}
}
}
}
if
(
item
.
exchangeMode
==
1
){
if
(
item
.
exchangeMode
==
1
){
//一个二维码
//一个二维码
this
.
getCode
(
item
)
this
.
getCode
(
item
)
}
}
}
}
//根据退款状态修改退款列表的退款名称
//根据退款状态修改退款列表的退款名称
item
.
orderRefundList
.
forEach
((
item2
,
index
)
=>
{
item
.
orderRefundList
.
forEach
((
item2
,
index
)
=>
{
if
(
item2
.
refundStatus
==
0
){
if
(
item2
.
refundStatus
==
0
){
item2
[
'refundStatusName'
]
=
'退款中'
item2
[
'refundStatusName'
]
=
'退款中'
}
else
if
(
item2
.
refundStatus
==
1
){
}
else
if
(
item2
.
refundStatus
==
1
){
item2
[
'refundStatusName'
]
=
'退款成功'
item2
[
'refundStatusName'
]
=
'退款成功'
}
else
if
(
item2
.
refundStatus
==
2
){
}
else
if
(
item2
.
refundStatus
==
2
){
item2
[
'refundStatusName'
]
=
'退款失败'
item2
[
'refundStatusName'
]
=
'退款失败'
}
else
if
(
item2
.
refundStatus
==
3
){
}
else
if
(
item2
.
refundStatus
==
3
){
item2
[
'refundStatusName'
]
=
'退票中'
item2
[
'refundStatusName'
]
=
'退票中'
}
else
if
(
item2
.
refundStatus
==
4
){
}
else
if
(
item2
.
refundStatus
==
4
){
item2
[
'refundStatusName'
]
=
'退票确认'
item2
[
'refundStatusName'
]
=
'退票确认'
}
else
if
(
item2
.
refundStatus
==
5
){
}
else
if
(
item2
.
refundStatus
==
5
){
item2
[
'refundStatusName'
]
=
'退货完成'
item2
[
'refundStatusName'
]
=
'退货完成'
}
else
if
(
item2
.
refundStatus
==
6
){
}
else
if
(
item2
.
refundStatus
==
6
){
item2
[
'refundStatusName'
]
=
'退票审核中'
item2
[
'refundStatusName'
]
=
'退票审核中'
}
else
if
(
item2
.
refundStatus
==
7
){
}
else
if
(
item2
.
refundStatus
==
7
){
item2
[
'refundStatusName'
]
=
'退票失败'
item2
[
'refundStatusName'
]
=
'退票失败'
}
}
})
})
})
})
if
(
orderInfo
.
isRefund
==
3
){
if
(
orderInfo
.
isRefund
==
3
){
// 退票规则以子订单为准
// 退票规则以子订单为准
this
.
orderInfo
.
childs
.
forEach
(
item
=>
{
this
.
orderInfo
.
childs
.
forEach
(
item
=>
{
if
(
item
.
orderStatus
==
2
||
item
.
orderStatus
==
7
){
if
(
item
.
orderStatus
==
2
||
item
.
orderStatus
==
7
){
//等于2出票成功,7部分退货退款
//等于2出票成功,7部分退货退款
...
@@ -673,18 +674,18 @@ export default {
...
@@ -673,18 +674,18 @@ export default {
}
}
}
}
if
(
item2
.
refundDateType
==
1
){
if
(
item2
.
refundDateType
==
1
){
let
refundEndTime
=
''
let
refundEndTime
=
''
if
(
item2
.
refundDay
){
if
(
item2
.
refundDay
){
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item2
.
refundDay
)
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item2
.
refundDay
)
refundEndTime
=
playDate
+
' '
+
item2
.
refundEndTime
refundEndTime
=
playDate
+
' '
+
item2
.
refundEndTime
}
else
{
}
else
{
refundEndTime
=
orderInfo
.
playDate
+
' '
+
item2
.
refundEndTime
refundEndTime
=
orderInfo
.
playDate
+
' '
+
item2
.
refundEndTime
}
}
if
(
refundTime
<
nowTime
<
refundEndTime
){
if
(
refundTime
<
nowTime
<
refundEndTime
){
this
.
subRefundBtn
=
true
this
.
subRefundBtn
=
true
//增加字段用于弹窗展示该产品是否可退
//增加字段用于弹窗展示该产品是否可退
item
.
ifRefund
=
true
item
.
ifRefund
=
true
}
}
}
}
if
(
item2
.
refundDateType
==
2
){
if
(
item2
.
refundDateType
==
2
){
if
(
nowTimeNumber
>
refundTimeNumber
){
if
(
nowTimeNumber
>
refundTimeNumber
){
...
@@ -699,24 +700,24 @@ export default {
...
@@ -699,24 +700,24 @@ export default {
}
}
})
})
}
else
{
}
else
{
// 退票规则以主订单为准
// 退票规则以主订单为准
if
(
orderInfo
.
orderStatus
==
2
||
orderInfo
.
orderStatus
==
7
){
if
(
orderInfo
.
orderStatus
==
2
||
orderInfo
.
orderStatus
==
7
){
//等于2出票成功,7部分退货退款
//等于2出票成功,7部分退货退款
if
(
orderInfo
.
isRefund
==
2
){
if
(
orderInfo
.
isRefund
==
2
){
//随时可退
//随时可退
this
.
mainRefundBtn
=
true
this
.
mainRefundBtn
=
true
}
}
if
(
orderInfo
.
isRefund
==
1
){
if
(
orderInfo
.
isRefund
==
1
){
//1为条件退
//1为条件退
orderInfo
.
orderRefundRuleList
.
forEach
(
item
=>
{
orderInfo
.
orderRefundRuleList
.
forEach
(
item
=>
{
//refundVisitorApply游客是否能自己申请退(0不能1可以)
//refundVisitorApply游客是否能自己申请退(0不能1可以)
if
(
item
.
refundVisitorApply
==
1
){
if
(
item
.
refundVisitorApply
==
1
){
//当前时间戳
//当前时间戳
let
nowTimeNumber
=
new
Date
().
getTime
()
let
nowTimeNumber
=
new
Date
().
getTime
()
//退票时间戳
//退票时间戳
let
refundTime
=
''
let
refundTime
=
''
if
(
item
.
refundDay
){
if
(
item
.
refundDay
){
//1使用日期前
//1使用日期前
if
(
item
.
refundTimeType
==
1
){
if
(
item
.
refundTimeType
==
1
){
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item
.
refundDay
)
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item
.
refundDay
)
refundTime
=
playDate
+
' '
+
item
.
refundTime
refundTime
=
playDate
+
' '
+
item
.
refundTime
...
@@ -737,44 +738,45 @@ export default {
...
@@ -737,44 +738,45 @@ export default {
}
}
}
}
if
(
item
.
refundDateType
==
1
){
if
(
item
.
refundDateType
==
1
){
let
refundEndTime
=
''
let
refundEndTime
=
''
if
(
item
.
refundDay
){
if
(
item
.
refundDay
){
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item
.
refundDay
)
let
playDate
=
this
.
getNewDate
(
orderInfo
.
playDate
,
-
item
.
refundDay
)
refundEndTime
=
playDate
+
' '
+
item
.
refundEndTime
refundEndTime
=
playDate
+
' '
+
item
.
refundEndTime
}
else
{
}
else
{
refundEndTime
=
orderInfo
.
playDate
+
' '
+
item
.
refundEndTime
refundEndTime
=
orderInfo
.
playDate
+
' '
+
item
.
refundEndTime
}
}
if
(
refundTime
<
nowTime
<
refundEndTime
){
if
(
refundTime
<
nowTime
<
refundEndTime
){
this
.
mainRefundBtn
=
true
this
.
mainRefundBtn
=
true
}
}
}
}
if
(
item
.
refundDateType
==
2
){
if
(
item
.
refundDateType
==
2
){
if
(
nowTimeNumber
>
refundTimeNumber
){
if
(
nowTimeNumber
>
refundTimeNumber
){
this
.
mainRefundBtn
=
true
this
.
mainRefundBtn
=
true
}
}
}
}
}
}
})
})
}
}
}
}
}
}
}
catch
(
e
){
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
e
,
title
:
res
.
messag
e
,
icon
:
'none'
icon
:
'none'
})
})
}
}
}
else
{
}
catch
(
e
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
messag
e
,
title
:
e
,
icon
:
'none'
icon
:
'none'
})
})
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
this
.
detailTimer
=
setTimeout
(()
=>
{
this
.
detailTimer
=
setTimeout
(()
=>
{
this
.
getDetail
()
this
.
getDetail
()
},
2000
)
},
2000
)
})
})
},
},
//---当前时间加上天数获取新的日期
//---当前时间加上天数获取新的日期
...
@@ -832,25 +834,32 @@ export default {
...
@@ -832,25 +834,32 @@ export default {
}
}
clearInterval
(
this
.
codeFlag
)
clearInterval
(
this
.
codeFlag
)
this
.
$request
(
'distribution/distribution/getAutoCode'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'distribution/distribution/getAutoCode'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
try
{
item
.
codeList
=
res
.
data
.
codes
if
(
res
.
code
==
'00'
){
if
(
item
.
codeList
.
length
==
0
){
item
.
codeList
=
res
.
data
.
codes
uni
.
showToast
({
if
(
item
.
codeList
.
length
==
0
){
title
:
'网络异常,请退出重试'
,
uni
.
showToast
({
icon
:
'none'
title
:
'网络异常,请退出重试'
,
})
icon
:
'none'
return
})
}
return
item
.
codeStart
=
new
Date
().
getTime
()
}
this
.
codeFlag
=
setInterval
(()
=>
{
item
.
codeStart
=
new
Date
().
getTime
()
this
.
dynamicCodeRefresh
(
item
)
this
.
codeFlag
=
setInterval
(()
=>
{
},
300
)
this
.
dynamicCodeRefresh
(
item
)
}
else
{
},
300
)
uni
.
showToast
({
}
else
{
title
:
res
.
message
,
uni
.
showToast
({
icon
:
'none'
title
:
res
.
message
,
})
icon
:
'none'
}
})
}
}
catch
(
e
){
uni
.
showToast
({
title
:
e
,
icon
:
'none'
})
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
this
.
codeTimer
=
setTimeout
(()
=>
{
this
.
codeTimer
=
setTimeout
(()
=>
{
this
.
getCodeList
(
item
)
this
.
getCodeList
(
item
)
...
@@ -922,12 +931,7 @@ export default {
...
@@ -922,12 +931,7 @@ export default {
}
}
}
}
})
})
this
.
$forceUpdate
()
this
.
$forceUpdate
()
//每两分钟刷新一次
this
.
numberFlag
=
setTimeout
(()
=>
{
this
.
getSortInfo
(
item
)
},
120
*
1000
)
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -935,6 +939,10 @@ export default {
...
@@ -935,6 +939,10 @@ export default {
icon
:
'none'
icon
:
'none'
})
})
}
}
//每两分钟刷新一次
this
.
numberTimer2
=
setTimeout
(()
=>
{
this
.
getSortInfo
(
item
)
},
120
*
1000
)
}
catch
(
e
){
}
catch
(
e
){
uni
.
showToast
({
uni
.
showToast
({
title
:
e
,
title
:
e
,
...
@@ -942,7 +950,7 @@ export default {
...
@@ -942,7 +950,7 @@ export default {
})
})
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
this
.
numberTimer
=
setTimeout
(()
=>
{
this
.
numberTimer
1
=
setTimeout
(()
=>
{
this
.
getSortInfo
(
item
)
this
.
getSortInfo
(
item
)
},
2000
)
},
2000
)
})
})
...
...
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