feat: 使用 axios 扩展的方式实现 mock 数据

This commit is contained in:
FairyEver
2020-05-07 23:02:12 +08:00
parent 28acfdbb04
commit ac9b1ea26d
14 changed files with 161 additions and 41 deletions

13
src/api/modules/file.js Normal file
View File

@@ -0,0 +1,13 @@
export default ({ request, faker, mock, tools }) => ({
/**
* @description 请求项目中的文件
* @param {String} url 文件地址
*/
FILE_GET (url = '') {
return request({
baseURL: process.env.BASE_URL,
url,
method: 'get'
})
}
})