diff --git a/src/page/Login/index.module.scss b/src/page/Login/index.module.scss index df56c51..e6c1305 100644 --- a/src/page/Login/index.module.scss +++ b/src/page/Login/index.module.scss @@ -129,7 +129,7 @@ flex-shrink: 0; color: #ccc; text-align: right; - font-size: 16px; + font-size: 14px; } } } diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index 03d9011..92dd562 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -11,6 +11,7 @@ import { v4 as uuidv4 } from 'uuid'; import { GetCheckoutRoomNum, GetRoomInfo, GetRoomRtcToken } from '@/api/Home/Index'; import { ExclamationCircleFilled } from '@ant-design/icons'; import { isVersion } from '@/utils/package/public'; +import dayjs from 'dayjs'; const { confirm } = Modal; const Login: React.FC = () => { const navigate = useNavigate(); @@ -39,6 +40,7 @@ const Login: React.FC = () => { nickName: '', roomNum: '', }) + const [buildTime, setBuildTime] = useState('0') const [nameModal, setNameModal] = useState(false) const [env, setEnv] = useState('') useEffect(() => { @@ -50,6 +52,13 @@ const Login: React.FC = () => { window.electron.getEnv().then(res => { setEnv(res) }) + try { + const buildStr = document.getElementById('build-time')?.getAttribute('content'); + const formattedTime = dayjs(Number(buildStr)).format('YYYYMMDDHHmm'); + setBuildTime(formattedTime) + } catch { + + } if (storage.getItem('login')) { const login = JSON.parse(storage.getItem('login') as string); const data = { @@ -319,7 +328,8 @@ const Login: React.FC = () => { >
- 版本号:{version} + V{version}- + {buildTime}