xinfeng vor 5 Jahren
Ursprung
Commit
d2be0fc538
3 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 1 1
      pages/user/_id/_type.vue
  2. 1 1
      pages/user/collect_article/_id/_type.vue
  3. 4 4
      plugins/seoRouter.js

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

@@ -280,7 +280,7 @@
           let path1 = path.replace("/user/", "/u/")
           reditUrl = path.replace(path, path1)
           console.log("jishuinUser redirect", "before:", fullPath, "after:", reditUrl)
-          redirect(301, reditUrl)
+          // redirect(301, reditUrl)
         }
 
         //拼接canonical

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

@@ -179,7 +179,7 @@
           let reditUrl = fullPath
           let path1 = path.replace("/collect_article/", "/c/")
           reditUrl = path.replace(path, path1)
-          redirect(301, reditUrl)
+          // redirect(301, reditUrl)
         }
 
         //拼接canonical

+ 4 - 4
plugins/seoRouter.js

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