Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
96dbc023
Commit
96dbc023
authored
May 12, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时器
parent
7a494792
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
16 deletions
+36
-16
AggregateOrdersList.vue
pages/AggregateOrders/AggregateOrdersList.vue
+8
-0
orders.vue
pages/AggregateOrders/components/orders.vue
+18
-11
index.vue
pages/hotel/components/time/index.vue
+1
-1
detail.vue
pages/hotel/detail.vue
+4
-4
orderdetails.vue
pages/hotel/orderdetails.vue
+5
-0
No files found.
pages/AggregateOrders/AggregateOrdersList.vue
View file @
96dbc023
...
@@ -128,6 +128,14 @@
...
@@ -128,6 +128,14 @@
if
(
options
.
OrderTypeStr
)
this
.
msg
.
OrderTypeStr
=
options
.
OrderTypeStr
if
(
options
.
OrderTypeStr
)
this
.
msg
.
OrderTypeStr
=
options
.
OrderTypeStr
if
(
options
.
OrderStatus
)
this
.
msg
.
OrderStatus
=
options
.
OrderStatus
if
(
options
.
OrderStatus
)
this
.
msg
.
OrderStatus
=
options
.
OrderStatus
},
},
beforeDestroy
()
{
// 清除所有定时器
clearInterval
(
null
)
},
onHide
()
{
// 清除所有定时器
clearInterval
(
null
)
},
onShow
()
{
onShow
()
{
this
.
research
()
this
.
research
()
},
},
...
...
pages/AggregateOrders/components/orders.vue
View file @
96dbc023
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
:style=
"{'width':!item.remainingSeconds?'150rpx':'auto'}"
:style=
"{'width':!item.remainingSeconds?'150rpx':'auto'}"
:class=
"[item.remainingSeconds?'active':'']"
:class=
"[item.remainingSeconds?'active':'']"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
立即支付
<text
v-if=
"item.remainingSeconds"
style=
"margin-left: 10rpx;"
>
剩余:{{ formatTime(item.remainingSeconds) }}
</text>
立即支付
<!--<text v-if="item.remainingSeconds" style="margin-left: 10rpx;"> 剩余:{{ formatTime(item.remainingSeconds) }}</text> -->
</view>
</view>
<view
v-if=
"item.orderStatus!=1"
style=
"margin-left: 10rpx;"
class=
"jz_Zailai"
<view
v-if=
"item.orderStatus!=1"
style=
"margin-left: 10rpx;"
class=
"jz_Zailai"
@
click
.
stop=
"AnotherOrder(item)"
>
再来一单
</view>
@
click
.
stop=
"AnotherOrder(item)"
>
再来一单
</view>
...
@@ -77,7 +78,8 @@
...
@@ -77,7 +78,8 @@
:style=
"{'width':!item.remainingSeconds?'150rpx':'auto'}"
:style=
"{'width':!item.remainingSeconds?'150rpx':'auto'}"
:class=
"[item.remainingSeconds?'active':'']"
:class=
"[item.remainingSeconds?'active':'']"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
立即支付
<text
v-if=
"item.remainingSeconds"
style=
"margin-left: 10rpx;"
>
剩余:{{ formatTime(item.remainingSeconds) }}
</text>
立即支付
<!--<text v-if="item.remainingSeconds" style="margin-left: 10rpx;"> 剩余:{{ formatTime(item.remainingSeconds) }}</text>-->
</view>
</view>
<view
v-else
class=
"jz_Zailai"
style=
"margin-left: 10rpx;"
@
click
.
stop=
"AnotherOrder(item)"
>
<view
v-else
class=
"jz_Zailai"
style=
"margin-left: 10rpx;"
@
click
.
stop=
"AnotherOrder(item)"
>
再来一单
</view>
再来一单
</view>
...
@@ -151,9 +153,12 @@
...
@@ -151,9 +153,12 @@
},
},
beforeDestroy
()
{
beforeDestroy
()
{
// 清除所有定时器
// 清除所有定时器
Object
.
values
(
this
.
timers
).
forEach
(
timer
=>
clearInterval
(
timer
))
//
Object.values(this.timers).forEach(timer => clearInterval(timer))
clearInterval
(
this
.
checkInterval
)
//
clearInterval(this.checkInterval)
},
},
onShow
(){
},
mounted
()
{
mounted
()
{
this
.
b2b_user
=
uni
.
getStorageSync
(
"b2b_user"
)
this
.
b2b_user
=
uni
.
getStorageSync
(
"b2b_user"
)
// 全局定时检查(防止极端情况下定时器失效)
// 全局定时检查(防止极端情况下定时器失效)
...
@@ -184,7 +189,7 @@
...
@@ -184,7 +189,7 @@
ConfirmID
:
""
,
ConfirmID
:
""
,
Amount
:
0
,
Amount
:
0
,
};
};
this
.
cancelOrder
(
cancelMsg
)
this
.
cancelOrder
(
cancelMsg
,
1
)
clearInterval
(
null
)
clearInterval
(
null
)
this
.
timers
[
order
.
erpOrderId
]
=
null
this
.
timers
[
order
.
erpOrderId
]
=
null
}
}
...
@@ -212,7 +217,7 @@
...
@@ -212,7 +217,7 @@
ConfirmID
:
""
,
ConfirmID
:
""
,
Amount
:
0
,
Amount
:
0
,
};
};
this
.
cancelOrder
(
cancelMsg
)
this
.
cancelOrder
(
cancelMsg
,
1
)
}
}
})
})
},
},
...
@@ -286,15 +291,17 @@
...
@@ -286,15 +291,17 @@
}
}
})
})
},
},
cancelOrder
(
postMsg
)
{
cancelOrder
(
postMsg
,
type
)
{
this
.
apipost
(
this
.
apipost
(
"post_CancelThirdHotelOrder"
,
postMsg
,
"post_CancelThirdHotelOrder"
,
postMsg
,
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
if
(
!
type
){
title
:
"操作成功"
,
uni
.
showToast
({
icon
:
"success"
,
title
:
"操作成功"
,
});
icon
:
"success"
,
});
}
this
.
$emit
(
'research'
);
this
.
$emit
(
'research'
);
}
}
},
},
...
...
pages/hotel/components/time/index.vue
View file @
96dbc023
...
@@ -775,7 +775,7 @@ export default {
...
@@ -775,7 +775,7 @@ export default {
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
text-align
:
center
;
text-align
:
center
;
margin-left
:
5px
;
margin-left
:
5px
;
margin-right
:
5px
;
/* margin-right: 5px; */
}
}
.section
>
.item
>
.day
>
.day-list
{
.section
>
.item
>
.day
>
.day-list
{
...
...
pages/hotel/detail.vue
View file @
96dbc023
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<!-- #endif -->
<!-- #endif -->
</view>
</view>
<view
style=
"flex: 1; margin-left: 30rpx; text-align: left"
class=
"name-ali"
>
<view
style=
"flex: 1; margin-left: 30rpx; text-align: left"
class=
"name-ali"
>
{{
dataList
.
name
}}
{{
dataList
.
name
?
dataList
.
name
:
''
}}
</view>
</view>
</view>
</view>
<view
class=
"hotel-content"
>
<view
class=
"hotel-content"
>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
style=
""
style=
""
:src=
"dataList.starRating==3?StarImgs[0]:dataList.starRating==4?StarImgs[1]:dataList.starRating==5?StarImgs[2]:StarImgs[3]"
/>
:src=
"dataList.starRating==3?StarImgs[0]:dataList.starRating==4?StarImgs[1]:dataList.starRating==5?StarImgs[2]:StarImgs[3]"
/>
<!--
<text
v-else
class=
"hotel-Economy"
>
经济型
</text>
-->
<!--
<text
v-else
class=
"hotel-Economy"
>
经济型
</text>
-->
{{
dataList
.
name
}}
{{
dataList
.
name
?
dataList
.
name
:
''
}}
</view>
</view>
<view
class=
"hotel-brand"
>
<view
class=
"hotel-brand"
>
{{
dataList
.
brandname
?
dataList
.
brandname
:
''
}}
{{
dataList
.
brandname
?
dataList
.
brandname
:
''
}}
...
@@ -109,14 +109,14 @@
...
@@ -109,14 +109,14 @@
<view
class=
"row"
>
<view
class=
"row"
>
<view
class=
"hotelTime column"
>
<view
class=
"hotelTime column"
>
<text
class=
"hotelTimeTop"
>
入住
</text>
<text
class=
"hotelTimeTop"
>
入住
</text>
<view>
{{
formatMonthDay
(
startDay
)
}}
<view>
{{
formatMonthDay
(
startDay
)
?
formatMonthDay
(
startDay
):
''
}}
<text
<text
style=
"font-weight: 100;color: #080A09;position: relative;top: -15rpx;left: 11rpx;"
>
-
</text>
style=
"font-weight: 100;color: #080A09;position: relative;top: -15rpx;left: 11rpx;"
>
-
</text>
</view>
</view>
</view>
</view>
<view
class=
"hotelTime column"
style=
"padding-left: 22rpx;"
>
<view
class=
"hotelTime column"
style=
"padding-left: 22rpx;"
>
<text
class=
"hotelTimeTop"
>
离开
</text>
<text
class=
"hotelTimeTop"
>
离开
</text>
<view>
{{
formatMonthDay
(
endDay
)
}}
</view>
<view>
{{
formatMonthDay
(
endDay
)
?
formatMonthDay
(
endDay
):
''
}}
</view>
</view>
</view>
</view>
</view>
<view
class=
"hotelTimeEven column"
>
<view
class=
"hotelTimeEven column"
>
...
...
pages/hotel/orderdetails.vue
View file @
96dbc023
...
@@ -323,6 +323,10 @@
...
@@ -323,6 +323,10 @@
beforeDestroy
()
{
beforeDestroy
()
{
this
.
clearInterval
()
this
.
clearInterval
()
},
},
onHide
()
{
// 清除所有定时器
this
.
clearInterval
()
},
created
()
{
created
()
{
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
...
@@ -536,6 +540,7 @@
...
@@ -536,6 +540,7 @@
this
.
orderData
.
directOrder
.
CreateTime
=
this
.
$utils
.
formatDates
(
new
Date
(
tempData
.
directOrder
.
CreateTime
),
'yyyy-MM-dd hh:mm:ss'
)
this
.
orderData
.
directOrder
.
CreateTime
=
this
.
$utils
.
formatDates
(
new
Date
(
tempData
.
directOrder
.
CreateTime
),
'yyyy-MM-dd hh:mm:ss'
)
// 支付倒计时
// 支付倒计时
console
.
log
(
tempData
.
directOrder
.
OrderStatus
,
'--------'
)
if
(
this
.
orderData
.
directOrder
.
CreateTime
&&
tempData
.
directOrder
.
OrderStatus
==
1
)
{
if
(
this
.
orderData
.
directOrder
.
CreateTime
&&
tempData
.
directOrder
.
OrderStatus
==
1
)
{
const
now
=
Date
.
now
();
const
now
=
Date
.
now
();
// const customStr = '2025-05-12 14:33:47'
// const customStr = '2025-05-12 14:33:47'
...
...
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