Commit 892d621a authored by 程恺文's avatar 程恺文

修改

parent e3c08af6
Pipeline #77998 waiting for manual action with stages
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
"react-infinite-scroll-component": "^6.1.0", "react-infinite-scroll-component": "^6.1.0",
"react-intl": "^3.12.1", "react-intl": "^3.12.1",
"react-redux": "7.0.2", "react-redux": "7.0.2",
"react-reveal": "^1.2.2",
"react-router-config": "^5.1.1", "react-router-config": "^5.1.1",
"react-router-dom": "6.3.0", "react-router-dom": "6.3.0",
"react-use": "^15.3.4", "react-use": "^15.3.4",
......
import React, { forwardRef, useEffect, useRef, useState } from 'react'; import React, { forwardRef, useEffect, useRef, useState } from 'react';
import Zoom from 'react-reveal/Zoom';
import Fade from 'react-reveal/Fade';
import Slide from 'react-reveal/Slide';
import Roll from 'react-reveal/Roll';
import { Modal, Popover, Form, Tooltip } from 'antd'; import { Modal, Popover, Form, Tooltip } from 'antd';
import { Helmet, HelmetProvider } from 'react-helmet-async'; import { Helmet, HelmetProvider } from 'react-helmet-async';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
...@@ -99,6 +102,7 @@ const Login = forwardRef((props, _ref) => { ...@@ -99,6 +102,7 @@ const Login = forwardRef((props, _ref) => {
寻乌润泉大路水厂, 寻乌润泉大路水厂,
永修润泉湖东水厂, 永修润泉湖东水厂,
}); });
const handleSubmit = values => { const handleSubmit = values => {
/* eslint-disable */ /* eslint-disable */
action && action &&
...@@ -208,20 +212,19 @@ const Login = forwardRef((props, _ref) => { ...@@ -208,20 +212,19 @@ const Login = forwardRef((props, _ref) => {
return () => { return () => {
clearInterval(timer); clearInterval(timer);
// clearInterval(timer1) // clearInterval(timer1)
}; };
}, []); }, []);
useEffect(()=>{ useEffect(() => {
if( timeRef.current)clearTimeout(timeRef.current) if (timeRef.current) clearTimeout(timeRef.current);
timeRef.current = setTimeout(() => { timeRef.current = setTimeout(() => {
if(num<15){ if (num < 15) {
setNum(num+1) setNum(num + 1);
}else{ } else {
setNum(0) setNum(0);
} }
}, 5000); }, 5000);
},[num]) }, [num]);
const toLink = () => { const toLink = () => {
window.open('http://gis.panda-water.cn/jiangxi/index.html'); window.open('http://gis.panda-water.cn/jiangxi/index.html');
}; };
...@@ -229,13 +232,14 @@ const Login = forwardRef((props, _ref) => { ...@@ -229,13 +232,14 @@ const Login = forwardRef((props, _ref) => {
form.resetFields(); form.resetFields();
setLoginType(key); setLoginType(key);
}; };
return ( const getBJ = (url) => {
<HelmetProvider> return (
<Helmet> <Slide>
<title>{props.global.title || defaultSetting.title}</title> <div
<meta name="description" content={props.global.title || defaultSetting.title} /> style={{ background: `url(${url}) no-repeat` }}
</Helmet> className={classnames(styles.lvchenglogin, 'lvcheng')}
<div style={{ background: `url(${imgObj[img[num]]}) no-repeat`}} className={classnames(styles.lvchenglogin, 'lvcheng')}> >
<Slide>
<div className={styles['inner-wrapper']}> <div className={styles['inner-wrapper']}>
<div className={styles['title-image-box']}> <div className={styles['title-image-box']}>
<img <img
...@@ -249,41 +253,43 @@ const Login = forwardRef((props, _ref) => { ...@@ -249,41 +253,43 @@ const Login = forwardRef((props, _ref) => {
/> />
<span className={styles['title-name']}>{props.global.title}</span> <span className={styles['title-name']}>{props.global.title}</span>
</div> </div>
<div className={styles['inner-center']}> <Roll>
<Tooltip title="打开网站下载"> <div className={styles['inner-center']}>
<div className={styles.linkBox} onClick={toLink}> <Tooltip title="打开网站下载">
<img style={{ width: '14px', marginRight: '4px' }} src={require('./images/下载.png')} alt="" /> <div className={styles.linkBox} onClick={toLink}>
点击下载APP <img style={{ width: '14px', marginRight: '4px' }} src={require('./images/下载.png')} alt="" />
</div> 点击下载APP
</Tooltip> </div>
</Tooltip>
<div className={styles['welcome-title']}> <div className={styles['welcome-title']}>
<div <div
className={classnames(styles.tabItem, { [styles.tabActive]: loginType === 'OA账号' })} className={classnames(styles.tabItem, { [styles.tabActive]: loginType === 'OA账号' })}
onClick={() => tabChange('OA账号')} onClick={() => tabChange('OA账号')}
> >
OA账号 OA账号
</div>
<div
className={classnames(styles.tabItem, { [styles.tabActive]: loginType === '平台账号' })}
onClick={() => tabChange('平台账号')}
>
平台账号
</div>
</div> </div>
<div <div className={classnames(styles['inner-bg'], styles['login-part'])} ref={loginFormRef}>
className={classnames(styles.tabItem, { [styles.tabActive]: loginType === '平台账号' })} {renderPlatform()}
onClick={() => tabChange('平台账号')}
>
平台账号
</div> </div>
{/* <Popover content={PopOvercontent} title="扫码下载APP" overlayClassName={'popover-style'}>
<img src={qrcodePng} alt="APP" className={styles['qrcode-box']} />
</Popover> */}
</div> </div>
<div className={classnames(styles['inner-bg'], styles['login-part'])} ref={loginFormRef}> </Roll>
{renderPlatform()} </div></Slide>
</div>
{/* <Popover content={PopOvercontent} title="扫码下载APP" overlayClassName={'popover-style'}>
<img src={qrcodePng} alt="APP" className={styles['qrcode-box']} />
</Popover> */}
</div>
</div>
<div className={styles['login-header']}> <div className={styles['login-header']}>
{/* <div className={styles['left-title']}> {/* <div className={styles['left-title']}>
<img src={logoPng} alt='logo' className={styles['logo-png']}/> <img src={logoPng} alt='logo' className={styles['logo-png']}/>
<div className={styles['cn-title']}>南宁市二次供水管理平台</div> <div className={styles['cn-title']}>南宁市二次供水管理平台</div>
</div> */} </div> */}
<div className={styles['right-timebox']}> <div className={styles['right-timebox']}>
<div className={styles['curr-time']}>{dateObj.curTime}</div> <div className={styles['curr-time']}>{dateObj.curTime}</div>
<div className={styles['curr-week-date']}> <div className={styles['curr-week-date']}>
...@@ -297,57 +303,98 @@ const Login = forwardRef((props, _ref) => { ...@@ -297,57 +303,98 @@ const Login = forwardRef((props, _ref) => {
<div ref={sliVerify} /> <div ref={sliVerify} />
</Modal> </Modal>
<div className={styles['lbt']}> <div className={styles['lbt']}>
<div onClick={()=>{ <div
if(num>0){ onClick={() => {
setNum(num-1) if (num > 0) {
}else{ setNum(num - 1);
setNum(15) } else {
} setNum(15);
}}> <img style={{ width: '30px', cursor: 'pointer'}} src={require('./images/左.png')} alt="" /></div> }
}}
>
{' '}
<img style={{ width: '30px', cursor: 'pointer' }} src={require('./images/左.png')} alt="" />
</div>
<div className={styles['divImgAll']}> <div className={styles['divImgAll']}>
<Swiper <Swiper
autoplay={{delay:5000}} autoplay={{ delay: 5000 }}
loop loop
spaceBetween={0} spaceBetween={0}
slidesPerView={13} slidesPerView={13}
onSlideChange={() => console.log('slide change')} onSlideChange={() => console.log('slide change')}
onSwiper={(swiper) => console.log(swiper)} onSwiper={swiper => console.log(swiper)}
style={{ width: 'calc(100% - 320px)', height: '100%' }} style={{ width: 'calc(100% - 320px)', height: '100%' }}
> >
{img.map((v,i)=>{ {img.map((v, i) => {
return <SwiperSlide><div onClick={()=>{ return (
setNum(i) <SwiperSlide>
}} className={styles['divT']} style={{cursor: 'pointer',position: 'relative'}}><img title={v} style={{border:i==num? '2px solid red':'0px',width:i==num? '60px':'60px',height:i==num? '60px':'60px'}} src={require(`./images/江西水投子公司图片/${v}.png`)} alt="" /> <div
<div style={{ position: 'absolute', overflow: 'hidden', onClick={() => {
setNum(i);
whiteSpace: 'nowrap', }}
color:'white', className={styles['divT']}
textOverflow: 'ellipsis', style={{ cursor: 'pointer', position: 'relative' }}
top: '41px', >
width: '60px', <img
fontSize: '12px', title={v}
textAlign:'center' style={{
border: i == num ? '2px solid #FFDFA0' : '0px',
}}> width: i == num ? '60px' : '60px',
{v.substring(0,4)} height: i == num ? '60px' : '60px',
}}
</div> src={require(`./images/江西水投子公司图片/${v}.png`)}
alt=""
</div></SwiperSlide> />
})} <div
</Swiper> style={{
position: 'absolute',
overflow: 'hidden',
whiteSpace: 'nowrap',
color: 'white',
textOverflow: 'ellipsis',
top: '41px',
width: '60px',
fontSize: '12px',
textAlign: 'center',
background: 'rgba(0,0,0,0.4)',
// opacity: 0.4
}}
>
{v.indexOf('景德镇')>-1?'景德镇':v.substring(0, 4)}
</div>
</div>
</SwiperSlide>
);
})}
</Swiper>
</div>
<div
onClick={() => {
if (num < 15) {
setNum(num + 1);
} else {
setNum(0);
}
}}
>
{' '}
<img style={{ width: '30px', cursor: 'pointer' }} src={require('./images/右.png')} alt="" />
</div> </div>
<div onClick={()=>{
if(num<15){
setNum(num+1)
}else{
setNum(0)
}
}}> <img style={{ width: '30px', cursor: 'pointer' }} src={require('./images/右.png')} alt="" /></div>
</div> </div>
</div> </div>
</Slide>
);
};
return (
<HelmetProvider>
<Helmet>
<title>{props.global.title || defaultSetting.title}</title>
<meta name="description" content={props.global.title || defaultSetting.title} />
</Helmet>
{getBJ(imgObj[img[num]])}
</HelmetProvider> </HelmetProvider>
); );
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
width: 100vw; width: 100vw;
height: 82px; height: 82px;
background-color: rgba(0,0,0,0.4); background-color: rgba(0,0,0,0.4);
border: 1px solid #000000; // border: 1px solid #000000;
/// opacity: 0.6; /// opacity: 0.6;
position: absolute; position: absolute;
/* top: 10px; */ /* top: 10px; */
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
// box-shadow: 0px 15px 15px 3px rgba(140,142,145,0.52); // box-shadow: 0px 15px 15px 3px rgba(140,142,145,0.52);
border-radius: 10px; border-radius: 10px;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
border-radius: 15px 15px 0px 15px; border-radius: 15px 15px 15px 15px;
box-shadow: 0px 6px 18px 0px rgb(25 61 79 / 35%); box-shadow: 0px 6px 18px 0px rgb(25 61 79 / 35%);
padding: 20px 0; padding: 20px 0;
top: -57px; top: -57px;
...@@ -146,7 +146,8 @@ ...@@ -146,7 +146,8 @@
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: white; // color: white;
color: #838383;
margin-left: 15px; margin-left: 15px;
} }
...@@ -197,7 +198,7 @@ ...@@ -197,7 +198,7 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
box-shadow: 0px 1px 3px 0px rgba(235, 235, 235, 0.55); // box-shadow: 0px 1px 3px 0px rgba(235, 235, 235, 0.55);
.left-title { .left-title {
display: flex; display: flex;
......
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