mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-10 17:27:22 +08:00
初始化admin pc端
This commit is contained in:
55
admin/src/router/index.ts
Normal file
55
admin/src/router/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
|
||||
import workbench from '@/views/workbench/index.vue'
|
||||
import Layout from '@/layout/index.vue'
|
||||
import Error404 from '@/views/error/404.vue'
|
||||
import Error500 from '@/views/error/500.vue'
|
||||
// Router modules
|
||||
import setting from './modules/setting'
|
||||
import permission from './modules/permission'
|
||||
import decoration from './modules/decoration'
|
||||
import content from './modules/content'
|
||||
import channel from './modules/channel'
|
||||
import application from './modules/application'
|
||||
export const asyncRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: 'workbench',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/workbench',
|
||||
component: workbench,
|
||||
meta: { title: '工作台', icon: 'icon-home', permission: ['view'] }
|
||||
},
|
||||
decoration, // 装修管理
|
||||
application,// 应用管理
|
||||
content, // 内容管理
|
||||
channel, // 渠道管理
|
||||
permission,
|
||||
setting
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
export const constRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/account/login.vue')
|
||||
},
|
||||
{
|
||||
path: '/error/500',
|
||||
component: Error500
|
||||
},
|
||||
{ path: '/:pathMatch(.*)*', name: '404', component: Error404 }
|
||||
]
|
||||
|
||||
export const getAsyncRoutes = () => {
|
||||
return asyncRoutes
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [...asyncRoutes, ...constRoutes]
|
||||
})
|
||||
|
||||
export default router
|
||||
40
admin/src/router/modules/application.ts
Normal file
40
admin/src/router/modules/application.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { RouteRecordRaw, RouterView } from 'vue-router'
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/application',
|
||||
redirect: '/application/notification',
|
||||
component: RouterView,
|
||||
meta: { title: '应用管理', icon: 'icon-setting' },
|
||||
children: [
|
||||
{
|
||||
path: '/application/notification',
|
||||
redirect: '/application/notification/index',
|
||||
component: RouterView,
|
||||
meta: { title: '消息通知' },
|
||||
children: [
|
||||
{
|
||||
path: '/application/notification/index',
|
||||
component: () => import('@/views/application/notification/index.vue'),
|
||||
meta: { title: '通知设置', permission: ['view'] },
|
||||
},
|
||||
{
|
||||
path: '/application/notification/detail',
|
||||
component: () => import('@/views/application/notification/detail.vue'),
|
||||
meta: { hidden: true, title: '通知设置', permission: ['view'] },
|
||||
},
|
||||
{
|
||||
path: '/application/sms/index',
|
||||
component: () => import('@/views/application/sms/index.vue'),
|
||||
meta: { title: '短信设置', permission: ['view'] },
|
||||
},
|
||||
{
|
||||
path: '/application/sms/detail',
|
||||
component: () => import('@/views/application/sms/detail.vue'),
|
||||
meta: { hidden: true, title: '短信设置', permission: ['view'] },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default routes
|
||||
106
admin/src/router/modules/channel.ts
Normal file
106
admin/src/router/modules/channel.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import { RouteRecordRaw, RouterView } from "vue-router"
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/channel',
|
||||
name: 'channel',
|
||||
meta: { title: '渠道管理', icon: 'icon-setting' },
|
||||
component: RouterView,
|
||||
children: [{
|
||||
path: '/channel/mp_wechat',
|
||||
name: 'mp_wechat',
|
||||
meta: {
|
||||
title: '微信公众号',
|
||||
parentPath: '/channel',
|
||||
},
|
||||
component: RouterView,
|
||||
children: [{
|
||||
path: '/channel/mp_wechat/index',
|
||||
name: 'mp_wechat_index',
|
||||
meta: {
|
||||
title: '渠道设置',
|
||||
parentPath: '/channel',
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/index.vue'),
|
||||
}, {
|
||||
path: '/channel/mp_wechat/menu',
|
||||
name: 'mp_wechat_menu',
|
||||
meta: {
|
||||
title: '菜单管理',
|
||||
parentPath: '/channel',
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/menu.vue'),
|
||||
}, {
|
||||
path: '/channel/mp_wechat/reply/follow_reply',
|
||||
name: 'follow_reply',
|
||||
meta: {
|
||||
title: '关注回复',
|
||||
parentPath: '/channel',
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/reply/follow_reply.vue'),
|
||||
}, {
|
||||
path: '/channel/mp_wechat/reply/keyword_reply',
|
||||
name: 'keyword_reply',
|
||||
meta: {
|
||||
title: '关键字回复',
|
||||
parentPath: '/channel',
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/reply/keyword_reply.vue'),
|
||||
}, {
|
||||
path: '/channel/mp_wechat/reply/default_reply',
|
||||
name: 'default_reply',
|
||||
meta: {
|
||||
title: '默认回复',
|
||||
parentPath: '/channel',
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/reply/default_reply.vue'),
|
||||
}, {
|
||||
path: '/channel/mp_wechat/reply/reply_edit',
|
||||
name: 'reply_edit',
|
||||
meta: {
|
||||
title: '默认编辑',
|
||||
parentPath: '/channel',
|
||||
hidden: true,
|
||||
permission: ['view']
|
||||
},
|
||||
component: () => import('@/views/channel/mp_wechat/reply/reply_edit.vue'),
|
||||
}]
|
||||
}, {
|
||||
path: '/channel/wechat_app',
|
||||
name: 'wechat_app',
|
||||
meta: {
|
||||
title: '微信小程序',
|
||||
parentPath: '/channel'
|
||||
},
|
||||
component: () => import('@/views/channel/wechat_app/index.vue')
|
||||
}, {
|
||||
path: '/channel/app_store',
|
||||
name: 'app_store',
|
||||
meta: {
|
||||
title: 'APP',
|
||||
parentPath: '/channel',
|
||||
},
|
||||
component: () => import('@/views/channel/app_store/index.vue'),
|
||||
}, {
|
||||
path: '/channel/h5_store',
|
||||
name: 'h5_store',
|
||||
meta: {
|
||||
title: 'H5',
|
||||
parentPath: '/channel',
|
||||
},
|
||||
component: () => import('@/views/channel/h5_store/index.vue')
|
||||
}, {
|
||||
path: '/wechat/wechat_platform',
|
||||
name: 'wechat_platform',
|
||||
meta: {
|
||||
title: '微信开放平台',
|
||||
parentPath: '/channel',
|
||||
},
|
||||
component: () => import('@/views/channel/wechat_platform/index.vue')
|
||||
}]
|
||||
}
|
||||
|
||||
export default routes
|
||||
66
admin/src/router/modules/content.ts
Normal file
66
admin/src/router/modules/content.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { RouteRecordRaw, RouterView } from 'vue-router'
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/content',
|
||||
redirect: '/content/advertising',
|
||||
component: RouterView,
|
||||
meta: { title: '内容管理', icon: 'icon-setting' },
|
||||
children: [
|
||||
// {
|
||||
// path: '/content/advertising',
|
||||
// redirect: '/content/advertising/lists',
|
||||
// component: RouterView,
|
||||
// meta: { title: '广告管理' },
|
||||
// children: [
|
||||
// {
|
||||
// path: '/content/advertising/lists',
|
||||
// component: () => import('@/views/content/advertising/advertising.vue'),
|
||||
// meta: { title: '广告列表' },
|
||||
// },
|
||||
// {
|
||||
// path: '/content/advertising/advertising_edit',
|
||||
// component: () => import('@/views/decoration/advertising_edit.vue'),
|
||||
// meta: {
|
||||
// title: '广告列表',
|
||||
// parent: '/content/advertising/lists',
|
||||
// hidden: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: '/content/advertising/position',
|
||||
// component: () => import('@/views/content/advertising/position.vue'),
|
||||
// meta: { title: '广告位' },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
path: '/content/information',
|
||||
redirect: '/content/information/lists',
|
||||
component: RouterView,
|
||||
meta: { title: '资讯管理' },
|
||||
children: [
|
||||
{
|
||||
path: '/content/information/lists',
|
||||
component: () => import('@/views/content/information/lists.vue'),
|
||||
meta: { title: '资讯列表' },
|
||||
},
|
||||
{
|
||||
path: '/content/information/information_edit',
|
||||
component: () => import('@/views/content/information/information_edit.vue'),
|
||||
meta: {
|
||||
title: '资讯列表',
|
||||
parent: '/content/information/lists',
|
||||
hidden: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/content/information/position',
|
||||
component: () => import('@/views/content/information/category.vue'),
|
||||
meta: { title: '资讯分类' },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default routes
|
||||
38
admin/src/router/modules/decoration.ts
Normal file
38
admin/src/router/modules/decoration.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { RouteRecordRaw, RouterView } from 'vue-router'
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/decoration',
|
||||
redirect: '/decoration/home',
|
||||
component: RouterView,
|
||||
meta: { title: '装修管理', icon: 'icon-setting' },
|
||||
children: [
|
||||
{
|
||||
path: '/decoration/home',
|
||||
component: () => import('@/views/decoration/home.vue'),
|
||||
meta: { title: '首页装修' },
|
||||
},
|
||||
{
|
||||
path: '/decoration/home_edit',
|
||||
component: () => import('@/views/decoration/home_edit.vue'),
|
||||
meta: { title: '首页装修', parent: '/decoration/home', hidden: true },
|
||||
},
|
||||
{
|
||||
path: '/decoration/tabbar',
|
||||
component: () => import('@/views/decoration/tabbar.vue'),
|
||||
meta: { title: '底部标签栏' },
|
||||
},
|
||||
|
||||
{
|
||||
path: '/decoration/advertising',
|
||||
component: () => import('@/views/decoration/advertising.vue'),
|
||||
meta: { title: '广告管理' },
|
||||
},
|
||||
{
|
||||
path: '/decoration/advertising_edit',
|
||||
component: () => import('@/views/decoration/advertising_edit.vue'),
|
||||
meta: { title: '广告管理', parent: '/decoration/advertising', hidden: true },
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default routes
|
||||
40
admin/src/router/modules/permission.ts
Normal file
40
admin/src/router/modules/permission.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { RouteRecordRaw, RouterView } from 'vue-router'
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/permission',
|
||||
redirect: '/permission/admin',
|
||||
component: RouterView,
|
||||
meta: { title: '权限管理', icon: 'icon-quanxian' },
|
||||
children: [
|
||||
{
|
||||
path: '/permission/admin',
|
||||
component: () => import('@/views/permission/admin/index.vue'),
|
||||
meta: { title: '管理员', permission: ['view'] }
|
||||
},
|
||||
{
|
||||
path: '/permission/admin/edit',
|
||||
component: () => import('@/views/permission/admin/edit.vue'),
|
||||
meta: {
|
||||
title: '管理员',
|
||||
parent: '/permission/admin',
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/permission/role',
|
||||
component: () => import('@/views/permission/role/index.vue'),
|
||||
meta: { title: '角色', permission: ['view'] }
|
||||
},
|
||||
{
|
||||
path: '/permission/role/edit',
|
||||
component: () => import('@/views/permission/role/edit.vue'),
|
||||
meta: {
|
||||
title: '角色',
|
||||
parent: '/permission/role',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default routes
|
||||
99
admin/src/router/modules/setting.ts
Normal file
99
admin/src/router/modules/setting.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import { RouteRecordRaw, RouterView } from 'vue-router'
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/setting',
|
||||
redirect: '/setting/service',
|
||||
component: RouterView,
|
||||
meta: { title: '系统设置', icon: 'icon-setting' },
|
||||
children: [
|
||||
{
|
||||
path: '/setting/service',
|
||||
redirect: '/setting/service/online_service',
|
||||
component: RouterView,
|
||||
meta: { title: '客服设置' },
|
||||
children: [
|
||||
{
|
||||
path: '/setting/service/online_service',
|
||||
component: () => import('@/views/setting/service/online_service.vue'),
|
||||
meta: {
|
||||
title: '在线客服',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/setting/website',
|
||||
redirect: '/setting/website/information',
|
||||
component: RouterView,
|
||||
meta: { title: '网站设置' },
|
||||
children: [
|
||||
{
|
||||
path: '/setting/website/information',
|
||||
component: () => import('@/views/setting/website/information.vue'),
|
||||
meta: {
|
||||
title: '网站信息',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/setting/website/filing',
|
||||
component: () => import('@/views/setting/website/filing.vue'),
|
||||
meta: {
|
||||
title: '备案信息',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/setting/website/protocol',
|
||||
component: () => import('@/views/setting/website/protocol.vue'),
|
||||
meta: {
|
||||
title: '政策/协议',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/setting/user',
|
||||
redirect: '/setting/user',
|
||||
component: RouterView,
|
||||
meta: { title: '用户设置' },
|
||||
children: [
|
||||
{
|
||||
path: '/setting/user',
|
||||
component: () => import('@/views/setting/user/index.vue'),
|
||||
meta: {
|
||||
title: '用户设置',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/setting/user/login',
|
||||
component: () => import('@/views/setting/user/login.vue'),
|
||||
meta: {
|
||||
title: '登录注册',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/setting/system',
|
||||
redirect: '/setting/system/environment',
|
||||
component: RouterView,
|
||||
meta: { title: '系统维护' },
|
||||
children: [
|
||||
{
|
||||
path: '/setting/website/environment',
|
||||
component: () => import('@/views/setting/system/environment.vue'),
|
||||
meta: {
|
||||
title: '系统环境',
|
||||
permission: ['view'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default routes
|
||||
Reference in New Issue
Block a user