APP热更新

This commit is contained in:
cansnow
2026-01-11 13:51:16 +08:00
parent 941464c330
commit c38846f13b
16 changed files with 995 additions and 197 deletions
@@ -117,14 +117,14 @@
methods: {
async init(){
const self = this;
//console.log(this.message?.videoElem);
console.log(this.message?.videoElem,this.conversationID);
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
self.coverDownloading = true;
//console.log(snapshotUrl);
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
self.coverDownloading = false;
self.src = fn;
console.log(fn);
//console.log(fn);
});
},
clickMediaItem() {
@@ -138,20 +138,22 @@
this.loadingWidth = "auto";
},
onOverlayClick() {
const _this = this;
// 点击覆盖层:如果视频已缓存则直接播放,否则开始下载
const url = this.message?.videoElem?.videoUrl || this.message?.videoElem?.videoPath;
const url = _this.message?.videoElem?.videoUrl;
if (!url) {
uni.showToast({ title: '无可下载的视频' });
return;
}
this.videoDownloading = true;
this.videoDownloadProgress = 0;
util.downloadFile(url, `${this.conversationID}`, (prog) => {
//this.videoDownloadProgress = prog;
_this.videoDownloading = true;
_this.videoDownloadProgress = 0;
util.cacheFile(url, `${_this.conversationID}`, (prog) => {
//console.log(prog);
this.videoDownloadProgress = prog;
}).then((fn) => {
this.videoDownloading = false;
this.videoExists = true;
this.playVideo(fn);
_this.videoDownloading = false;
_this.videoExists = true;
_this.playVideo(fn);
});
},