feat: 登录页面

This commit is contained in:
renxiaodong
2025-06-20 06:10:15 -04:00
parent 1641320847
commit 54f620d92f
12 changed files with 328 additions and 287 deletions

29
src/utils/user.ts Normal file
View File

@ -0,0 +1,29 @@
/*
* @Author: RenXiaoDong
* @Date: 2025-06-20 05:32:19
*/
import router from '@/router';
import { useUserStore } from '@/stores';
// 登录
export function goUserLogin(query?: any) {
router.push({ name: 'UserLogin', query });
}
// 登录处理
export async function handleUserLogin() {
handleUserHome();
}
// 首页
export function handleUserHome() {
router.push({ name: 'Home' });
}
export function handleUserLogout() {
const userStore = useUserStore();
userStore.deleteToken();
goUserLogin();
}