A full-featured download manager.
style: remove log
Dr_rOot5589a5703b50
diff --git a/src/renderer/components/Task/TaskActions.vue b/src/renderer/components/Task/TaskActions.vueindex 32fb3dfc..13b3afe3 100644--- a/src/renderer/components/Task/TaskActions.vue+++ b/src/renderer/components/Task/TaskActions.vue@@ -85,6 +85,9 @@},onResumeAllClick: function () {this.$store.dispatch('task/resumeAllTask')+ .then(() => {+ this.$message.success(`恢复全部任务成功`)+ }).catch(({ code }) => {if (code === 1) {this.$message.error(`恢复全部任务失败`)@@ -93,6 +96,9 @@},onPauseAllClick: function () {this.$store.dispatch('task/pauseAllTask')+ .then(() => {+ this.$message.success(`暂停全部任务成功`)+ }).catch(({ code }) => {if (code === 1) {this.$message.error(`暂停全部任务失败`)@@ -101,6 +107,9 @@},onPurgeRecordClick: function () {this.$store.dispatch('task/purgeTaskRecord')+ .then(() => {+ this.$message.success(`移除全部下载记录成功`)+ }).catch(({ code }) => {if (code === 1) {this.$message.error(`移除全部下载记录失败`)diff --git a/src/renderer/store/modules/task.js b/src/renderer/store/modules/task.jsindex 60ed62d4..3de2cd5f 100644--- a/src/renderer/store/modules/task.js+++ b/src/renderer/store/modules/task.js@@ -40,17 +40,14 @@ const actions = {dispatch('fetchList')},fetchList ({ state, commit }) {- console.log('fetchList===>')api.fetchTaskList({ type: state.currentList }).then((data) => {- console.log('data===>', data)commit('UPDATE_TASK_LIST', data)})},fetchItem ({ dispatch }, gid) {api.fetchTaskItem({ gid }).then((data) => {- console.log('data===>', data)dispatch('updateCurrentTaskItem', data)})},@@ -87,7 +84,6 @@ const actions = {},removeTask ({ dispatch }, task) {const { gid } = task- console.log('removeTask', gid)return api.removeTask({ gid }).catch(() => {return api.forceRemoveTask({ gid })@@ -99,7 +95,6 @@ const actions = {},pauseTask ({ dispatch }, task) {const { gid } = task- console.log('pauseTask', gid)return api.pauseTask({ gid }).catch(() => {return api.forcePauseTask({ gid })@@ -111,7 +106,6 @@ const actions = {},resumeTask ({ dispatch }, task) {const { gid } = task- console.log('resumeTask', gid)return api.resumeTask({ gid }).finally(() => {dispatch('fetchList')@@ -119,7 +113,6 @@ const actions = {})},pauseAllTask ({ dispatch }) {- console.log('pauseAllTask===>')return api.pauseAllTask().catch(() => {return api.forcePauseAllTask()@@ -130,7 +123,6 @@ const actions = {})},resumeAllTask ({ dispatch }) {- console.log('resumeAllTask===>')return api.resumeAllTask().finally(() => {dispatch('fetchList')@@ -139,7 +131,6 @@ const actions = {},removeTaskRecord ({ dispatch }, task) {const { gid } = task- console.log('removeTaskRecord', gid)return api.removeTaskRecord({ gid }).finally(() => dispatch('fetchList'))},@@ -151,7 +142,6 @@ const actions = {.finally(() => dispatch('fetchList'))},toggleTask ({ dispatch }, task) {- console.log('切换任务状态===>', task)const { status } = taskif (status === 'active') {return dispatch('pauseTask', task)