refactor: 清理站内导航死代码 (删除孤立NavigationPage组件+navigationApi+导航mock数据)
- 删除 frontend/src/components/navigation/NavigationPage.tsx (359行, 菜单/路由移除后遗留的孤立组件) - 移除 services/api.ts 中 navigationApi (唯一消费者已删除) - 移除 mocks/modules/misc.ts 中 navigationGroups/navigationLinks 死数据 (252行) - 清理 mocks/data.ts barrel 中导航 re-export - 修正 cloud.ts 误导性注释 (站内导航→云平台/账号/区域/域名数据) - 后端 navigation.go 保留不动 (菜单已移除但后端代码保留) - tsc --noEmit 零错误 + npm run build 通过
This commit is contained in:
1 parent
9af0890bc6
commit
d13f5b8fa1
5 files changed
+2
-646
No files matched your search
@@ -376,37 +376,6 @@ export const approvalApi = {
|
||||
},
|
||||
};
|
||||
|
||||
// ==================== 导航管理 API ====================
|
||||
export const navigationApi = {
|
||||
getGroups: async () => {
|
||||
return http.get('/navigations/groups');
|
||||
},
|
||||
createGroup: async (data: any) => {
|
||||
return http.post('/navigations/groups', data);
|
||||
},
|
||||
updateGroup: async (id: number | string, data: any) => {
|
||||
return http.put(`/navigations/groups/${id}`, data);
|
||||
},
|
||||
deleteGroup: async (id: number | string) => {
|
||||
return http.delete(`/navigations/groups/${id}`);
|
||||
},
|
||||
getLinks: async () => {
|
||||
return http.get('/navigations/links');
|
||||
},
|
||||
createLink: async (data: any) => {
|
||||
return http.post('/navigations/links', data);
|
||||
},
|
||||
updateLink: async (id: number | string, data: any) => {
|
||||
return http.put(`/navigations/links/${id}`, data);
|
||||
},
|
||||
deleteLink: async (id: number | string) => {
|
||||
return http.delete(`/navigations/links/${id}`);
|
||||
},
|
||||
toggleFavorite: async (id: number | string) => {
|
||||
return http.post(`/navigations/links/${id}/favorite`);
|
||||
},
|
||||
};
|
||||
|
||||
// ==================== 云管理 API ====================
|
||||
export const cloudApi = {
|
||||
getAccounts: async () => {
|
||||
|
||||
Reference in new issue
Block a user