File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 1
- GH_TOKEN = 24f0914002270ceb8031787549550b7e43ddcc74
1
+ GH_TOKEN = 97570b8c9f368027800fb555f9a860aa5bf91121
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " zy" ,
3
- "version" : " 0.7.20 " ,
3
+ "version" : " 0.7.21 " ,
4
4
"author" : " Hunlongyu" ,
5
5
"description" : " ZY Player 资源播放器" ,
6
6
"private" : true ,
Original file line number Diff line number Diff line change 42
42
width : 0px ;
43
43
}
44
44
}
45
+ .el-loading-mask {
46
+ background-color : var (--d-bgc );
47
+ opacity : 0.9 ;
48
+ }
45
49
.Header , .Aside {
46
50
i {
47
51
color : var (--d-icon );
Original file line number Diff line number Diff line change 26
26
</el-card >
27
27
</el-row >
28
28
</el-row >
29
- <el-row class =" item update" >
29
+ <el-row class =" item update about " >
30
30
<el-row class =" title" ><i class =" el-icon-refresh" ></i ><span >更新</span ></el-row >
31
+ <el-row class =" info" >
32
+ <ul >
33
+ <li >当前版本: {{version}}</li >
34
+ <li >最新版本: {{version}}</li >
35
+ </ul >
36
+ </el-row >
31
37
<el-row class =" btns" >
32
- <el-button size =" small" @click =" checkUpdate " >检查更新 </el-button >
38
+ <el-button v-show = " download " size =" small" @click =" linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/latest') " >下载更新 </el-button >
33
39
</el-row >
34
40
</el-row >
35
41
<el-row class =" item about" >
@@ -56,7 +62,9 @@ export default Vue.extend({
56
62
data () {
57
63
return {
58
64
sites: sites ,
59
- dbSite: 0
65
+ dbSite: 0 ,
66
+ version: ' v0.7.21' ,
67
+ download: false
60
68
}
61
69
},
62
70
computed: {
@@ -118,11 +126,18 @@ export default Vue.extend({
118
126
})
119
127
},
120
128
checkUpdate () {
121
- fly .get (' https://api.github.com/repos/Hunlongyu/ZY-Player/releases/latest' ).then (() => {}).catch (() => {})
129
+ fly .get (' https://api.github.com/repos/Hunlongyu/ZY-Player/releases/latest' ).then (res => {
130
+ if (res .data .tag_name !== this .version ) {
131
+ this .download = true
132
+ } else {
133
+ this .download = false
134
+ }
135
+ })
122
136
}
123
137
},
124
138
created () {
125
139
this .initSetting ()
140
+ this .checkUpdate ()
126
141
}
127
142
})
128
143
</script >
You can’t perform that action at this time.
0 commit comments