chore(web): 收口前几轮后台改动(品牌 / 媒资上传 / 轮播图 / 类型管理 / 操作日志 / App 用户)
为什么:这些改动在前几轮就已完成并在 :3005 验证过,但一直留在工作区没有入库。 下一步 3-4 的四个页面依赖其中的公共样式入口(src/styles/business/index.css)与 api/admin 的公共类型(PageResult 等),如果不先收口,新页面的提交就会夹带旧改动, 既说不清 diff 边界,也让 index.css 这类多轮共用的文件长期处于半提交状态。 本提交只做归档,不改行为: - 品牌与接口基址改成 FruitShorts / 短剧服务(.env.*、README、vite 代理) - 去掉前端 mock 数据目录(src/data、src/permissions、stores/auth),改为走真实接口 - 新增 api/admin 下的接口封装与 src/utils/uploader.ts(媒资分片直传) - 新增/改造:轮播图管理、类型管理、操作日志、App 用户管理、后台布局与公共样式
This commit is contained in:
1 parent
40546bfd01
commit
44c2c46a68
59 files changed
+4082
-982
No files matched your search
+45
-34
@@ -2,7 +2,6 @@ import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import type { App } from 'vue'
|
||||
import { Layout } from '@/utils/routerHelper'
|
||||
import { customMenus } from '@/data/customMenus'
|
||||
|
||||
export const constantRouterMap: AppRouteRecordRaw[] = [
|
||||
{
|
||||
@@ -102,6 +101,43 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
|
||||
meta: {
|
||||
title: '剧集管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'banners',
|
||||
name: 'banners',
|
||||
component: () => import('@/views/contentManagement/BannerManagementView.vue'),
|
||||
meta: {
|
||||
title: '轮播图管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'categories',
|
||||
name: 'categories',
|
||||
component: () => import('@/views/contentManagement/CategoryManagementView.vue'),
|
||||
meta: {
|
||||
title: '类型管理'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
redirect: '/user/app-users',
|
||||
name: 'UserCenter',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
icon: 'ep:user',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'app-users',
|
||||
name: 'app-users',
|
||||
component: () => import('@/views/userManagement/AppUsersView.vue'),
|
||||
meta: {
|
||||
title: 'App 用户'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -155,42 +191,19 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
|
||||
meta: {
|
||||
title: '系统设置'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'operation-logs',
|
||||
name: 'operation-logs',
|
||||
component: () => import('@/views/systemManagement/OperationLogView.vue'),
|
||||
meta: {
|
||||
title: '操作日志'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
export function registerCustomMenu(menu: {
|
||||
key: string
|
||||
title: string
|
||||
route?: string
|
||||
type?: string
|
||||
}) {
|
||||
const name = `custom-menu-${menu.key}`
|
||||
if (router.hasRoute(name)) return
|
||||
if (menu.type === '按钮') return
|
||||
const path = `/${String(menu.route || `custom/${menu.key}`).replace(/^\/+/, '')}`
|
||||
router.addRoute({
|
||||
path,
|
||||
name,
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: menu.title,
|
||||
hidden: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: `${name}-page`,
|
||||
component: () => import('@/views/permission/CustomMenuView.vue'),
|
||||
meta: {
|
||||
title: menu.title
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
strict: true,
|
||||
@@ -198,8 +211,6 @@ const router = createRouter({
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
})
|
||||
|
||||
customMenus.forEach(registerCustomMenu)
|
||||
|
||||
export const resetRouter = (): void => {
|
||||
const resetWhiteNameList = ['Redirect', 'RedirectParent', 'Login', 'NoFind', 'Root']
|
||||
router.getRoutes().forEach((route) => {
|
||||
|
||||
Reference in new issue
Block a user