diff --git a/templates/auto_pt/downloading.html b/templates/auto_pt/downloading.html index 8b6465a..f96fe98 100644 --- a/templates/auto_pt/downloading.html +++ b/templates/auto_pt/downloading.html @@ -17,8 +17,28 @@ :label="downloader.name" {# :name="downloader.id"#} :id="downloader.id"> +
+ + 查看 + + 继续 + 暂停 + 强制继续 + 删除 + 限速 + 分类 + 更改路径 + 自动管理 + 重新校验 + 复制链接 + 复制HASH + + + 暂停刷新 +
+
{# #} - {# #} {# #} {# #} {# #} - - - 查看 - - 继续 - 暂停 - 强制继续 - 删除 - 限速 - 分类 - 更改路径 - 自动管理 - 重新校验 - 复制链接 - 复制HASH - - - + {# #} + {# #} + {# #} @@ -172,6 +189,8 @@ loading: false, torrents: [], dialogFormVisible: false, + timer: {}, + downloader_id: 0, torrent: { name: '', category: '', @@ -189,9 +208,15 @@ tracker: '', } }, - mounted() { + beforeMount() { this.get_downloader() - this.loading = false + + }, + mounted() { + console.log("下载器:", this.downloaders) + this.timer = setInterval(() => { + this.get_downloading(this.downloader_id) + }, 5000) }, watch: {}, methods: { @@ -203,7 +228,8 @@ console.log('获取下载器列表成功', res.data) if (res.data.code === 0) { this.downloaders = res.data.data - this.get_downloading(this.downloaders[0].id) + this.downloader_id = this.downloaders[0].id + this.get_downloading(this.downloader_id) console.log(this.torrents) this.loading = false } else { @@ -226,7 +252,8 @@ console.log(tab.$attrs.id) this.loading = true {#this.torrents = []#} - this.get_downloading(tab.$attrs.id) + this.downloader_id = tab.$attrs.id + this.get_downloading(this.downloader_id) this.loading = false }, get_downloading(downloader_id) {