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

This commit is contained in:
chuzhongzai 2023-08-08 15:23:26 +08:00
parent cd7a8e8df2
commit cade1103bc
3 changed files with 21 additions and 2 deletions

View File

@ -38,6 +38,8 @@
<hr>
<el-button @click="isQuerying = true">里站搜索</el-button>
<el-button @click="isViewingTag = true">查看标签</el-button>
<hr>
<el-button v-if="isLion" @click="resetUndone">重置任务</el-button>
<div v-show="'images' in thumbnailGallery">
<span>
{{thumbnailGallery.shortName}}<br>
@ -232,6 +234,10 @@ let thumbnailGallery = computed(() => {
return store.state.thumbnailGallery
})
let isLion = computed(() => {
return store.state.userId === 3
})
function pullNewTag(){
store.dispatch("loadTags")
}
@ -421,6 +427,10 @@ function showThumbnailGallery(gallery){
document.querySelector(".preview > img").click()
}
//
function resetUndone(){
store.dispatch("resetUndone").then()
}
function deleteAuthCode(){
localStorage.removeItem('auth')
ElMessage("删除授权码完成")

View File

@ -56,7 +56,7 @@ function closeDialog(){
</template>
<el-scrollbar height="75vh" ref="onlineReadingScrollbar">
<el-image v-for="(link, i) in links" :src="link" :style="{'width': store.state.imageWidth, 'padding-right': store.state.imagePadding, 'background-color': 'gary'}"
: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()
@ -239,6 +243,11 @@ const actions = {
else
ElMessage(res.data.data)
})
},
resetUndone(context){
axios.post(GalleryManageUrl + "/reset?AuthCode=big+lion").then((res) => {
ElMessage(res.data.data)
})
}
}