Skip to content

Commit bf0ccef

Browse files
committed
v0.7.10 播放视频页面优化提示, 测试icon
1 parent 0161e2e commit bf0ccef

File tree

3 files changed

+57
-23
lines changed

3 files changed

+57
-23
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>icon.png">
8-
<title>zy</title>
8+
<title>ZY Player</title>
99
</head>
1010
<body>
1111
<noscript>

src/page/player.vue

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
<template>
22
<el-row class="player">
3-
<el-row class="player-title">
4-
<el-row class="player-title-box" type="flex" justify="space-between">
5-
<span>
6-
<span>{{Object.keys(video).length !== 0 ? video.name + ' -- ' : '无视频 -- '}}</span>
7-
<span>{{ num }}</span>
8-
</span>
9-
<span v-show="Object.keys(video).length > 0">
10-
<el-button size="mini" @click="openDetail" icon="el-icon-document" circle></el-button>
11-
<el-button size="mini" v-show="!star" @click="starEvent" icon="el-icon-star-off" circle></el-button>
12-
<el-button size="mini" v-show="star" @click="starEvent" icon="el-icon-star-on" circle></el-button>
13-
</span>
3+
<el-row class="player-show" v-if="Object.keys(video).length > 0">
4+
<el-row class="player-title">
5+
<el-row class="player-title-box" type="flex" justify="space-between">
6+
<span>
7+
<span>{{video.name ? video.name + ' -- ' : '' }}</span>
8+
<span>{{ num }}</span>
9+
</span>
10+
<span>
11+
<el-button size="mini" @click="openDetail" icon="el-icon-document" circle></el-button>
12+
<el-button size="mini" v-show="!star" @click="starEvent" icon="el-icon-star-off" circle></el-button>
13+
<el-button size="mini" v-show="star" @click="starEvent" icon="el-icon-star-on" circle></el-button>
14+
</span>
15+
</el-row>
16+
</el-row>
17+
<el-row class="player-box">
18+
<div id="xg"></div>
19+
</el-row>
20+
<el-row class="player-films table-box">
21+
<el-row class="player-films-box">
22+
<el-button :type="j === video.index ? 'primary' : ''" size="mini" v-for="(i, j) in urls" :key="j" @click="playBtnClick(i, j)" plain>{{i | ftLink}}</el-button>
23+
</el-row>
1424
</el-row>
1525
</el-row>
16-
<el-row class="player-box">
17-
<div id="xg"></div>
18-
</el-row>
19-
<el-row class="player-films table-box">
20-
<el-row class="player-films-box">
21-
<el-button :type="j === video.index ? 'primary' : ''" size="mini" v-for="(i, j) in urls" :key="j" @click="playBtnClick(i, j)" plain>{{i | ftLink}}</el-button>
26+
<el-row class="player-none" v-if="Object.keys(video).length <= 0">
27+
<el-row class="tips">
28+
浏览或者搜索资源, 点击播放视频, 即可观看~
29+
</el-row>
30+
<el-row class="btns">
31+
<el-button size="small" @click="goView('Film')" icon="el-icon-film">浏览</el-button>
32+
<el-button size="small" @click="goView('Search')" icon="el-icon-search">搜索</el-button>
2233
</el-row>
2334
</el-row>
2435
</el-row>
@@ -62,8 +73,13 @@ export default Vue.extend({
6273
this.SET_VIDEO(val)
6374
}
6475
},
65-
Main () {
66-
return this.$store.getters.getMain
76+
Main: {
77+
get () {
78+
return this.$store.getters.getMain
79+
},
80+
set (val) {
81+
this.SET_MAIN(val)
82+
}
6783
}
6884
},
6985
watch: {
@@ -81,7 +97,10 @@ export default Vue.extend({
8197
}
8298
},
8399
methods: {
84-
...mapMutations(['SET_DETAIL', 'SET_VIDEO']),
100+
...mapMutations(['SET_DETAIL', 'SET_VIDEO', 'SET_MAIN']),
101+
goView (e: string) {
102+
this.Main = e
103+
},
85104
openDetail () {
86105
let d = {
87106
show: true,
@@ -158,6 +177,22 @@ export default Vue.extend({
158177
height: 100%;
159178
width: 100%;
160179
position: relative;
180+
.player-show{
181+
height: 100%;
182+
width: 100%;
183+
position: relative;
184+
}
185+
.player-none{
186+
height: 100%;
187+
display: flex;
188+
justify-content: center;
189+
align-items: center;
190+
flex-direction: column;
191+
.tips{
192+
font-size: 14px;
193+
margin-bottom: 10px;
194+
}
195+
}
161196
.player-title{
162197
position: absolute;
163198
top: 0;

vue.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ module.exports = {
44
builderOptions: {
55
win: {
66
icon: './build/icons/icon.ico'
7-
},
8-
productName: 'ZY Player'
7+
}
98
},
109
chainWebpackRendererProcess: config => {
1110
if (process.env.NODE_ENV === 'development') {

0 commit comments

Comments
 (0)