ソースを参照

企业列表路由

huan-jie 5 年 前
コミット
712deb7383
2 ファイル変更8 行追加2 行削除
  1. 7 1
      plugins/router.js
  2. 1 1
      plugins/seoRouter.js

+ 7 - 1
plugins/router.js

@@ -7,6 +7,7 @@ export default ({ app, context, req, store}) => {
       window.__NUXT__.routePath = app.context.route.path.replace(/^\/job/, '/')
       let jobIndex = app.router.options.routes.filter(v => v.name === 'job')[ 0 ]
       let jobDetail = app.router.options.routes.filter(v => v.name === 'job-detail-id')[ 0 ]
+      let companyList = app.router.options.routes.filter(v => v.name === 'job-company-list-city')[ 0 ]
       let jobIndexNow = {
         name: jobIndex.name,
         path: '/*',
@@ -17,8 +18,13 @@ export default ({ app, context, req, store}) => {
         path: '/d/:id?',
         component: jobDetail.component
       }
+      let companyListNow = {
+        name: companyList.name,
+        path: '/company/list/:city?',
+        component: companyList.component
+      }
       let jobOrderList = [
-        jobDetailNow, jobIndexNow
+        jobDetailNow, jobIndexNow, companyListNow
       ]
       try {
         app.router.options.routes.unshift(...jobOrderList)

+ 1 - 1
plugins/seoRouter.js

@@ -39,7 +39,7 @@ const extendRoutes = (routes, resolve) => {
       component: resolve(__dirname, '../pages/job/index.vue')
     }, {
       name: 'CompanyList',
-      path: '/company/list/:city?',
+      path: '/job/company/list/:city?',
       component: resolve(__dirname, '../pages/job/company/list/_city.vue')
     }]
   )