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

修改

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