Commit 0a697f79 authored by v_liuhuaizhi's avatar v_liuhuaizhi

增加管理路由

parent 479346fe
...@@ -12,7 +12,6 @@ const whiteList = ['/login', '/register', '/privacy-policy'] ...@@ -12,7 +12,6 @@ const whiteList = ['/login', '/register', '/privacy-policy']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
debugger;
if (getToken()) { if (getToken()) {
to.meta.title && store.dispatch('settings/setTitle', to.meta.title) to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/ /* has token*/
......
...@@ -112,6 +112,21 @@ export const constantRoutes = [ ...@@ -112,6 +112,21 @@ export const constantRoutes = [
] ]
}, },
{
path: '/article-management',
component: Layout,
hidden: true,
permissions: ['*:*:*'],
children: [
{
path: 'index',
props: true,
component: () => import('@/views/article-management/article-management'),
name: 'Article-management',
meta: { title: '文章管理', icon: 'component' }
}
]
},
//行政详情路由 //行政详情路由
{ {
path:'/administrative-management', path:'/administrative-management',
...@@ -438,7 +453,7 @@ Router.prototype.push = function push(location) { ...@@ -438,7 +453,7 @@ Router.prototype.push = function push(location) {
} }
export default new Router({ export default new Router({
base: window.__POWERED_BY_QIANKUN__ ? '/pet-micro/' : '/', base: window.__POWERED_BY_QIANKUN__ ? '/pet-business-web/' : '/',
mode: 'history', // 去掉url中的# mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
......
<template> <template>
<div>文章管理</div> <div>文章管理-微服务</div>
</template> </template>
<script> <script>
......
...@@ -57,9 +57,9 @@ module.exports = { ...@@ -57,9 +57,9 @@ module.exports = {
configureWebpack: { configureWebpack: {
name: name, name: name,
output: { output: {
library: 'pet-micro', library: 'pet-business-web',
libraryTarget: 'umd', // 把微应用打包成 umd 库格式 libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_pet-micro`, jsonpFunction: `webpackJsonp_pet-business-web`,
}, },
resolve: { resolve: {
alias: { alias: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment