xuchang-new/src/components/Common/Company/index.jsx
‘937886381’ 379de8fda0 修改
2024-09-18 09:12:26 +08:00

51 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { useEffect, useState, useRef } from 'react';
import TopSide from '../../../assets/TopSide.png';
import LeftLine from '../../../assets/TopTitleLeftIcon.png';
import RightLine from '../../../assets/TopTitleRightIcon.png';
import ButtonLine from '../../../assets/TopButtonLine.png';
import cls from './index.module.scss';
export default function CompanyName() {
const [now, setNow] = useState('2023.07.01 12:00:00');
useEffect(() => {
setInterval(() => {
const now = new Date();
setNow(
now
.toLocaleDateString('zh-hans', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
})
.replaceAll('/', '.'),
);
}, 1000);
}, []);
return (
<div className={cls.TopTitleBoder}>
<img src={TopSide} alt="图片丢失" className={cls.TopSideLeft}/>
<div className={cls.TopSideLeftLine}>
<img src={LeftLine} alt="图片丢失" className={cls.TopSideLeftLineicon}/>
<h2 className={cls.TopSideLeftTxt}>单位河南汇融数字科技有限公司</h2>
</div>
<div>
<h2 className={cls.TopTitleText}>
许昌安彩新能科技&ensp;&ensp;许昌安彩窑炉生产指挥调度中心{' '}
</h2>
<img src={ButtonLine} alt="图片加载错误" className={cls.TopButtonLine}/>
</div>
<div className={cls.TopSideRightLine}>
<h2 className={cls.TopSideRightTxt}>{now}</h2>
<img src={RightLine} alt="图片丢失" className={cls.TopSideRightLineicon}/>
</div>
<img src={TopSide} alt="图片丢失" className={cls.TopSideRight}/>
</div>
);
}