Merge remote-tracking branch 'origin/jihan_0920new_护理服务、商城、积分兑换、在线问诊功能分支' into jihan_0920new_护理服务、商城、积分兑换、在线问诊功能分支
This commit is contained in:
commit
a69b62b05c
@ -247,13 +247,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传预处理
|
// 上传预处理
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
|
console.log(file)
|
||||||
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
|
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
this.previews.data = file;
|
this.previews.data = file;
|
||||||
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
// this.options.img = reader.result;
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (file.type.indexOf("image/") == -1) {
|
if (file.type.indexOf("image/") == -1) {
|
||||||
@ -266,7 +267,7 @@ export default {
|
|||||||
this.previews.url = URL.createObjectURL(file);
|
this.previews.url = URL.createObjectURL(file);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
// this.options.img = reader.result;
|
this.options.img = reader.result;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user