新增:新增上传头像 API,采用本地存储方式存储头像

This commit is contained in:
2023-01-05 22:32:23 +08:00
parent e77c77419b
commit 5252c54c48
54 changed files with 931 additions and 937 deletions

View File

@@ -13,7 +13,7 @@ export default function setupUserLoginInfoGuard(router: Router) {
next();
} else {
try {
await loginStore.info();
await loginStore.getInfo();
next();
} catch (error) {
await loginStore.logout();

View File

@@ -2,7 +2,7 @@ import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
const USER: AppRouteRecordRaw = {
path: '/user',
path: '/system/user',
name: 'user',
component: DEFAULT_LAYOUT,
meta: {
@@ -13,21 +13,11 @@ const USER: AppRouteRecordRaw = {
},
children: [
{
path: 'info',
name: 'Info',
component: () => import('@/views/user/info/index.vue'),
path: 'center',
name: 'UserCenter',
component: () => import('@/views/system/user/center/index.vue'),
meta: {
locale: 'menu.user.info',
requiresAuth: true,
roles: ['*'],
},
},
{
path: 'setting',
name: 'Setting',
component: () => import('@/views/user/setting/index.vue'),
meta: {
locale: 'menu.user.setting',
locale: 'menu.user.center',
requiresAuth: true,
roles: ['*'],
},