bug 修复

This commit is contained in:
lyswhut
2020-01-23 01:26:46 +08:00
parent 1b381af7a7
commit 1bfa8dcb3f
4 changed files with 30 additions and 10 deletions
+2 -4
View File
@@ -210,10 +210,9 @@ const actions = {
console.log('on complate')
},
onError(err) {
// console.log(err.code, err.message)
commit('onError', downloadInfo)
// console.log(tryNum[downloadInfo.key])
if (++tryNum[downloadInfo.key] > 2) {
commit('onError', downloadInfo)
_this.dispatch('download/startTask')
return
}
@@ -226,9 +225,8 @@ const actions = {
}
},
onFail(response) {
commit('onError', downloadInfo)
if (++tryNum[downloadInfo.key] > 2) {
commit('onError', downloadInfo)
_this.dispatch('download/startTask')
return
}