|
@@ -19,93 +19,146 @@ import Catalog from '@/components/catalog/Index'
|
|
|
import Notice from '@/components/notice/Index'
|
|
|
|
|
|
|
|
|
-Vue.use(Router)
|
|
|
+Vue.use(Router);
|
|
|
+
|
|
|
+const TITLE_SUFFIX = '文档管理分享平台 | ZhuLiang\'s Shared';
|
|
|
|
|
|
export default new Router({
|
|
|
routes: [
|
|
|
{
|
|
|
path: '/',
|
|
|
name: 'Index',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: Index
|
|
|
},
|
|
|
{
|
|
|
path: '/user/login',
|
|
|
name: 'UserLogin',
|
|
|
+ meta: {
|
|
|
+ title: '登录 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: UserLogin
|
|
|
},
|
|
|
{
|
|
|
path: '/user/setting',
|
|
|
name: 'UserSetting',
|
|
|
+ meta: {
|
|
|
+ title: '个人设置 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: UserSetting
|
|
|
},
|
|
|
{
|
|
|
path: '/user/register',
|
|
|
name: 'UserRegister',
|
|
|
+ meta: {
|
|
|
+ title: '注册 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: UserRegister
|
|
|
},
|
|
|
{
|
|
|
path: '/user/resetPassword',
|
|
|
name: 'UserResetPassword',
|
|
|
+ meta: {
|
|
|
+ title: '修改密码 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: UserResetPassword
|
|
|
},
|
|
|
{
|
|
|
path: '/user/ResetPasswordByUrl',
|
|
|
name: 'ResetPasswordByUrl',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ResetPasswordByUrl
|
|
|
},
|
|
|
{
|
|
|
path: '/item/index',
|
|
|
name: 'ItemIndex',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemIndex
|
|
|
},
|
|
|
{
|
|
|
path: '/item/add',
|
|
|
name: 'ItemAdd',
|
|
|
+ meta: {
|
|
|
+ title: '新建项目 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemAdd
|
|
|
},
|
|
|
{
|
|
|
path: '/item/password/:item_id',
|
|
|
name: 'ItemPassword',
|
|
|
+ meta: {
|
|
|
+ title: '输入密码访问 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemPassword
|
|
|
},
|
|
|
{
|
|
|
path: '/:item_id',
|
|
|
name: 'ItemShow',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemShow
|
|
|
},
|
|
|
{
|
|
|
path: '/item/export/:item_id',
|
|
|
name: 'ItemExport',
|
|
|
+ meta: {
|
|
|
+ title: '导出 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemExport
|
|
|
},
|
|
|
{
|
|
|
path: '/item/setting/:item_id',
|
|
|
name: 'ItemSetting',
|
|
|
+ meta: {
|
|
|
+ title: '项目设置 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: ItemSetting
|
|
|
},
|
|
|
{
|
|
|
path: '/page/:page_id',
|
|
|
name: 'PageIndex',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: PageIndex
|
|
|
},
|
|
|
{
|
|
|
path: '/page/edit/:item_id/:page_id',
|
|
|
name: 'PageEdit',
|
|
|
+ meta: {
|
|
|
+ title: '页面编辑 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: PageEdit
|
|
|
},
|
|
|
{
|
|
|
path: '/page/diff/:page_id/:page_history_id',
|
|
|
name: 'PageDiff',
|
|
|
+ meta: {
|
|
|
+ title: '历史版本对比 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: PageDiff
|
|
|
},
|
|
|
{
|
|
|
path: '/catalog/:item_id',
|
|
|
name: 'Catalog',
|
|
|
+ meta: {
|
|
|
+ title: '目录管理 - ' + TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: Catalog
|
|
|
},
|
|
|
{
|
|
|
path: '/notice/index',
|
|
|
name: 'Notice',
|
|
|
+ meta: {
|
|
|
+ title: TITLE_SUFFIX
|
|
|
+ },
|
|
|
component: Notice
|
|
|
},
|
|
|
]
|