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
}
+5 -1
View File
@@ -19,7 +19,11 @@ if (!electronStore_config.get('version') && electronStore_config.get('setting'))
if (list.loveList) electronStore_list.set('loveList', list.loveList)
electronStore_config.delete('list')
}
if (electronStore_config.get('download')) electronStore_config.delete('download')
const downloadList = electronStore_config.get('download')
if (downloadList) {
if (downloadList.list) electronStore_list.set('downloadList', downloadList.list)
electronStore_config.delete('download')
}
}
const { version: settingVersion, setting } = updateSetting(electronStore_config.get('setting'), electronStore_config.get('version'))
electronStore_config.set('version', settingVersion)