移除多余代码

pull/392/head
lyswhut 2020-12-13 13:30:21 +08:00
parent 0a919d7076
commit 382235c556
2 changed files with 6 additions and 10 deletions

View File

@ -846,18 +846,16 @@ export default {
} else { } else {
this.fetchingListStatus[id] = true this.fetchingListStatus[id] = true
} }
return this.getListDetailAll({ source, id: sourceListId }).catch(err => { return this.getListDetailAll({ source, id: sourceListId }).finally(() => {
return Promise.reject(err)
}).finally(() => {
this.fetchingListStatus[id] = false this.fetchingListStatus[id] = false
}) })
}, },
async handleSyncSourceList(index) { async handleSyncSourceList(index) {
const targetList = this.userList[index] const targetListInfo = this.userList[index]
const list = await this.fetchList(targetList.id, targetList.source, targetList.sourceListId) const list = await this.fetchList(targetListInfo.id, targetListInfo.source, targetListInfo.sourceListId)
// console.log(targetList.list.length, list.length) // console.log(targetListInfo.list.length, list.length)
this.setList({ this.setList({
...targetList, ...targetListInfo,
list, list,
}) })
}, },

View File

@ -405,9 +405,7 @@ export default {
}, },
async fetchList() { async fetchList() {
this.detailLoading = true this.detailLoading = true
return this.getListDetailAll({ source: this.source, id: this.selectListInfo.id }).catch(err => { return this.getListDetailAll({ source: this.source, id: this.selectListInfo.id }).finally(() => {
return Promise.reject(err)
}).finally(() => {
this.detailLoading = false this.detailLoading = false
}) })
}, },