Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
pingan-maruko
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
91bfcc07
authored
Jun 17, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
f7c6d2a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
Public/static/js/common.js
+16
-7
No files found.
Public/static/js/common.js
View file @
91bfcc07
...
@@ -55,7 +55,9 @@ var fireworkLock = false;
...
@@ -55,7 +55,9 @@ var fireworkLock = false;
let
posterCanvas
,
posterCtx
;
let
posterCanvas
,
posterCtx
;
let
scrollTimer
,
showTitleStatus
=
false
;
let
scrollTimer
,
showItemStatus
=
false
,
nowShowIndex
=
1
;
const
guardian
=
[
const
guardian
=
[
'事事顺意守'
,
'事事顺意守'
,
...
@@ -84,7 +86,7 @@ $(document).ready(function () {
...
@@ -84,7 +86,7 @@ $(document).ready(function () {
window
.
scroll
(
0
,
0
);
//失焦后强制让页面归位
window
.
scroll
(
0
,
0
);
//失焦后强制让页面归位
});
});
$
(
'.container'
).
on
(
'scroll'
,
show
Title
)
$
(
'.container'
).
on
(
'scroll'
,
show
Item
)
$
(
'.page1 .btn-next'
).
on
(
'click'
,
toPage2
);
$
(
'.page1 .btn-next'
).
on
(
'click'
,
toPage2
);
$
(
'.page2 .btn-next'
).
on
(
'click'
,
toPage3
);
$
(
'.page2 .btn-next'
).
on
(
'click'
,
toPage3
);
...
@@ -105,8 +107,8 @@ $(document).ready(function () {
...
@@ -105,8 +107,8 @@ $(document).ready(function () {
$
(
'.btn-retry'
).
on
(
'click'
,
retry
)
$
(
'.btn-retry'
).
on
(
'click'
,
retry
)
});
});
function
show
Title
()
{
function
show
Item
()
{
if
(
show
Title
Status
)
{
if
(
show
Item
Status
)
{
return
false
;
return
false
;
}
}
if
(
scrollTimer
!==
null
)
{
if
(
scrollTimer
!==
null
)
{
...
@@ -114,9 +116,16 @@ function showTitle() {
...
@@ -114,9 +116,16 @@ function showTitle() {
}
}
scrollTimer
=
setTimeout
(()
=>
{
scrollTimer
=
setTimeout
(()
=>
{
const
scrollTop
=
$
(
'.container'
).
scrollTop
();
const
scrollTop
=
$
(
'.container'
).
scrollTop
();
if
(
scrollTop
>
700
)
{
const
scrollLeft
=
$
(
'.container'
).
scrollLeft
();
if
(
nowShowIndex
==
1
&&
scrollTop
>
700
)
{
$
(
'.title'
).
show
();
$
(
'.title'
).
show
();
showTitleStatus
=
true
;
nowShowIndex
++
}
else
if
(
nowShowIndex
==
2
&&
scrollLeft
>
380
)
{
$
(
'.toast1'
).
show
();
nowShowIndex
++
}
else
if
(
nowShowIndex
==
3
&&
scrollLeft
>
930
)
{
$
(
'.toast2'
).
show
();
nowShowIndex
++
}
}
},
100
)
},
100
)
}
}
...
@@ -151,7 +160,7 @@ function retry() {
...
@@ -151,7 +160,7 @@ function retry() {
$
(
'.page1'
).
show
();
$
(
'.page1'
).
show
();
fireworkLock
=
false
fireworkLock
=
false
updateWorld
()
updateWorld
()
show
Title
Status
=
false
show
Item
Status
=
false
$
(
'.title'
).
hide
()
$
(
'.title'
).
hide
()
}
}
...
...
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