Skip to content

Commit 12baf9f

Browse files
authored
chore: update menu api and router name (#10)
1 parent 3caf9ff commit 12baf9f

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

apps/web-antd/src/api/menu.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ import { requestClient } from '#/api/request';
66
* 获取用户所有菜单
77
*/
88
export async function getAllMenusApi() {
9-
return requestClient.get<RouteRecordStringComponent[]>('/api/v1/sys/menus');
9+
return requestClient.get<RouteRecordStringComponent[]>(
10+
'/api/v1/sys/menus/sidebar',
11+
);
1012
}

apps/web-antd/src/router/routes/modules/admin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { $t } from '#/locales';
44

55
const routes: RouteRecordRaw[] = [
66
{
7-
name: 'admin',
7+
name: 'Admin',
88
path: '/admin',
99
meta: {
1010
title: $t('page.menu.admin'),

apps/web-antd/src/router/routes/modules/automation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { $t } from '#/locales';
44

55
const routes: RouteRecordRaw[] = [
66
{
7-
name: 'automation',
7+
name: 'Automation',
88
path: '/automation',
99
meta: {
1010
title: $t('page.menu.automation'),

apps/web-antd/src/router/routes/modules/dashboard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { $t } from '#/locales';
44

55
const routes: RouteRecordRaw[] = [
66
{
7-
name: 'dashboard',
8-
path: '/dashboard',
97
meta: {
108
icon: 'lucide:layout-dashboard',
119
order: -1,
1210
title: $t('page.dashboard.title'),
1311
},
12+
name: 'Dashboard',
13+
path: '/dashboard',
1414
children: [
1515
{
1616
name: 'Analytics',

apps/web-antd/src/router/routes/modules/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { $t } from '#/locales';
44

55
const routes: RouteRecordRaw[] = [
66
{
7-
name: 'log',
7+
name: 'Log',
88
path: '/log',
99
meta: {
1010
title: $t('page.menu.log'),

apps/web-antd/src/router/routes/modules/monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { $t } from '#/locales';
44

55
const routes: RouteRecordRaw[] = [
66
{
7-
name: 'monitor',
7+
name: 'Monitor',
88
path: '/monitor',
99
meta: {
1010
title: $t('page.menu.monitor'),

packages/constants/src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const LOGIN_PATH = '/auth/login';
66
/**
77
* @zh_CN 默认首页地址
88
*/
9-
export const DEFAULT_HOME_PATH = '/analytics';
9+
export const DEFAULT_HOME_PATH = '/dashboard/analytics';
1010

1111
export interface LanguageOption {
1212
label: string;

0 commit comments

Comments
 (0)