Commit 59f29e86 authored by Mac's avatar Mac

1

parent 5ac19883
......@@ -307,9 +307,14 @@
this.lists[index].error = false;
this.uploading = true;
// 创建上传对象
uni.compressImage({
src: this.lists[index].url,
quality: 80,
success: res => {
console.log(res.tempFilePath)
const task = uni.uploadFile({
url: this.action,
filePath: this.lists[index].url,
filePath: res.tempFilePath,
name: this.name,
formData: this.formData,
header: this.header,
......@@ -340,6 +345,9 @@
this.$emit('on-progress', res, index, this.lists);
}
});
}
})
},
// 上传失败
uploadError(index, err) {
......
......@@ -418,6 +418,7 @@
},
uploadSuccessHandler(data, index, lists) {
let r = JSON.parse(data);
console.log(r)
this.addMsg.FileList.push(r.data);
},
onRemove1(index) {
......
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