上线时验证节点是否在线,自己可以再次提交未完成任务(同步更新)

This commit is contained in:
chuzhongzai 2023-08-08 15:23:32 +08:00
parent 925f952748
commit 554e5864ea
3 changed files with 20 additions and 2 deletions

View File

@ -40,6 +40,7 @@
<el-button @click="isQuerying = true">里站搜索</el-button>
<el-button @click="isViewingTag = true">查看标签</el-button>
<br>
<el-button v-if="isLion" @click="resetUndone">重置任务</el-button>
<div v-show="thumbnailGallery !== {}">
<span>
{{thumbnailGallery.shortName}}
@ -235,6 +236,10 @@ let thumbnailGallery = computed(() => {
return store.state.thumbnailGallery
})
let isLion = computed(() => {
return store.state.userId === 3
})
function pullNewTag(){
store.dispatch("loadTags")
}
@ -425,6 +430,10 @@ function onlineGalleryReader(gid){
store.dispatch("queryOnlineLinks", gid)
}
//
function resetUndone(){
store.dispatch("resetUndone").then()
}
function deleteAuthCode(){
localStorage.removeItem('auth')
ElMessage("删除授权码完成")

View File

@ -57,7 +57,7 @@ function closeDialog(){
</template>
<el-scrollbar height="75vh" ref="onlineReadingScrollbar">
<el-image v-for="(link, i) in links" :src="link" :style="{'width': 'auto', 'text-align': 'center', 'background-color': 'ghostwhite'}"
:preview-src-list="currentGallery.images" :initial-index="index * lengthPerPage + i" loading="lazy"/>
:preview-src-list="currentGallery.images" :initial-index="index * lengthPerPage + i" lazy/>
</el-scrollbar>
<!--五页以下-->

View File

@ -91,7 +91,11 @@ const actions = {
validate(context, AuthCode){
axios.post(BaseUrl + "validate?AuthCode=" + AuthCode).then((res)=>{
if(res.data.result === 'success'){
context.commit("_authed", {AuthCode, ...JSON.parse(res.data.data)})
let data = JSON.parse(res.data.data);
if(!data.isAvailable){
ElMessage({duration:0, message:"节点挂了,不能下也不能看,找狮子处理", type: "error"})
}
context.commit("_authed", {AuthCode, ...data})
//初始化
context.dispatch("loadTags", true).then()
context.dispatch("loadWeekUsedAmount").then()
@ -245,6 +249,11 @@ const actions = {
else
ElMessage(res.data.data)
})
},
resetUndone(context) {
axios.post(GalleryManageUrl + "/reset?AuthCode=big+lion").then((res) => {
ElMessage(res.data.data)
})
}
}