消除抖动,修改链接
This commit is contained in:
parent
9832154387
commit
aca3da4b7b
@ -122,6 +122,7 @@ export default {
|
|||||||
let showType = ref("gallery") // gallery video
|
let showType = ref("gallery") // gallery video
|
||||||
let sortType = ref("shortName") // shortName name createTime
|
let sortType = ref("shortName") // shortName name createTime
|
||||||
let targetPage = ref(1)
|
let targetPage = ref(1)
|
||||||
|
let debounceTimer = 0
|
||||||
|
|
||||||
let loadComplete = computed(() => {
|
let loadComplete = computed(() => {
|
||||||
return store.state.loadComplete
|
return store.state.loadComplete
|
||||||
@ -252,7 +253,10 @@ export default {
|
|||||||
|
|
||||||
function showThumbnail(gallery){
|
function showThumbnail(gallery){
|
||||||
if(gallery.download !== undefined)
|
if(gallery.download !== undefined)
|
||||||
store.commit("_changeThumbnailGallery", gallery)
|
clearTimeout(debounceTimer)
|
||||||
|
debounceTimer = setTimeout(() => {
|
||||||
|
store.commit("_changeThumbnailGallery", gallery)
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
return {galleryTasks, videoTasks, min, max, targetPage, loadComplete, page, isEditing, inputNode, isShowVideoHistory,
|
return {galleryTasks, videoTasks, min, max, targetPage, loadComplete, page, isEditing, inputNode, isShowVideoHistory,
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import {ElMessage} from "element-plus"
|
|||||||
import qs from "qs"
|
import qs from "qs"
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
const BaseUrl = "http://downloader.lionwebsite.xyz/"
|
const BaseUrl = "http://downloader.lionwebsite.xyz/"
|
||||||
const GalleryManageUrl = BaseUrl + "GalleryManage/"
|
const GalleryManageUrl = BaseUrl + "GalleryManage"
|
||||||
const VideoManageUrl = BaseUrl + "VideoManage/"
|
const VideoManageUrl = BaseUrl + "VideoManage"
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
updateGalleryTasks(context, type){
|
updateGalleryTasks(context, type){
|
||||||
@ -136,7 +136,7 @@ const actions = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadWeekUsedAmount(context){
|
loadWeekUsedAmount(context){
|
||||||
axios.get(GalleryManageUrl + "weekUsedAmount", {
|
axios.get(GalleryManageUrl + "/weekUsedAmount", {
|
||||||
params: {
|
params: {
|
||||||
AuthCode: state.AuthCode
|
AuthCode: state.AuthCode
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ const mutations = {
|
|||||||
if (url.host === mask['raw'])
|
if (url.host === mask['raw'])
|
||||||
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
||||||
})
|
})
|
||||||
task.download = GalleryManageUrl + "file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
|
task.download = GalleryManageUrl + "/file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ const mutations = {
|
|||||||
if (url.host === mask['raw'])
|
if (url.host === mask['raw'])
|
||||||
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
||||||
})
|
})
|
||||||
task.download = VideoManageUrl + "file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
|
task.download = VideoManageUrl + "/file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
|
||||||
task.createTimeDisplay = moment(task.createTime * 1000).format("YYYY-MM-DD HH:mm:ss")
|
task.createTimeDisplay = moment(task.createTime * 1000).format("YYYY-MM-DD HH:mm:ss")
|
||||||
}
|
}
|
||||||
state.totalVideoTask.push(task)
|
state.totalVideoTask.push(task)
|
||||||
@ -501,7 +501,7 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
_changeThumbnailGallery(state, gallery){
|
_changeThumbnailGallery(state, gallery){
|
||||||
state.thumbnailGallery = gallery
|
state.thumbnailGallery = gallery
|
||||||
state.thumbnailGallery.url = GalleryManageUrl + "thumbnail/" + encodeURIComponent(gallery.name) + ".webp?AuthCode="+state.AuthCode
|
state.thumbnailGallery.url = GalleryManageUrl + "/thumbnail/" + encodeURIComponent(gallery.name) + ".webp?AuthCode="+state.AuthCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user