上线本子更新(同步更新)修改初始排序,与pc端保持一致
This commit is contained in:
parent
ca9c7700fa
commit
9f30e27677
@ -20,6 +20,7 @@
|
||||
<el-button @click="showThumbnail(props.row)" :disabled="props.row.download === undefined">预览封面</el-button><br>
|
||||
<el-button @click="changeCollect(props.row.gid, props.row.isCollect)" :disabled="props.row.download === undefined">{{props.row.isCollect ? '取消收藏' : '收藏'}}</el-button>
|
||||
<el-button @click="editTag(props.row.gid, props.row.tag)" :disabled="props.row.download === undefined">编辑标签</el-button>
|
||||
<el-button @click="updateGallery(props.row.link)" :disabled="props.row.download === undefined">更新本子</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -262,6 +263,9 @@ function submitTag(){
|
||||
function downloadTask(link){
|
||||
window.open(link)
|
||||
}
|
||||
function updateGallery(link){
|
||||
store.dispatch("updateGallery", link)
|
||||
}
|
||||
function deleteGallery(gid){
|
||||
store.dispatch("deleteGallery", gid)
|
||||
}
|
||||
|
||||
@ -116,6 +116,20 @@ const actions = {
|
||||
ElMessage("查询失败")
|
||||
})
|
||||
},
|
||||
updateGallery(context, link){
|
||||
axios.post(GalleryManageUrl + "/update", qs.stringify({AuthCode: state.AuthCode, link}))
|
||||
.then((res) => {
|
||||
if(res.data.result === 'success' && state.refreshTimer === 0){
|
||||
setTimeout(() => {
|
||||
context.dispatch("updateGalleryTasks", "all").then()
|
||||
}, 5000)
|
||||
state.refreshTimer = setInterval(() => {
|
||||
context.dispatch("updateGalleryTasks", "undone").then()
|
||||
}, 20000)
|
||||
}
|
||||
ElMessage(res.data.data)
|
||||
})
|
||||
},
|
||||
validate(context, AuthCode){
|
||||
axios.post(BaseUrl + "validate?AuthCode=" + AuthCode).then((res)=>{
|
||||
if(res.data.result === 'success'){
|
||||
@ -577,7 +591,7 @@ const state = {
|
||||
searchTask:[], //搜索到的任务
|
||||
isShowHistory:false, //是否打开面板
|
||||
showType:"gallery", //展示类型
|
||||
sortType:"name", //排序类型
|
||||
sortType:"shortName", //排序类型
|
||||
weekUsed:{}, //每周用量
|
||||
|
||||
maskDomain:[] //伪装域名
|
||||
|
||||
Loading…
Reference in New Issue
Block a user