第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:04:21 +08:00
commit 7a73b38bd5
764 changed files with 166417 additions and 0 deletions

18
api/upload.js Executable file
View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
// api地址
const api = {
image: 'upload/image'
}
// 图片上传
export const image = files => {
// 文件上传大小, 2M
const maxSize = 1024 * 1024 * 2
// 执行上传
return new Promise((resolve, reject) => {
request.urlFileUpload({ files, maxSize })
.then(result => resolve(result.map(item => item.data.fileInfo.file_id), result))
.catch(reject)
})
}