feat: 使用 axios 扩展的方式实现 mock 数据
This commit is contained in:
13
src/api/modules/file.js
Normal file
13
src/api/modules/file.js
Normal 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'
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user