iptv移到设置界面,播放界面不加载视频时自动弹出频道列表

This commit is contained in:
buvta
2020-11-20 22:50:57 +08:00
parent 647c540f0b
commit 384ae10475
4 changed files with 15 additions and 9 deletions

View File

@@ -5,10 +5,10 @@
<Frame />
<Film v-show="view === 'Film'" />
<Play v-show="view === 'Play'" />
<IPTV v-show="view === 'IPTV'" />
<Star v-show="view === 'Star'" />
<History v-show="view === 'History'" />
<Setting v-show="view === 'Setting'" />
<IPTV v-if="view === 'IPTV'" />
<EditSites v-if="view === 'EditSites'"/>
<Recommendation v-show="view === 'Recommendation'" />
</div>

View File

@@ -21,13 +21,6 @@
<path d="M4,18 L4,9"/>
</svg>
</span>
<span :class="[view === 'IPTV' ? 'active ': ''] + 'zy-svg'" @click="changeView('IPTV')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="tvIconTitle">
<title id="tvIconTitle">电视直播</title>
<polygon points="20 8 20 20 4 20 4 8"></polygon>
<polyline stroke-linejoin="round" points="8 4 12 7.917 16 4"></polyline>
</svg>
</span>
<span :class="[view === 'Play' ? 'active ': ''] + 'zy-svg'" @click="changeView('Play')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="playIconTitle">
<title id="playIconTitle">播放</title>

View File

@@ -386,6 +386,10 @@ export default {
view () {
this.right.show = false
this.right.type = ''
if (this.view === 'Play') {
this.getChannelList()
if (this.video.key === '') this.channelListShow = true
}
},
video: {
handler () {
@@ -471,6 +475,7 @@ export default {
},
async getUrls () {
if (this.video.key === '') {
this.channelListShow = true
return false
}
this.name = ''
@@ -484,7 +489,6 @@ export default {
if (this.video.iptv) {
// 是直播源,直接播放
await this.getChannelList()
this.playChannel(this.video.iptv)
} else {
this.iptvMode = false
@@ -1371,6 +1375,7 @@ export default {
},
created () {
this.getAllhistory()
this.getChannelList()
this.mtEvent()
},
async mounted () {

View File

@@ -72,6 +72,14 @@
</div>
</div>
</div>
<div class="site">
<div class="title">直播源管理</div>
<div class="site-box">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="view = 'IPTV'">编辑直播源</div>
</div>
</div>
</div>
<div class="site">
<div class="title">源管理</div>
<div class="site-box">