登录页面修正
This commit is contained in:
parent
4618d989b4
commit
7bde6a3acb
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 77 KiB |
BIN
src/assets/images/hudie2.png
Normal file
BIN
src/assets/images/hudie2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
@ -3,10 +3,12 @@ import type { AppRouteModule } from '/@/router/types';
|
||||
import { LAYOUT } from '/@/router/constant';
|
||||
import { t } from '/@/hooks/web/useI18n';
|
||||
|
||||
//todo 父子路由 与父子组件
|
||||
const dashboard: AppRouteModule = {
|
||||
path: '/dashboard',
|
||||
name: 'Dashboard',
|
||||
component: LAYOUT,
|
||||
//todo 重定向到 仪表板/analysis
|
||||
redirect: '/dashboard/analysis',
|
||||
meta: {
|
||||
orderNo: 10,
|
||||
|
||||
@ -95,6 +95,7 @@ export const useUserStore = defineStore({
|
||||
|
||||
// save token
|
||||
this.setToken(token);
|
||||
//todo 跳转 数据
|
||||
return this.afterLoginAction(goHome);
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
@ -118,6 +119,7 @@ export const useUserStore = defineStore({
|
||||
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
|
||||
permissionStore.setDynamicAddedRoute(true);
|
||||
}
|
||||
// console.log("userInfo",userInfo);
|
||||
goHome && (await router.replace(userInfo?.homePath || PageEnum.BASE_HOME));
|
||||
}
|
||||
return userInfo;
|
||||
|
||||
@ -134,11 +134,13 @@
|
||||
if (!data) return;
|
||||
try {
|
||||
loading.value = true;
|
||||
//todo 登录方法
|
||||
const userInfo = await userStore.login({
|
||||
password: data.password,
|
||||
username: data.account,
|
||||
mode: 'none', //不要默认的错误提示
|
||||
});
|
||||
|
||||
if (userInfo) {
|
||||
notification.success({
|
||||
message: t('sys.login.loginSuccessTitle'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user