From ffe821d107f77ffb138413e8f429e01231c5f391 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Tue, 20 Oct 2020 13:53:33 +0200 Subject: [PATCH] =?UTF-8?q?IPTV=E5=87=BD=E6=95=B0=E5=90=8D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IPTV.vue | 48 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/components/IPTV.vue b/src/components/IPTV.vue index 9933b09..5868bc9 100644 --- a/src/components/IPTV.vue +++ b/src/components/IPTV.vue @@ -3,10 +3,10 @@
总频道数:{{iptvList.length}} - 导出 - 导入 - 清空 - 重置 + 导出 + 导入 + 清空 + 重置 { - this.getSites() + this.getChannels() }).catch(err => { this.$message.warning('删除频道失败, 错误信息: ' + err) }) @@ -151,7 +151,7 @@ export default { }) }) }, - exportSites () { + exportChannels () { const options = { filters: [ { name: 'm3u file', extensions: ['m3u'] }, @@ -178,7 +178,7 @@ export default { this.$message.error(err) }) }, - importSites () { + importChannels () { const options = { filters: [ { name: 'm3u file', extensions: ['m3u', 'm3u8'] } @@ -210,7 +210,7 @@ export default { const uniqueList = [...new Map(docs.map(item => [item.url, item])).values()] iptv.clear().then(res => { iptv.bulkAdd(uniqueList).then(e => { - this.getSites() + this.getChannels() this.$message.success('导入成功') }) }) @@ -228,31 +228,31 @@ export default { return '其他' } }, - resetSitesEvent () { - this.resetSites(defaultSites) + resetChannelsEvent () { + this.resetChannels(defaultSites) }, - resetSites (newSites) { + resetChannels (newSites) { this.resetId(newSites) - iptv.clear().then(iptv.bulkAdd(newSites).then(this.getSites())) + iptv.clear().then(iptv.bulkAdd(newSites).then(this.getChannels())) }, - removeAllSites () { + removeAllChannels () { iptv.clear().then(res => { - this.getSites() + this.getChannels() }) }, - getSites () { + getChannels () { iptv.all().then(res => { this.iptvList = res }) }, - getSearchList () { + getSearchRecordList () { iptvSearch.all().then(res => { - this.searchList = res.reverse() + this.searchRecordList = res.reverse() }) }, clearSearch () { iptvSearch.clear().then(res => { - this.getSearchList() + this.getSearchRecordList() }) }, searchEvent (wd) { @@ -263,7 +263,7 @@ export default { if (!res) { iptvSearch.add({ keywords: wd }) } - this.getSearchList() + this.getSearchRecordList() }) } }, @@ -274,7 +274,7 @@ export default { updateDatabase (data) { iptv.clear().then(res => { this.resetId(data) - iptv.bulkAdd(data).then(this.getSites()) + iptv.bulkAdd(data).then(this.getChannels()) }) }, resetId (inArray) { @@ -300,8 +300,8 @@ export default { this.rowDrop() }, created () { - this.getSites() - this.getSearchList() + this.getChannels() + this.getSearchRecordList() } }