From cb68da5a2288b949e7eaab73f7f4bd4cff0fe1a5 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Fri, 20 Nov 2020 12:00:18 +0800 Subject: [PATCH] =?UTF-8?q?Play=E8=B0=83=E6=95=B4=E4=B8=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 4c983d6..172b831 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -386,7 +386,9 @@ export default { view () { this.right.show = false this.right.type = '' - this.getChannelList() + if (this.view === 'Play') { + this.getChannelList() + } }, video: { handler () { @@ -434,7 +436,6 @@ export default { var searchRecordList = this.searchRecordList.slice(0, -1) var results = queryString ? searchRecordList.filter(this.createFilter(queryString)) : this.searchRecordList // 调用 callback 返回建议列表的数据 - console.log(results) cb(results) }, createFilter (queryString) { @@ -506,14 +507,14 @@ export default { playChannel (channel) { if (channel.channels) { this.right.sources = channel.channels.filter(e => e.isActive) - channel = channel.channels.find(e => e.id === channel.prefer) || channel.channels.filter(e => e.isActive)[0] + channel = channel.prefer ? channel.channels.find(e => e.id === channel.prefer) : channel.channels.filter(e => e.isActive)[0] } else { - const parent = this.channelList.find(e => e.id === channel.channelID) - parent.prefer = channel.id - channelList.remove(parent.id) - channelList.add(parent) + const ele = this.channelList.find(e => e.id === channel.channelID) + ele.prefer = channel.id + channelList.remove(ele.id) + channelList.add(ele) this.getChannelList() - this.right.sources = parent.channels.filter(e => e.isActive) + this.right.sources = ele.channels.filter(e => e.isActive) } this.video.iptv = channel this.name = channel.name @@ -966,7 +967,6 @@ export default { this.right.currentTime = this.xg.currentTime } else { this.right.type = 'sources' - console.log(this.right.sources) } this.right.show = true },