upload file

This commit is contained in:
2020-07-10 09:03:19 +08:00
parent 9ffdfa652a
commit a5b83f31a8
15 changed files with 183 additions and 84 deletions

View File

@@ -44,9 +44,9 @@ unescapeHTML(temp){}
/**
* 上传文件(只能单文件上传)
* @param { String } url 服务器 url
* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像
* @param { String } filePath 要上传文件资源的路径
* @param { String } type 上传文件验证类型 默认: img 可选: video
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
*/
uploadFile({ url, filePath, type = 'img' } = {}) {}
uploadFile({ url, name, filePath }) {}
```