优化代码

This commit is contained in:
chuzhongzai 2024-03-04 23:12:05 +08:00
parent b02e96a021
commit 5e4b700e0c
5 changed files with 22 additions and 20 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="DashBoard" v-show="loadComplete">
<span>E站额度本周已用:{{weekUsed.weekUsedAmount}} 上次重置时间:{{weekUsed.lastResetAmountTime}}</span><br>
<span>本周已用额度:{{weekUsed.weekUsedAmount}} 上次重置时间:{{weekUsed.lastResetAmountTime}}</span><br>
<el-button @click="queryWeekUsedAmount">查询用量</el-button>
<hr>
<el-row>
@ -28,7 +28,7 @@
<span style="display: inline">夜间模式</span>
<el-switch @click="toggleStyle" v-model="isDark">夜间模式</el-switch>
<hr>
<el-button @click="isQuerying = true">里站搜索</el-button>
<el-button @click="isQuerying = true">在线搜索</el-button>
<hr>
<el-button v-if="isLion" @click="resetUndone">重置任务</el-button>
<div v-show="thumbnailGallery.thumb_link !== undefined">
@ -42,16 +42,16 @@
</div>
</div>
<el-dialog title="查询本子" v-model="chosenGallery" style="height: 350px">
<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: ''"/>
<table>
<tr>本子名字:{{chosenGallery.name}}</tr>
<tr>本子页数:{{chosenGallery.pages}}</tr>
<tr>本子语言:{{chosenGallery.language}}</tr>
<tr>本子大小:{{chosenGallery.fileSize}}</tr>
<tr>本子状态:{{chosenGallery.status}}</tr>
<tr>名字:{{chosenGallery.name}}</tr>
<tr>页数:{{chosenGallery.pages}}</tr>
<tr>语言:{{chosenGallery.language}}</tr>
<tr>大小:{{chosenGallery.fileSize}}</tr>
<tr>状态:{{chosenGallery.status}}</tr>
<tr v-if="chosenGallery.availableResolution">
目标分辨率:<el-select v-model="targetResolution" style="width: 200px">
<el-option v-for="(fileSize, resolution) in chosenGallery.availableResolution" :value="resolution"

View File

@ -74,7 +74,7 @@ function close(){
</script>
<template>
<el-dialog title="里站搜索" v-model="isShowUp" top="0" style="margin-bottom: 0" @close="close">
<el-dialog title="在线搜索" v-model="isShowUp" top="0" style="margin-bottom: 0" @close="close">
<div style="text-align: center">
<el-input v-model="keyword"></el-input> <el-button @click="queryGalleries(null)">查询</el-button> <div id="loading"/>
</div>

View File

@ -25,7 +25,7 @@ watch((store.state), (value) => {
}
})
//
//
function alterPage(){
if(readingGallery.value.images.length > lengthPerPage.value){
links.value = readingGallery.value.images.slice(0, lengthPerPage.value)

View File

@ -1,6 +1,5 @@
<template>
<div class="side" style="width: 100%">
<span v-show="loadComplete">本子历史</span>
<div v-show="loadComplete" class="load_complete">
<el-table :data="currentTasks"
:empty-text="emptyText"
@ -49,7 +48,7 @@
</el-table-column>
</el-table>
<el-row class="pageChanger">
<el-col>
<el-col v-if="username !== 'test'">
<el-select v-model="category" @change="changeCategory">
<template #prefix>
分类
@ -109,6 +108,9 @@ let category = ref("myDownload") //myDownload myCollect total
let galleryNameType = ref("shortName") // shortName name
let sortType = ref("shortName") // shortName name createTime
let targetPage = ref(1) //
let username = computed(() => {
return store.state.username
})
//
let debounceTimer = 0
@ -139,7 +141,7 @@ let isLion = computed(() => {
let emptyText = computed(() => {
let action = category.value === 'myDownload' ? '下载': '收藏'
return '您未' + action + "本子"
return '您未' + action + ""
})
//

View File

@ -368,14 +368,14 @@ const mutations = {
const state = {
websocket: {}, //websocket
totalGalleryTask: [], //存放本子数据的数组
chosenGallery: false, //准备下载的本子
thumbnailGallery: {}, //缩略图本子
collectGallery: [], //收藏的本子
downloadGallery: [], //下载的本子
totalGalleryTask: [], //存放数据的数组
chosenGallery: false, //准备下载
thumbnailGallery: {}, //缩略图
collectGallery: [], //收藏
downloadGallery: [], //下载
isSearch: false, //用于决定是否显示搜索结果
readingGallery: {'name': '', 'images': []}, //在线看本子
readingGallery: {'name': '', 'images': []}, //在线看
isReading: false, //是否正在看
currentGid: "", //当前GID
@ -391,7 +391,7 @@ const state = {
isAuth: false, //是否授权
AuthCode: '', //授权码
loadComplete: false, //是否加载完成
galleryRefreshTimer: 0, //本子更新计时器id
galleryRefreshTimer: 0, //更新计时器id
isInclude: false, //是否搜索到任务
searchTask: [], //搜索到的任务