瀏覽代碼

兼职招聘SEO bug

xinfeng 5 年之前
父節點
當前提交
c7a8f38add
共有 2 個文件被更改,包括 2 次插入10 次删除
  1. 1 10
      plugins/router.js
  2. 1 0
      plugins/seoRouter.js

+ 1 - 10
plugins/router.js

@@ -4,7 +4,6 @@ export default ({
   req,
   store
 }) => {
-
   if (process.client) {
     const {
       host
@@ -12,6 +11,7 @@ export default ({
     const isKaifain = host.indexOf('kaifain') !== -1
     const isJishuin = host.indexOf('jishuin') !== -1
     const isJob = host.indexOf('job') !== -1
+    console.log('before Route Path', window.__NUXT__.routePath )
     console.log("app.router.options.routes", app.router.options.routes)
     if (isKaifain) {
       window.__NUXT__.routePath = app.context.route.path.replace(/^\/kaifain/, '')
@@ -136,12 +136,3 @@ export default ({
     })
   }
 }
-
-function getMatchedComponents(route, matches = false, prop = 'components') {
-  return Array.prototype.concat.apply([], route.matched.map((m, index) => {
-    return Object.keys(m[prop]).map((key) => {
-      matches && matches.push(index)
-      return m[prop][key]
-    })
-  }))
-}

+ 1 - 0
plugins/seoRouter.js

@@ -60,6 +60,7 @@ const extendRoutes = (routes, resolve) => {
   //   component: resolve(__dirname, '../pages/user/_id/_type.vue')
   // })
   // /*** 技术圈SEO sd改动 end  **/
+  
   /**
    * 404
    */