xinfeng před 5 roky
rodič
revize
47d8945024
2 změnil soubory, kde provedl 16 přidání a 4 odebrání
  1. 3 1
      pages/user/_id/_type.vue
  2. 13 3
      plugins/seoRouter.js

+ 3 - 1
pages/user/_id/_type.vue

@@ -150,7 +150,7 @@
               + 添加合集
             </div>
             <div class="article-list" v-for="item in list">
-              <a :href='"/user/collect_article/"+item.id'>
+              <a :href='"/c/"+item.id'>
                 <div class="heji-box align-center justify-between">
                   <div class="heji-left">
                     <img :src=item.images alt="">
@@ -651,6 +651,8 @@
       getType() {
         let item = this.$route.params.type ? this.$route.params.type : null
         this.uid = this.$route.params.id
+
+        console.log("info", this.$route.params, this.uid)
         switch (item) {
           case 'heji':
             this.item = item

+ 13 - 3
plugins/seoRouter.js

@@ -28,16 +28,26 @@ const extendRoutes = (routes, resolve) => {
   
   
   /*** 技术圈SEO sd改动 start **/
-  //文章
+  //合集
   routes.unshift({
     name: 'jishuinCollected',
-    path: '/user/c/*',
+    path: '/user/c/:id',
+    component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
+  })
+  routes.unshift({
+    name: 'jishuinCollected',
+    path: '/user/c/:id/:type',
     component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
   })
   //用户
   routes.unshift({
     name: 'jishuinUser',
-    path: '/u/*',
+    path: '/u/:id',
+    component: resolve(__dirname, '../pages/user/_id/_type.vue')
+  })
+  routes.unshift({
+    name: 'jishuinUser',
+    path: '/u/:id/:type',
     component: resolve(__dirname, '../pages/user/_id/_type.vue')
   })
   /*** 技术圈SEO sd改动 end  **/