26
This commit is contained in:
@@ -49,7 +49,12 @@
|
||||
const imageWidth = this.message.pictureElem.sourcePicture.width;
|
||||
const aspectRatio = imageHeight / imageWidth;
|
||||
return 120 * aspectRatio;
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
src(newVal, oldVal) {
|
||||
console.log(newVal,oldVal);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
@@ -59,7 +64,12 @@
|
||||
const self = this;
|
||||
let url = "";
|
||||
// 如果有远程 snapshotUrl,则下载到 coverCachePath
|
||||
const snapshotUrl = (this.message.pictureElem.snapshotPicture?.url ?? this.message.pictureElem.sourcePath );
|
||||
//const snapshotUrl = (this.message.pictureElem.snapshotPicture?.url ?? this.message.pictureElem.sourcePath );
|
||||
const snapshotUrl = this.message.pictureElem.sourcePicture?.url;
|
||||
if(!snapshotUrl){
|
||||
console.log(this.message);
|
||||
return;
|
||||
}
|
||||
//console.log(snapshotUrl);
|
||||
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
|
||||
self.coverDownloading = false;
|
||||
|
||||
Reference in New Issue
Block a user