Commit eb383d9a authored by 杨思琦's avatar 杨思琦

fix: 过度页样式修改

parent 6c0dcac7
Pipeline #62609 waiting for manual action with stages
/* eslint-disable global-require */
// 云平台引导页 // 云平台引导页
import React, { useCallback, useEffect, useMemo, useState } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react';
...@@ -46,6 +47,7 @@ const BootPage = props => { ...@@ -46,6 +47,7 @@ const BootPage = props => {
props.global.title || defaultSetting.title, props.global.title || defaultSetting.title,
); );
// eslint-disable-next-line no-shadow
const handlePage = (event, type, loginAction) => { const handlePage = (event, type, loginAction) => {
setPercentNum(Math.ceil(Math.random() * 50)); setPercentNum(Math.ceil(Math.random() * 50));
setCurrentType(type); setCurrentType(type);
...@@ -55,7 +57,6 @@ const BootPage = props => { ...@@ -55,7 +57,6 @@ const BootPage = props => {
// 新增熊猫新产品引导页 // 新增熊猫新产品引导页
if (type === '熊猫新产品') { if (type === '熊猫新产品') {
setTimeout(() => { setTimeout(() => {
setPercentNum(100); setPercentNum(100);
...@@ -77,7 +78,7 @@ const BootPage = props => { ...@@ -77,7 +78,7 @@ const BootPage = props => {
props.instance && props.instance.updateConfig(config); props.instance && props.instance.updateConfig(config);
// props.instance && props.instance.getUserInfoAndConfig('', true, type); // props.instance && props.instance.getUserInfoAndConfig('', true, type);
loginAction && loginAction.getUserInfoAndConfig('', true, type); loginAction && loginAction.getUserInfoAndConfig('', true, type);
} };
useEffect(() => { useEffect(() => {
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
...@@ -113,8 +114,6 @@ const BootPage = props => { ...@@ -113,8 +114,6 @@ const BootPage = props => {
}; };
}, [loginAction.events, props, currentType]); }, [loginAction.events, props, currentType]);
useEffect(() => { useEffect(() => {
window.share.event.on('visible', ret => { window.share.event.on('visible', ret => {
setTimeout(() => { setTimeout(() => {
...@@ -137,7 +136,6 @@ const BootPage = props => { ...@@ -137,7 +136,6 @@ const BootPage = props => {
// ? props.global.userInfo.Industries.filter(item => !!industries.find(d => d.type === item)).length // ? props.global.userInfo.Industries.filter(item => !!industries.find(d => d.type === item)).length
// : 0` // : 0`
useEffect(() => { useEffect(() => {
appService appService
.getUserInfo({ .getUserInfo({
...@@ -148,12 +146,12 @@ const BootPage = props => { ...@@ -148,12 +146,12 @@ const BootPage = props => {
}) })
.then(res => { .then(res => {
const roles = res?.data?.roles ?? []; const roles = res?.data?.roles ?? [];
const _hasRole = roles && Array.isArray(roles) && roles.filter(r => r.name == '客户运维管理员').length; // eslint-disable-next-line no-underscore-dangle
const _hasRole = roles && Array.isArray(roles) && roles.filter(r => r.name === '客户运维管理员').length;
setHasRole(!!_hasRole); setHasRole(!!_hasRole);
}); });
}, [props.global.token]); }, [props.global.token]);
return ( return (
<div className={styles.bootPage}> <div className={styles.bootPage}>
<div className={styles.bootPageMain}> <div className={styles.bootPageMain}>
...@@ -178,17 +176,18 @@ const BootPage = props => { ...@@ -178,17 +176,18 @@ const BootPage = props => {
left: '300px', left: '300px',
bottom: '105px', bottom: '105px',
opacity: 1, opacity: 1,
width: num === 5 ? 960 : num === 9 || num === 10 ? 1600 : 1280, width: num === 5 ? 960 : num === 9 || num === 10 ? 1600 : 1280,
}} }}
> >
{industries.map( {industries.map(
item => item =>
props.global && props.global &&
Industries.indexOf(item.type) > -1 && Industries.indexOf(item.type) > -1 && (
<li <li
className={styles.bootPageLi} className={styles.bootPageLi}
key={item.type} key={item.type}
onClick={event => handlePage(event, item.type, loginAction)}> onClick={event => handlePage(event, item.type, loginAction)}
>
<div className={styles.bootPageList}> <div className={styles.bootPageList}>
<div className={styles.listMain}> <div className={styles.listMain}>
<img src={require(`@/assets/bootPage/${item.type}.png`)} alt="" /> <img src={require(`@/assets/bootPage/${item.type}.png`)} alt="" />
...@@ -198,7 +197,7 @@ const BootPage = props => { ...@@ -198,7 +197,7 @@ const BootPage = props => {
</div> </div>
{currentType === item.type && ( {currentType === item.type && (
<Progress <Progress
style={{ width: '98%' }} style={{ width: '96%' }}
strokeColor={item.color} strokeColor={item.color}
percent={percentNum} percent={percentNum}
status="active" status="active"
...@@ -207,6 +206,7 @@ const BootPage = props => { ...@@ -207,6 +206,7 @@ const BootPage = props => {
/> />
)} )}
</li> </li>
),
)} )}
</ul> </ul>
</section> </section>
......
...@@ -65,6 +65,15 @@ ...@@ -65,6 +65,15 @@
width: 298px; width: 298px;
height: 268.8px; height: 268.8px;
margin: 10px; margin: 10px;
&:hover {
.listMain {
transform: scale(1.1);
}
.bootProgress {
transform: scale(1.1);
bottom: -14px;
}
}
.bootPageList { .bootPageList {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -77,12 +86,6 @@ ...@@ -77,12 +86,6 @@
font-size: 24px; font-size: 24px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
&:hover {
.listMain {
transform: scale(1.1);
}
}
span { span {
margin-top: 20px; margin-top: 20px;
font-weight: 500; font-weight: 500;
...@@ -171,6 +174,7 @@ ...@@ -171,6 +174,7 @@
} }
.bootProgress { .bootProgress {
transition: all .2s ease-out;
position: absolute; position: absolute;
bottom: -5px; bottom: -5px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment