|
@@ -1,3 +1,25 @@
|
|
|
|
+const contentTypeMap = [
|
|
|
|
+ // 'content',
|
|
|
|
+ 'entservice',
|
|
|
|
+ 'bdprivate',
|
|
|
|
+ 'mailprivate',
|
|
|
|
+ 'bdcontent',
|
|
|
|
+ 'indexcontent',
|
|
|
|
+ 'advancedProject'
|
|
|
|
+]
|
|
|
|
+function createArticleAlias(typeList = []) {
|
|
|
|
+ const list = []
|
|
|
|
+ typeList.forEach((type) => {
|
|
|
|
+ list.push(`/article/${type}/:id`)
|
|
|
|
+ list.push(`/article/${type}/:id.html`)
|
|
|
|
+ list.push(`/jyapp/article/${type}/:id`)
|
|
|
|
+ list.push(`/jyapp/article/${type}/:id.html`)
|
|
|
|
+ })
|
|
|
|
+ return list
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const articleAliasList = createArticleAlias(contentTypeMap)
|
|
|
|
+
|
|
export default [
|
|
export default [
|
|
{
|
|
{
|
|
path: '/content/:id.html',
|
|
path: '/content/:id.html',
|
|
@@ -6,7 +28,9 @@ export default [
|
|
'/article/content/:id',
|
|
'/article/content/:id',
|
|
'/nologin/content/:id',
|
|
'/nologin/content/:id',
|
|
'/jyapp/article/content/:id.html',
|
|
'/jyapp/article/content/:id.html',
|
|
- '/jyapp/nologin/content/:id.html'
|
|
|
|
|
|
+ '/jyapp/nologin/content/:id.html',
|
|
|
|
+ // 配置详情页其他别名
|
|
|
|
+ ...articleAliasList
|
|
],
|
|
],
|
|
component: () => import('@/views/article/content.vue'),
|
|
component: () => import('@/views/article/content.vue'),
|
|
meta: {
|
|
meta: {
|