This commit is contained in:
yulixing 2019-10-11 16:51:24 +08:00
parent 5dba3b8c67
commit d6bb57257d
6 changed files with 50 additions and 24 deletions

View File

@ -5,6 +5,8 @@ import Layout from '@/layout'
const adRouter = {
path: '/ad',
component: Layout,
redirect: '/ad/list',
name: 'ad',
meta: {
title: '广告投放',
icon: 'ad',
@ -16,6 +18,15 @@ const adRouter = {
name: 'adList',
meta: {title: '广告管理'},
},
{
path: 'edit',
component: () => import('@/views/ad/edit'), // Parent router-view
name: 'adEdit',
hidden: true,
meta: {
title: '广告编辑',
},
},
{
path: 'jump',
component: () => import('@/views/ad/jump'), // Parent router-view
@ -32,16 +43,6 @@ const adRouter = {
title: 'AppID列表',
},
},
{
path: 'edit',
component: require('@/views/ad/edit').default(), // Parent router-view
name: 'adEdit',
hidden: true,
meta: {
title: '广告编辑',
},
},
],
}

View File

@ -5,10 +5,12 @@ import Layout from '@/layout'
const adminRouter = {
path: '/admin',
component: Layout,
redirect: '/admin/user-list',
name: 'admin',
meta: {
title: '系统管理',
icon: 'system',
// roles: ['admin'],
roles: ['admin']
},
children: [
// {
@ -25,6 +27,30 @@ const adminRouter = {
title: '用户列表',
},
},
// {
// path: 'ad-list',
// component: () => import('@/views/admin/ad-list'), // Parent router-view
// name: 'adminAdList',
// meta: {
// title: '广告列表',
// },
// },
// {
// path: 'jump',
// component: () => import('@/views/admin/jump'), // Parent router-view
// name: 'adminAdJump',
// meta: {
// title: '互跳管理',
// },
// },
// {
// path: 'game-list',
// component: () => import('@/views/admin/game-list'), // Parent router-view
// name: 'adminGameList',
// meta: {
// title: 'AppID列表',
// },
// },
],
}

View File

@ -42,7 +42,7 @@ import errRouter from './error'
export const constantRoutes = [
{
path: '/',
redirect: '/ad/list',
redirect: '/ad/list'
},
{
path: '/login',
@ -58,12 +58,10 @@ export const constantRoutes = [
// dashboardRouter,
adRouter,
libRouter,
// comRouter,
// adminRouter,
errRouter,
userRouter,
adminRouter,
// comRouter,
// 404 page must be placed at the end !!!
{path: '*', redirect: '/404', hidden: true},
]
/**
@ -71,9 +69,9 @@ export const constantRoutes = [
* the routes that need to be dynamically loaded based on user roles
*/
export const asyncRoutes = [
// adminRouter,
// // 404 page must be placed at the end !!!
// {path: '*', redirect: '/404', hidden: true},
adminRouter,
// 404 page must be placed at the end !!!
{path: '*', redirect: '/404', hidden: true},
]
const createRouter = () =>

View File

@ -5,6 +5,7 @@ import Layout from '@/layout'
const libRouter = {
path: '/lib',
component: Layout,
name: 'lib',
meta: {
title: '资源库',
icon: 'pic',

View File

@ -2,18 +2,18 @@
import Layout from '@/layout'
const userRouter = {
const comRouter = {
path: '/user',
component: Layout,
meta: { title: '个人中心', icon: 'user', affix: true },
redirect: 'user',
children: [
{
path: '',
component: () => import('@/views/user/index'),
name: 'user',
meta: { title: '个人信息'}
meta: { title: '个人中心', icon: 'user', affix: true }
}
]
}
export default userRouter
export default comRouter

View File

@ -297,7 +297,7 @@ import {Promise, reject} from 'q'
import moment from 'moment'
export default {
name: 'AdminAdList',
name: 'adList',
data() {
return {
// common