hookehuyr

fix

......@@ -3,7 +3,9 @@ export function createProxy(prefix, target) {
ret[prefix] = {
target,
changeOrigin: true,
ws: true,
// rewrite: (path) => path.replace(/^\/api/, '')
// rewrite: (path) => path.replace(new RegExp(`^${prefix}`), ''),
}
return ret
}
......
......@@ -2,7 +2,7 @@
* 生成动态路由
*/
import _ from 'lodash'
import routes from "../mock/routes"
import asyncRoutes from "../mock/routes"
// 根据后台返回的路径,生成页面的组件模版
function loadView(component) {
......@@ -11,7 +11,7 @@ function loadView(component) {
const formatRoutesArr = []
routes.forEach(route => {
asyncRoutes.forEach(route => {
const router = {}
const {
path,
......