允许创建任务时一并提交tag,修复切换搜索类型时本子会变的问题(我也不确定有没有修好)
This commit is contained in:
+8
-5
@@ -38,11 +38,12 @@ const actions = {
|
||||
axios.post(GalleryManageUrl, qs.stringify({
|
||||
AuthCode: state.AuthCode,
|
||||
link: data.link,
|
||||
targetResolution: data.targetResolution
|
||||
targetResolution: data.targetResolution,
|
||||
tag: data.tag
|
||||
})).then((res) => {
|
||||
if(res.data.result === "success") {
|
||||
ElMessage("提交成功")
|
||||
context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution})
|
||||
context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution, tag: data.tag})
|
||||
if(state.galleryRefreshTimer === 0)
|
||||
state.galleryRefreshTimer = setInterval(() => {
|
||||
context.dispatch("updateGalleryTasks", "undone").then()
|
||||
@@ -391,7 +392,8 @@ const mutations = {
|
||||
ElMessage("未找到该关键字的任务")
|
||||
else
|
||||
state.currentTasks = state.searchTask
|
||||
}
|
||||
}else
|
||||
confirmCurrentTask(state)
|
||||
},
|
||||
_searchLocalByTag(state, tags) {
|
||||
state.searchTask.splice(0)
|
||||
@@ -418,7 +420,8 @@ const mutations = {
|
||||
ElMessage("未找到符合这些tag的任务")
|
||||
else
|
||||
state.currentTasks = state.searchTask
|
||||
}
|
||||
}else
|
||||
confirmCurrentTask(state)
|
||||
},
|
||||
_deleteGallery(state, gid){
|
||||
let tasks = [state.totalGalleryTask, state.downloadGallery, state.collectGallery]
|
||||
@@ -431,7 +434,7 @@ const mutations = {
|
||||
state.chosenGallery.fileSize = "等待下载完成后再查看"
|
||||
state.chosenGallery.createTimeDisplay = "等待下载完成后再查看"
|
||||
state.chosenGallery.progress = "已提交"
|
||||
state.chosenGallery.tag = ""
|
||||
state.chosenGallery.tag = data.tag
|
||||
state.chosenGallery.downloader = state.userId
|
||||
state.totalGalleryTask.push(state.chosenGallery)
|
||||
state.downloadGallery.push(state.chosenGallery)
|
||||
|
||||
Reference in New Issue
Block a user