Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-18 23:04:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
618db7d2ff6ef999ba64d1272e30f1a37cbe7abe
618db7d2
1 parent
dcb91082
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
build/proxy.js
src/utils/generateRoute.js
build/proxy.js
View file @
618db7d
...
...
@@ -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
}
...
...
src/utils/generateRoute.js
View file @
618db7d
...
...
@@ -2,7 +2,7 @@
* 生成动态路由
*/
import
_
from
'lodash'
import
r
outes
from
"../mock/routes"
import
asyncR
outes
from
"../mock/routes"
// 根据后台返回的路径,生成页面的组件模版
function
loadView
(
component
)
{
...
...
@@ -11,7 +11,7 @@ function loadView(component) {
const
formatRoutesArr
=
[]
r
outes
.
forEach
(
route
=>
{
asyncR
outes
.
forEach
(
route
=>
{
const
router
=
{}
const
{
path
,
...
...
Please
register
or
login
to post a comment