解决部署上线动态路由无法访问
This commit is contained in:
+1
-1
@@ -5,4 +5,4 @@ VUE_APP_TITLE = 调解系统
|
||||
ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = '/API'
|
||||
|
||||
+1
-2
@@ -9,8 +9,7 @@
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"dev_t": "set NODE_OPTIONS=\"--openssl-legacy-provider\" & npm run dev\n"
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -126,7 +126,7 @@ export const loadView = (view) => {
|
||||
return (resolve) => require([`@/views/${view}`], resolve)
|
||||
} else {
|
||||
// 使用 import 实现生产环境的路由懒加载
|
||||
return () => import(`@/views/${view}`)
|
||||
return (resolve) => require([`@/views/${view}`], resolve)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user