浏览代码

修改发布

lrf402788946 5 年之前
父节点
当前提交
ee6d8e477a
共有 4 个文件被更改,包括 9 次插入4 次删除
  1. 2 0
      .env
  2. 3 1
      src/router/index.js
  3. 3 3
      src/views/index.vue
  4. 1 0
      src/views/newsList.vue

+ 2 - 0
.env

@@ -0,0 +1,2 @@
+VUE_APP_AXIOS_BASE_URL = ''
+VUE_APP_ROUTER="/www"

+ 3 - 1
src/router/index.js

@@ -4,6 +4,8 @@ import Router from 'vue-router';
 Vue.use(Router);
 
 export default new Router({
+  mode: 'history',
+  base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
   routes: [
     {
       path: '/',
@@ -31,7 +33,7 @@ export default new Router({
       component: () => import('../views/memberDetail.vue'),
     },
     {
-      path: '/newsList',
+      path: '/newsList/:type/:id',
       name: 'newsList',
       component: () => import('../views/newsList.vue'),
     },

+ 3 - 3
src/views/index.vue

@@ -128,7 +128,7 @@ export default {
           if (col.type === 'content') {
             col.path = `/info/detail?id=${col.content_id}`;
           } else if (col.type !== 'url') {
-            col.path = `/info/list/${col.id}`;
+            col.path = `/newsList/${col.id}`;
           }
         }
         return columns;
@@ -173,10 +173,10 @@ export default {
         let columns = result.data;
         for (const col of columns) {
           if (col.type === `bugList`) {
-            col.path = `/info/list/${col.content_id}`;
+            col.path = `/newsList/${col.content_id}`;
             col.children = await this.completeColumn(col);
           } else if (col.type === `column`) {
-            col.path = `/info/list/${col.id}`;
+            col.path = `/newsList/${col.id}`;
             col.children = await this.completeColumn(col);
           } else if (col.type === `content`) {
             col.path = `/info/detail?id=${col.content_id}`;

+ 1 - 0
src/views/newsList.vue

@@ -114,6 +114,7 @@ export default {
       },
     ],
     menu: [],
+    sideMenu: [],
   }),
   created() {
     this.loadMenu(); //获取菜单信息