fix; bug
This commit is contained in:
@@ -22,6 +22,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},
|
||||
@@ -74,11 +75,11 @@
|
||||
handler(newval, oldval) {
|
||||
if(this.fileType === 'image'){
|
||||
if (newval.indexOf('/') === 0) {
|
||||
this.fileUrlShow = this.base_url + newval;
|
||||
this.fileUrlShow = this.base_url + newval + '?tk=' + getToken();
|
||||
return;
|
||||
}
|
||||
if (newval.indexOf('http') === 0) {
|
||||
this.fileUrlShow = newval;
|
||||
this.fileUrlShow = newval + '?tk=' + getToken();
|
||||
return;
|
||||
}
|
||||
if (newval && this.watching) {
|
||||
@@ -87,7 +88,7 @@
|
||||
}
|
||||
if(this.fileType === 'video'){
|
||||
if(newval.indexOf('http') === 0){
|
||||
this.fileUrlShow = newval
|
||||
this.fileUrlShow = newval + '?tk=' + getToken()
|
||||
}else{
|
||||
if (newval && this.watching) {
|
||||
this.getPreviewUrlBlob(newval);
|
||||
@@ -102,9 +103,9 @@
|
||||
src: {
|
||||
handler(newval, oldval) {
|
||||
if(newval.indexOf('http') === 0){
|
||||
this.fileUrlShow = newval
|
||||
this.fileUrlShow = newval + '?tk=' + getToken()
|
||||
}else{
|
||||
this.fileUrlShow = this.base_url + newval
|
||||
this.fileUrlShow = this.base_url + newval + '?tk=' + getToken()
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
@@ -132,7 +133,7 @@
|
||||
return;
|
||||
}
|
||||
previewCacheThumbImage(id, this.width, this.height).then((res) => {
|
||||
this.fileUrlShow = res;
|
||||
this.fileUrlShow = res + '?tk=' + getToken();
|
||||
this.storageStore.setStorage('image', `/${id}/${this.width}/${this.height}`, res);
|
||||
});
|
||||
} else {
|
||||
@@ -183,7 +184,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);
|
||||
}
|
||||
@@ -213,7 +214,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)
|
||||
@@ -222,7 +223,7 @@
|
||||
getPreviewFileUrlNow(id){
|
||||
let _newDate = new Date().getTime()
|
||||
if(id.indexOf('http') === 0){
|
||||
this.fileUrlShow = id + '?t=' + _newDate
|
||||
this.fileUrlShow = id + '?tk=' + getToken() + '&t=' + _newDate
|
||||
return
|
||||
}
|
||||
if (id && this.watching) {
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
<view class="back-icon" @click="common.navigateBack()"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analytics-box" v-if="loading">
|
||||
<!-- <view class="analytics-box loading-box-cont" v-if="loading">
|
||||
<CommonLoading color="#06f" class="loading-box" />
|
||||
</view>
|
||||
<view class="analytics-box" v-if="!loading">
|
||||
</view> -->
|
||||
<view :class="['analytics-box', loading?'loading-box-cont':'']" >
|
||||
<CommonLoading color="#06f" class="loading-box" v-if="loading"/>
|
||||
<view class="tabs-box">
|
||||
<uv-tabs :list="tabList" @click="changeTab" :scrollable="true" active-style="font-weight:bold; color:#000;"
|
||||
:current="currentTab" class="font_pf my_tabs"
|
||||
@@ -306,7 +307,7 @@
|
||||
background-size: 100% auto;
|
||||
background-position: top center;
|
||||
background-attachment: local;
|
||||
|
||||
|
||||
|
||||
.top-box {
|
||||
height: 280rpx;
|
||||
@@ -369,9 +370,21 @@
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
backdrop-filter: blur(10rpx);
|
||||
|
||||
overflow: hidden;
|
||||
z-index: 1;
|
||||
&.loading-box-cont::before{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100% ;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
background: #ffffffee;
|
||||
backdrop-filter: blur(50rpx);
|
||||
}
|
||||
.loading-box {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
top: 120rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
Reference in New Issue
Block a user