fc-cli-mock
v1.0.4
Published
mock服务拦截
Downloads
14
Readme
fc-cli-mock 是对mockjs使用的二次封装。
test.js为fc-cli-mock的使用demo;
最后,需要在main.js中引入,并执行该函数,mock就会生效。 如下是在开发环境mock拦截接口: import mock from './test.js' const nowEnv = process.env.NODE_ENV console.log('当前环境:', nowEnv) if (nowEnv == 'development') mock()