diff --git a/src/components/Side.vue b/src/components/Side.vue
index 2794b2e..9eaeff5 100644
--- a/src/components/Side.vue
+++ b/src/components/Side.vue
@@ -17,6 +17,7 @@
{{props.row.isCollect ? '取消收藏' : '收藏'}}
编辑标签
+ 更新
@@ -264,6 +265,9 @@ function submitTag(){
function downloadTask(link){
window.open(link)
}
+function updateGallery(link){
+ store.dispatch("updateGallery", link)
+}
function deleteGallery(gid){
store.dispatch("deleteGallery", gid)
}
diff --git a/src/store/index.js b/src/store/index.js
index 1968831..89c762d 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -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'){