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
Jan 25, 2024
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过渡页修改
parent
7d68ad6c
Pipeline
#84707
passed with stages
Changes
1
Pipelines
1
Show 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 => {
...
@@ -38,7 +38,7 @@ const BootPage = props => {
const
[
percentBottom
,
setPercentBottom
]
=
useState
(
-
40
);
const
[
percentBottom
,
setPercentBottom
]
=
useState
(
-
40
);
const
[
percentNum
,
setPercentNum
]
=
useState
(
0
);
const
[
percentNum
,
setPercentNum
]
=
useState
(
0
);
const
[
currentType
,
setCurrentType
]
=
useState
(
''
);
const
[
currentType
,
setCurrentType
]
=
useState
(
''
);
//
const [loadding, setLoadding] = useState(false);
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
hasRole
,
setHasRole
]
=
useState
(
false
);
const
[
hasRole
,
setHasRole
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
[
loginAction
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
props
));
const
[
loginAction
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
props
));
...
@@ -53,7 +53,9 @@ const BootPage = props => {
...
@@ -53,7 +53,9 @@ const BootPage = props => {
},
[
percentNum
]);
},
[
percentNum
]);
// eslint-disable-next-line no-shadow
// eslint-disable-next-line no-shadow
const
handlePage
=
(
event
,
type
,
loginAction
)
=>
{
const
handlePage
=
(
event
,
type
,
loginAction
)
=>
{
if
(
loadding
)
return
;
let
count
=
1
;
let
count
=
1
;
setLoadding
(
true
);
setPercentBottom
(
-
40
+
Math
.
ceil
(
Math
.
random
()
*
8
*
count
));
setPercentBottom
(
-
40
+
Math
.
ceil
(
Math
.
random
()
*
8
*
count
));
setPercentNum
(
Math
.
ceil
(
Math
.
random
()
*
10
));
setPercentNum
(
Math
.
ceil
(
Math
.
random
()
*
10
));
setCurrentType
(
type
);
setCurrentType
(
type
);
...
@@ -65,18 +67,20 @@ const BootPage = props => {
...
@@ -65,18 +67,20 @@ const BootPage = props => {
const
perBottom
=
-
40
+
8
*
count
+
Math
.
ceil
(
Math
.
random
()
*
8
);
const
perBottom
=
-
40
+
8
*
count
+
Math
.
ceil
(
Math
.
random
()
*
8
);
const
perNum
=
10
*
count
+
Math
.
ceil
(
Math
.
random
()
*
10
);
const
perNum
=
10
*
count
+
Math
.
ceil
(
Math
.
random
()
*
10
);
if
(
perNum
>=
80
||
dataRef
.
current
>=
80
||
count
===
10
)
{
if
(
perNum
>=
80
||
dataRef
.
current
>=
80
||
count
===
10
)
{
setLoadding
(
false
);
return
clearInterval
(
process
.
current
);
return
clearInterval
(
process
.
current
);
}
}
setPercentBottom
(
perBottom
);
setPercentBottom
(
perBottom
);
setPercentNum
(
perNum
);
setPercentNum
(
perNum
);
count
+=
1
;
count
+=
1
;
},
0
);
},
0
);
},
3
000
);
},
2
000
);
// 新增熊猫新产品引导页
// 新增熊猫新产品引导页
if
(
type
===
'熊猫新产品'
)
{
if
(
type
===
'熊猫新产品'
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
setPercentBottom
(
40
);
setPercentBottom
(
40
);
setPercentNum
(
100
);
setPercentNum
(
100
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
props
.
history
.
push
(
'/cloud/introduction/newproducts'
);
props
.
history
.
push
(
'/cloud/introduction/newproducts'
);
...
@@ -115,6 +119,7 @@ const BootPage = props => {
...
@@ -115,6 +119,7 @@ const BootPage = props => {
const
handleToggleIndustry
=
event
=>
{
const
handleToggleIndustry
=
event
=>
{
setPercentBottom
(
38
);
setPercentBottom
(
38
);
setPercentNum
(
98
);
setPercentNum
(
98
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
...
@@ -138,6 +143,7 @@ const BootPage = props => {
...
@@ -138,6 +143,7 @@ const BootPage = props => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
setPercentBottom
(
40
);
setPercentBottom
(
40
);
setPercentNum
(
100
);
setPercentNum
(
100
);
setLoadding
(
false
);
clearInterval
(
process
.
current
);
clearInterval
(
process
.
current
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
window
.
history
.
pushState
(
null
,
''
,
ret
);
window
.
history
.
pushState
(
null
,
''
,
ret
);
...
...
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