Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
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
ReactWeb5
CivWeb
Commits
c9309ca6
Commit
c9309ca6
authored
1 year ago
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过渡页修改
parent
7d68ad6c
Pipeline
#84707
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
index.js
src/pages/bootpage/panda/index.js
+8
-2
No files found.
src/pages/bootpage/panda/index.js
View file @
c9309ca6
...
...
@@ -38,7 +38,7 @@ const BootPage = props => {
const
[
percentBottom
,
setPercentBottom
]
=
useState
(
-
40
);
const
[
percentNum
,
setPercentNum
]
=
useState
(
0
);
const
[
currentType
,
setCurrentType
]
=
useState
(
''
);
//
const [loadding, setLoadding] = useState(false);
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
hasRole
,
setHasRole
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
[
loginAction
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
props
));
...
...
@@ -53,7 +53,9 @@ const BootPage = props => {
},
[
percentNum
]);
// eslint-disable-next-line no-shadow
const
handlePage
=
(
event
,
type
,
loginAction
)
=>
{
if
(
loadding
)
return
;
let
count
=
1
;
setLoadding
(
true
);
setPercentBottom
(
-
40
+
Math
.
ceil
(
Math
.
random
()
*
8
*
count
));
setPercentNum
(
Math
.
ceil
(
Math
.
random
()
*
10
));
setCurrentType
(
type
);
...
...
@@ -65,18 +67,20 @@ const BootPage = props => {
const
perBottom
=
-
40
+
8
*
count
+
Math
.
ceil
(
Math
.
random
()
*
8
);
const
perNum
=
10
*
count
+
Math
.
ceil
(
Math
.
random
()
*
10
);
if
(
perNum
>=
80
||
dataRef
.
current
>=
80
||
count
===
10
)
{
setLoadding
(
false
);
return
clearInterval
(
process
.
current
);
}
setPercentBottom
(
perBottom
);
setPercentNum
(
perNum
);
count
+=
1
;
},
0
);
},
3
000
);
},
2
000
);
// 新增熊猫新产品引导页
if
(
type
===
'熊猫新产品'
)
{
setTimeout
(()
=>
{
setPercentBottom
(
40
);
setPercentNum
(
100
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
props
.
history
.
push
(
'/cloud/introduction/newproducts'
);
...
...
@@ -115,6 +119,7 @@ const BootPage = props => {
const
handleToggleIndustry
=
event
=>
{
setPercentBottom
(
38
);
setPercentNum
(
98
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
...
...
@@ -138,6 +143,7 @@ const BootPage = props => {
setTimeout
(()
=>
{
setPercentBottom
(
40
);
setPercentNum
(
100
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
window
.
history
.
pushState
(
null
,
''
,
ret
);
...
...
This diff is collapsed.
Click to expand it.
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