| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2025-01-17 20:05:00 |
| 4 | * @LastEditTime: 2025-02-25 19:25:33 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: 登录页 |
| 7 | */ |
| 8 | import styles from './login.module.scss'; |
| 9 | import { LoginCore } from '@/views/login/components/LoginCore'; |
| 10 | import { useEffect } from 'react'; |
| 11 | import { useNavigate } from 'react-router-dom'; |
| 12 | import { useUserStore } from '@/store/user'; |
| 13 | import platformSvg from './svgs/icon-platform.svg'; |
| 14 | import accountSvg from './svgs/icon-account.svg'; |
| 15 | import mediaSvg from './svgs/icon-media.svg'; |
| 16 | import logo from '@/assets/logo.png'; |
| 17 | import Windowcontrolbuttons from '../../components/WindowControlButtons/WindowControlButtons'; |
| 18 | |
| 19 | const Login = () => { |
| 20 | const features = [ |
| 21 | { |
| 22 | title: '一键分发多个自媒体平台', |
| 23 | description: '支持图文、视频、动态一键发送至多个平台', |
| 24 | icon: platformSvg, |
| 25 | }, |
| 26 | { |
| 27 | title: '1000+账号,多账号同步管理', |
| 28 | description: |
| 29 | '轻松管理1000+自媒体账号,分组管理,内容自动提醒,一键检测状态', |
| 30 | icon: accountSvg, |
| 31 | }, |
| 32 | { |
| 33 | title: '媒体多开,实现一站式平台内操作', |
| 34 | description: '无需手动切换登录账号,一站式完成平台内操作', |
| 35 | icon: mediaSvg, |
| 36 | }, |
| 37 | ]; |
| 38 | const navigate = useNavigate(); |
| 39 | const userStore = useUserStore(); |
| 40 | |
| 41 | useEffect(() => { |
| 42 | if (userStore.token) { |
| 43 | navigate('/'); |
| 44 | } |
| 45 | }, []); |
| 46 | |
| 47 | return ( |
| 48 | <div className={`${styles.login}`}> |
| 49 | <div className="login-navbar"> |
| 50 | <div className="login-navbar-darg" /> |
| 51 | <Windowcontrolbuttons /> |
| 52 | </div> |
| 53 | |
| 54 | <div className={`${styles.login_wrap} ${styles.login_left}`}> |
| 55 | <div className={styles.login_left_top}> |
| 56 | <img src={logo} alt="logo" width={80} /> |
| 57 | </div> |
| 58 | <ul className={styles.login_left_texts}> |
| 59 | {features.map((v) => { |
| 60 | return ( |
| 61 | <li key={v.title}> |
| 62 | <div className={styles.login_left_texts_svg}> |
| 63 | <img src={v.icon} alt="icon" /> |
| 64 | </div> |
| 65 | <div className={styles.login_left_text}> |
| 66 | <strong>{v.title}</strong> |
| 67 | <p>{v.description}</p> |
| 68 | </div> |
| 69 | </li> |
| 70 | ); |
| 71 | })} |
| 72 | </ul> |
| 73 | </div> |
| 74 | <div className={styles.login_wrap}> |
| 75 | <LoginCore /> |
| 76 | </div> |
| 77 | </div> |
| 78 | ); |
| 79 | }; |
| 80 | |
| 81 | export default Login; |
| 82 |