mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-10 15:56:15 +00:00
v1.0.6
This commit is contained in:
28
smart-admin-web/src/api/file.js
Normal file
28
smart-admin-web/src/api/file.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { postAxios, getAxios } from '@/lib/http';
|
||||
import config from '@/config';
|
||||
const baseUrl = config.baseUrl.apiUrl;
|
||||
export const fileApi = {
|
||||
// 系统文件查询
|
||||
queryFileList: data => {
|
||||
return postAxios('/api/file/query', data);
|
||||
},
|
||||
// 系统文件下载通过接口
|
||||
downLoadFile: id => {
|
||||
return getAxios('/api/file/downLoad?id=' + id);
|
||||
},
|
||||
// 文件上传
|
||||
fileUpload: (type, data) => {
|
||||
// return postAxios('/api/file/localUpload/' + type, data);
|
||||
return this.fileUploadUrl;
|
||||
},
|
||||
// 文件保存
|
||||
addFile: data => {
|
||||
return postAxios('/api/file/save', data);
|
||||
},
|
||||
// 上传路径:本地
|
||||
fileUploadLocalUrl: baseUrl + '/api/file/localUpload/',
|
||||
// 上传路径:阿里OSS
|
||||
fileUploadAliUrl: baseUrl + '/api/file/aliYunUpload/',
|
||||
// 上传路径:七牛
|
||||
fileUploadQiNiuUrl: baseUrl + '/api/file/qiNiuUpload/'
|
||||
};
|
||||
Reference in New Issue
Block a user