升级 Vite 并补齐管理子路径鉴权参数

This commit is contained in:
root
2026-09-14 19:17:23 +08:00
parent 24b9b244b7
commit c115b6529d
7 changed files with 684 additions and 533 deletions
+8 -1
View File
@@ -67,7 +67,7 @@
<el-dialog title="查询" v-model="chosenGallery" style="height: 350px">
<el-image v-show='chosenGallery.thumb_link !== undefined'
style="float: right; width: 250px; height: 250px;" fit="contain"
:src="chosenGallery.thumb_link !== undefined ? 'https://downloader.lionwebsite.xyz/GalleryManage/ehThumbnail?path=' + chosenGallery.thumb_link: ''"/>
:src="chosenGallery.thumb_link !== undefined ? thumbnailUrl(chosenGallery.thumb_link) : ''"/>
<table>
<tr>名字:{{chosenGallery.name}}</tr>
<tr>页数:{{chosenGallery.pages}}</tr>
@@ -293,6 +293,13 @@ function readOnlineGallery(gallery){
store.dispatch("readOnlineGallery", gallery)
}
function thumbnailUrl(path) {
return "https://downloader.lionwebsite.xyz/GalleryManage/ehThumbnail?" + new URLSearchParams({
path,
AuthCode: store.state.AuthCode
}).toString()
}
function resetUndone(){
store.dispatch("resetUndone").then()
}
+10 -3
View File
@@ -65,6 +65,13 @@ function queryRemoteTask(){
function close(){
emit("close")
}
function thumbnailUrl(path) {
return "https://downloader.lionwebsite.xyz/GalleryManage/ehThumbnail?" + new URLSearchParams({
path,
AuthCode: store.state.AuthCode
}).toString()
}
</script>
<template>
@@ -74,8 +81,8 @@ function close(){
</div>
<el-scrollbar height="75vh" ref="scrollBar">
<div style="height: 251px; width: 100%; " v-for="gallery in galleries">
<el-image alt="picture" :preview-src-list="['https://downloader.lionwebsite.xyz/GalleryManage/ehThumbnail?path=' + gallery.thumbnailUrl,]"
:src="'https://downloader.lionwebsite.xyz/GalleryManage/ehThumbnail?path=' + gallery.thumbnailUrl"
<el-image alt="picture" :preview-src-list="[thumbnailUrl(gallery.thumbnailUrl)]"
:src="thumbnailUrl(gallery.thumbnailUrl)"
style="height:250px;width:250px;float: left;"
fit="contain"
loading="lazy"
@@ -121,4 +128,4 @@ function close(){
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>
</style>
+16 -4
View File
@@ -19,7 +19,7 @@ axios.interceptors.response.use(
const actions = {
reconnect(context) {
axios.post(GalleryManageUrl + "/reconnect", {
axios.post(GalleryManageUrl + "/reconnect", null, {
params: {
AuthCode: context.state.AuthCode
}
@@ -181,7 +181,9 @@ const actions = {
if(gallery.images !== undefined && gallery.images.length !== 0)
context.commit("_setReadingGallery", gallery)
else
axios.post(GalleryManageUrl + "/cache?url=" + gallery.link).then((res) => {
return axios.post(GalleryManageUrl + "/cache", null, {
params: {url: gallery.link, AuthCode: context.state.AuthCode}
}).then((res) => {
if (res.data.result === 'success') {
gallery.pages = res.data.data.pages
setTimeout(() => {
@@ -243,7 +245,10 @@ const mutations = {
//处理名字
task.shortName = getShortname(task.name)
if(task.thumb_link.trim() !== '')
task.thumb_link = GalleryManageUrl + "/ehThumbnail?path=" + task.thumb_link
task.thumb_link = buildGalleryManageUrl("/ehThumbnail", {
path: task.thumb_link,
AuthCode: state.AuthCode
})
else
delete task.thumb_link
@@ -396,7 +401,10 @@ const mutations = {
if(gallery.images === undefined) {
gallery.images = []
for(let i=1; i<=gallery.pages; i++)
gallery.images.push(GalleryManageUrl + "/onlineImage/" + i + "?gid=" + gallery.gid);
gallery.images.push(buildGalleryManageUrl("/onlineImage/" + i, {
gid: gallery.gid,
AuthCode: state.AuthCode
}));
}
state.readingGallery = gallery
state.isReading = true;
@@ -499,6 +507,10 @@ function buildGalleryDownloadUrl(gid, AuthCode){
return GalleryManageUrl + "/file/" + gid + ".zip?" + params.toString()
}
function buildGalleryManageUrl(path, params){
return GalleryManageUrl + path + "?" + new URLSearchParams(params).toString()
}
function confirmCurrentTask(state){
switch (state.category){
case 'myDownload':