Browse Source

Merge branch 'main' into hotfix/v1.0.37.1

lianbingjie 1 year ago
parent
commit
d7cadcd3eb
1 changed files with 25 additions and 1 deletions
  1. 25 1
      apps/mobile/src/router/modules/article.js

+ 25 - 1
apps/mobile/src/router/modules/article.js

@@ -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 [
   {
     path: '/content/:id.html',
@@ -6,7 +28,9 @@ export default [
       '/article/content/:id',
       '/nologin/content/:id',
       '/jyapp/article/content/:id.html',
-      '/jyapp/nologin/content/:id.html'
+      '/jyapp/nologin/content/:id.html',
+      // 配置详情页其他别名
+      ...articleAliasList
     ],
     component: () => import('@/views/article/content.vue'),
     meta: {