fix: 修复请求缺少/api不走fake的问题
This commit is contained in:
parent
d505583b35
commit
02d6db3beb
|
|
@ -11,7 +11,7 @@ const apiList = req(require.context('../', true, /mock\.js$/))
|
|||
apiList.forEach(apiFile => {
|
||||
for (const item of apiFile) {
|
||||
mock
|
||||
.onAny(new RegExp('^' + item.path))
|
||||
.onAny(new RegExp('^/api' + item.path))
|
||||
.reply(config => {
|
||||
console.log('------------fake request start -------------')
|
||||
console.log('request:', config)
|
||||
|
|
|
|||
Loading…
Reference in New Issue