fix: 修复请求缺少/api不走fake的问题

This commit is contained in:
xiaojunnuo@126.com
2020-09-01 17:17:40 +08:00
parent d505583b35
commit 02d6db3beb

View File

@@ -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)