|
|
@@ -1,14 +1,11 @@
|
|
|
-export default ({ app, context, store }) => {
|
|
|
+export default ({ app, context,req, store }) => {
|
|
|
|
|
|
if (process.server) {
|
|
|
- const { req, } = context;
|
|
|
let host = req.headers.host;
|
|
|
const isKaifain = host.indexOf('kaifain') !== -1
|
|
|
const isJishuin = host.indexOf('jishuin') !== -1
|
|
|
const isJob = host.indexOf('job') !== -1
|
|
|
- if (isKaifain) {
|
|
|
- app.context.route.path = '/'
|
|
|
- }
|
|
|
+ console.log("222222", app.context.route.path)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
@@ -20,6 +17,7 @@ export default ({ app, context, store }) => {
|
|
|
|
|
|
console.log("app.router.options.routes", app.router.options.routes)
|
|
|
if (isKaifain) {
|
|
|
+ window.__NUXT__.routePath = app.context.route.path + '/kaifain'
|
|
|
let kaifainIndex = app.router.options.routes.filter(v => v.name === 'kaifain')[ 0 ]
|
|
|
let kaifainDetail = app.router.options.routes.filter(v => v.name === 'kaifain-detail-tid')[ 0 ]
|
|
|
let kaifainCaseDetail = app.router.options.routes.filter(v => v.name === 'kaifain-case-tid')[ 0 ]
|
|
|
@@ -49,6 +47,7 @@ export default ({ app, context, store }) => {
|
|
|
}
|
|
|
|
|
|
if (isJishuin) {
|
|
|
+ window.__NUXT__.routePath = app.context.route.path + '/jishuin'
|
|
|
let jishuinCIndex = app.router.options.routes.filter(v => v.name === "jishuinCollectedC1")[ 0 ]
|
|
|
let jishuinCType = app.router.options.routes.filter(v => v.name === "jishuinCollectedCID1")[ 0 ]
|
|
|
let jishuinUIndex = app.router.options.routes.filter(v => v.name === "jishuinUserU1")[ 0 ]
|
|
|
@@ -85,6 +84,7 @@ export default ({ app, context, store }) => {
|
|
|
}
|
|
|
|
|
|
if (isJob) {
|
|
|
+ window.__NUXT__.routePath = app.context.route.path + '/job'
|
|
|
let jobIndex = app.router.options.routes.filter(v => v.name === 'JobListSeoIndex')[ 0 ]
|
|
|
let jobDetail = app.router.options.routes.filter(v => v.name === 'job-detail-id')[ 0 ]
|
|
|
let jobIndexNow = {
|