派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-14 0a2b0a6d67aa52137f1a32fcb39b7ceed4d3f0ca
1
2
3
4
5
6
7
8
9
10
11
import Mock from 'mockjs'
const mockFiles = require.context('./modules', false, /\.js$/)
const mocks = []
 
mockFiles.keys().forEach(key => {
  mocks.push(...mockFiles(key))
})
 
mocks.forEach(item => {
  Mock.mock(item.url, item.type, item.response)
})