Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
6 years ago
Commit
73e7d329604fabf339ffb2c5f9444af647b40eb1
1 parent
1c58ae36
定时计划到点自动刷新页面
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
public/js/activity/feature.page.js
public/js/activity/feature.page.js
View file @
73e7d32
...
...
@@ -830,11 +830,14 @@ function activityPlan() {
if
(
atlBo
)
{
let
curTime
=
Math
.
round
(
new
Date
()
/
1000
);
let
showTimes
=
[];
let
planTimes
=
[];
atlBo
=
JSON
.
parse
(
atlBo
);
atlBo
.
forEach
(
t
=>
{
if
(
t
.
showTime
<=
curTime
)
{
showTimes
.
push
(
t
);
}
else
{
planTimes
.
push
(
t
);
}
});
...
...
@@ -842,9 +845,21 @@ function activityPlan() {
return
t
.
showTime
;
});
planTimes
=
planTimes
.
sort
(
t
=>
{
return
-
t
.
showTime
;
});
if
(
showTimes
&&
showTimes
[
0
]
&&
showTimes
[
0
].
templateId
!==
+
templateId
)
{
location
.
reload
();
}
if
(
planTimes
&&
planTimes
[
0
]
&&
planTimes
[
0
].
showTime
)
{
let
time
=
(
planTimes
[
0
].
showTime
-
curTime
)
*
1000
;
let
countDown
=
setTimeout
(
function
()
{
location
.
reload
();
clearTimeout
(
countDown
);
},
time
);
}
}
}
...
...
Please
register
or
login
to post a comment