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
e1420a1b
Commit
e1420a1b
authored
Feb 05, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应急预案处理
parent
08764e75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+24
-6
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
e1420a1b
...
@@ -389,6 +389,10 @@ export default {
...
@@ -389,6 +389,10 @@ export default {
longitude
longitude
}
}
this
.
scenicList
=
[]
this
.
scenicList
=
[]
// 获取当前时间戳
let
currentTime
=
Date
.
now
()
// 设置需要添加的分钟数
let
minutesToAdd
=
5
// 这里假设要添加5分钟
this
.
$request
(
'/scenic/groupGood/findGroupGoodProductList'
,
data
).
then
(
res
=>
{
this
.
$request
(
'/scenic/groupGood/findGroupGoodProductList'
,
data
).
then
(
res
=>
{
uni
.
removeStorageSync
(
'newTimestamp'
)
uni
.
removeStorageSync
(
'newTimestamp'
)
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
...
@@ -439,13 +443,27 @@ export default {
...
@@ -439,13 +443,27 @@ export default {
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
'none'
icon
:
'none'
})
})
if
(
res
.
code
==
'100'
){
//系统性能接近瓶颈,关闭请求
this
.
showTip
=
true
// 当前时间加上添加分钟数
let
timestamp1
=
currentTime
+
(
minutesToAdd
*
60
*
1000
)
//后端返回的时间
let
timestamp2
=
Date
.
parse
(
JSON
.
parse
(
res
.
message
).
stopTime
)
let
newTimestamp
=
''
if
(
currentTime
>
timestamp2
){
//当前时间大于后端返回时间,以当前时间加上分钟数为准
newTimestamp
=
timestamp1
}
if
(
currentTime
<=
timestamp2
){
//当前时间小于等于后端返回时间,取后端返回时间和当前时间加上的分钟数的最小值
newTimestamp
=
Math
.
min
(
timestamp1
,
timestamp2
)
}
uni
.
setStorageSync
(
'newTimestamp'
,
newTimestamp
)
}
}
}
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
this
.
showTip
=
true
this
.
showTip
=
true
// 获取当前时间戳
let
currentTime
=
Date
.
now
()
// 设置需要添加的分钟数
let
minutesToAdd
=
5
// 这里假设要添加5分钟
// 计算新的时间戳
// 计算新的时间戳
let
newTimestamp
=
currentTime
+
(
minutesToAdd
*
60
*
1000
)
let
newTimestamp
=
currentTime
+
(
minutesToAdd
*
60
*
1000
)
uni
.
setStorageSync
(
'newTimestamp'
,
newTimestamp
)
uni
.
setStorageSync
(
'newTimestamp'
,
newTimestamp
)
...
...
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