fix; bug

This commit is contained in:
杨航
2025-12-04 10:57:30 +08:00
parent b82956d560
commit db2eb8cf2b
2 changed files with 21 additions and 20 deletions
@@ -31,6 +31,7 @@
import { useStorageStore } from "@/store/storage.js"
import { get_base_url } from '@/api/request.js'
import imagePreviewVue from './image-preview.vue'
import { getToken } from '@/common/common.js'
export default {
name:"video-preview",
components:{ imagePreviewVue },
@@ -75,7 +76,7 @@
fileId: {
handler(newval, oldval) {
if(newval.indexOf('http') === 0){
this.fileUrlShow = newval
this.fileUrlShow = newval + '?tk=' + getToken()
}else{
if (newval && this.watching) {
this.getPreviewUrlBlob(newval);
@@ -129,7 +130,7 @@
return
}
let _newDate = new Date().getTime()
this.fileUrlShow = getPreviewFileUrl(this.fileId)+'?t=' + _newDate
this.fileUrlShow = getPreviewFileUrl(this.fileId) + '?tk=' + getToken() + '&t=' + _newDate
// downloadFile(id).then(res=>{
// this.fileUrlShow = res.tempFilePath
// this.storageStore.setStorage('video', id, this.fileUrlShow)
@@ -150,7 +151,7 @@
if (this.fileId) {
let _newDate = new Date().getTime()
if(this.fileId.indexOf('http') === 0){
this.fileUrlShow = this.fileId + '?t=' + _newDate
this.fileUrlShow = this.fileId + '?tk=' + getToken() + '&t=' + _newDate
}else{
this.getPreviewUrlBlob(this.fileId);
}