From 154fef31eb3c1dbdf72f7ee79e27b85563458d2c Mon Sep 17 00:00:00 2001 From: ngfchl Date: Mon, 19 Sep 2022 00:03:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=AF=8F5=E7=A7=92=E5=88=B7=E6=96=B0=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=B8=8B=E4=B8=80=E6=AD=A5=E6=90=9E?= =?UTF-8?q?=E5=8F=AF=E6=9A=82=E5=81=9C=E5=88=B7=E6=96=B0=EF=BC=8C=E6=9D=A5?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/downloading.html | 79 ++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 26 deletions(-) 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) {