Commit b1647ea3 by fengzhaoyu

fix:去掉打印 加loading

parent aee956fc
......@@ -9,7 +9,6 @@ function getImg() {
dd.chooseImage({
count: 1,
success: (res) => {
console.log(JSON.stringify())
if (res.files[0].size > 20 * 1024 * 1024) {
rejects({ code: -1, msg: '文件小一点', ...res })
} else {
......@@ -61,9 +60,14 @@ async function uploadImg(imgInfo) {
export async function getFileInfoFromOss() {
try {
const imgInfo = await getImg();
dd.showLoading({
content: '正在上传...',
});
const fileInfo = await uploadImg(imgInfo);
dd.hideLoading()
return { code: 0, msg: 'success', data: fileInfo }
} catch (err) {
dd.hideLoading()
return err
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment