优化提交逻辑
This commit is contained in:
parent
be43729cd6
commit
63ab838f43
@ -32,7 +32,7 @@ const actions = {
|
||||
})).then((res) => {
|
||||
if(res.data.result === "success") {
|
||||
ElMessage("提交成功")
|
||||
context.commit("_setPreDownloadGallery", false)
|
||||
context.commit("_setPreDownloadGallery", {gallery:false, resolution:data.targetResolution})
|
||||
}
|
||||
else{
|
||||
if(res.data.data)
|
||||
@ -54,7 +54,7 @@ const actions = {
|
||||
}).then((res) => {
|
||||
if(res.data.result === 'success'){
|
||||
const gallery = JSON.parse(res.data.data)
|
||||
context.commit("_setPreDownloadGallery", gallery)
|
||||
context.commit("_setPreDownloadGallery", {gallery})
|
||||
}
|
||||
else
|
||||
ElMessage("查询失败")
|
||||
@ -168,8 +168,12 @@ const mutations = {
|
||||
}
|
||||
})
|
||||
},
|
||||
_setPreDownloadGallery(state,gallery){
|
||||
state.preDownloadGallery = gallery
|
||||
_setPreDownloadGallery(state,data){
|
||||
if(data.gallery === false) {
|
||||
state.preDownloadGallery.resolution = data.resolution
|
||||
state.totalTask.push(state.preDownloadGallery)
|
||||
}
|
||||
state.preDownloadGallery = data.gallery
|
||||
},
|
||||
_openHistoryPanel(state){
|
||||
state.showHistory = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user