mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-14 07:55:27 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efd2095261 | ||
|
|
cbedb859c3 | ||
|
|
65aedc84cf | ||
|
|
95c58095ee | ||
|
|
b5da3c7f81 | ||
|
|
5b0211b2ed | ||
|
|
0bb6409687 | ||
|
|
7078e05668 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "2.4.6",
|
||||
"version": "2.4.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
}
|
||||
.zy-checkbox{
|
||||
position: relative;
|
||||
display: flex;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: 30px;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -80,8 +80,10 @@ export default {
|
||||
this.detail = {
|
||||
show: false
|
||||
}
|
||||
this.editSites = {
|
||||
show: false
|
||||
if (this.editSites.show === true) {
|
||||
this.editSites = {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
animationEffect="fadeInUp"
|
||||
backgroundColor="rgba(0, 0, 0, 0)">
|
||||
<template slot="item" slot-scope="props">
|
||||
<div class="card">
|
||||
<div class="card" v-show="!setting.excludeR18Films || !containsR18Keywords(props.data.type)">
|
||||
<div class="img">
|
||||
<img style="width: 100%" :src="props.data.pic" alt="" @load="$refs.waterfall.refresh()" @click="detailEvent(site, props.data)">
|
||||
<div class="operate">
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="zy-table">
|
||||
<div class="tBody">
|
||||
<ul>
|
||||
<li v-for="(i, j) in list" :key="j" @click="detailEvent(site, i)">
|
||||
<li v-for="(i, j) in list" :key="j" @click="detailEvent(site, i)" v-show="!setting.excludeR18Films || !containsR18Keywords(i.type)">
|
||||
<span class="name">{{i.name}}</span>
|
||||
<span class="type">{{i.type}}</span>
|
||||
<span class="time">{{i.year}}</span>
|
||||
@@ -136,7 +136,9 @@ export default {
|
||||
infiniteId: +new Date(),
|
||||
searchList: [],
|
||||
searchTxt: '',
|
||||
searchContents: []
|
||||
searchContents: [],
|
||||
// 福利片关键词
|
||||
r18KeyWords: ['伦理', '倫理', '福利', '激情', '理论', '写真', '情色', '美女', '街拍', '赤足', '性感', '里番']
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -193,7 +195,7 @@ export default {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.editSites': function () {
|
||||
'$store.state.editSites.sites': function () {
|
||||
this.getAllsites()
|
||||
}
|
||||
},
|
||||
@@ -230,8 +232,22 @@ export default {
|
||||
getClass () {
|
||||
return new Promise((resolve, reject) => {
|
||||
const key = this.site.key
|
||||
// 屏蔽主分类
|
||||
const classToHide = ['电影', '电影片', '电视剧', '连续剧', '综艺', '动漫']
|
||||
zy.class(key).then(res => {
|
||||
var allClass = [{ name: '最新', tid: 0 }].concat(res.class)
|
||||
var allClass = [{ name: '最新', tid: 0 }]
|
||||
res.class.forEach(element => {
|
||||
if (!classToHide.includes(element.name)) {
|
||||
if (this.setting.excludeR18Films) {
|
||||
const containKeyWord = this.containsR18Keywords(element.name)
|
||||
if (!containKeyWord) {
|
||||
allClass.push(element)
|
||||
}
|
||||
} else {
|
||||
allClass.push(element)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.classList = allClass
|
||||
this.show.class = true
|
||||
this.pagecount = res.pagecount
|
||||
@@ -242,6 +258,13 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
containsR18Keywords (name) {
|
||||
var containKeyWord = false
|
||||
if (!name) {
|
||||
return containKeyWord
|
||||
}
|
||||
return this.r18KeyWords.some(v => name.includes(v))
|
||||
},
|
||||
getPage () {
|
||||
return new Promise((resolve, reject) => {
|
||||
const key = this.site.key
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<div class="info">
|
||||
<a @click="linkOpen('http://zyplayer.fun/')">官网</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player')">Github</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">v{{pkg.version}} 反馈</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">当前版本v{{pkg.version}} 反馈</a>
|
||||
<a style="color:#38dd77" @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/tag/v' + latestVersion)" v-show="latestVersion !== pkg.version" >最新版本v{{latestVersion}}</a>
|
||||
</div>
|
||||
<div class="view">
|
||||
<div class="title">视图</div>
|
||||
@@ -39,9 +40,6 @@
|
||||
<div class="zy-select">
|
||||
<div class="vs-placeholder vs-noAfter" @click="impShortcut">导入</div>
|
||||
</div>
|
||||
<div class="zy-select">
|
||||
<div class="vs-placeholder vs-noAfter" @click="openDoc('shortcut')">说明文档</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='site'>
|
||||
@@ -74,7 +72,7 @@
|
||||
<div class="vs-placeholder vs-noAfter" v-show = "editPlayerPath == false">
|
||||
<label>编辑</label>
|
||||
</div>
|
||||
<input class="vs-input" v-show = "editPlayerPath == true" v-model = "externalPlayer"
|
||||
<input class="vs-input" v-show = "editPlayerPath == true" v-model = "d.externalPlayer"
|
||||
@blur= "updatePlayerPath"
|
||||
@keyup.enter = "updatePlayerPath">
|
||||
</div>
|
||||
@@ -95,6 +93,9 @@
|
||||
<div class="zy-select">
|
||||
<div class="vs-placeholder vs-noAfter" @click="resetSites">重置源</div>
|
||||
</div>
|
||||
<div class="zy-checkbox">
|
||||
<input type="checkbox" v-model="setting.excludeR18Films" @change="updateExcludeR18FilmOption($event)"> 屏蔽福利片
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="theme">
|
||||
@@ -166,6 +167,8 @@ export default {
|
||||
},
|
||||
externalPlayer: '',
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: false,
|
||||
latestVersion: pkg.version,
|
||||
d: {
|
||||
id: 0,
|
||||
site: '',
|
||||
@@ -174,7 +177,8 @@ export default {
|
||||
searchAllSites: true,
|
||||
view: 'picture',
|
||||
externalPlayer: '',
|
||||
editPlayerPath: false
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -211,7 +215,8 @@ export default {
|
||||
view: res.view,
|
||||
searchAllSites: res.searchAllSites,
|
||||
externalPlayer: res.externalPlayer,
|
||||
editPlayerPath: false
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: res.excludeR18Films
|
||||
}
|
||||
this.setting = this.d
|
||||
})
|
||||
@@ -249,9 +254,11 @@ export default {
|
||||
},
|
||||
updateSearchOption (e) {
|
||||
this.d.searchAllSites = this.setting.searchAllSites
|
||||
setting.update(this.d).then(res => {
|
||||
this.setting = this.d
|
||||
})
|
||||
setting.update(this.setting)
|
||||
},
|
||||
updateExcludeR18FilmOption (e) {
|
||||
this.d.excludeR18Films = this.setting.excludeR18Films
|
||||
setting.update(this.setting)
|
||||
},
|
||||
exportFavorites () {
|
||||
this.getFavorites()
|
||||
@@ -355,9 +362,8 @@ export default {
|
||||
})
|
||||
},
|
||||
updatePlayerPath () {
|
||||
this.$message.success('设定第三方播放器路径为:' + this.externalPlayer)
|
||||
this.$message.success('设定第三方播放器路径为:' + this.d.externalPlayer)
|
||||
this.editPlayerPath = false
|
||||
this.d.externalPlayer = this.externalPlayer
|
||||
setting.update(this.d).then(res => {
|
||||
this.setting = this.d
|
||||
})
|
||||
@@ -475,6 +481,17 @@ export default {
|
||||
this.linkOpen('http://zyplayer.fun/doc/shortcut/')
|
||||
return false
|
||||
}
|
||||
},
|
||||
getLatestVersion () {
|
||||
const cheerio = require('cheerio')
|
||||
const axios = require('axios')
|
||||
var url = 'https://github.com/Hunlongyu/ZY-Player/releases'
|
||||
axios.get(url).then(res => {
|
||||
const $ = cheerio.load(res.data)
|
||||
var e = $('div.release-header')[0]
|
||||
var firstResult = $(e).find('div>div>a')
|
||||
this.latestVersion = firstResult.text()
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -482,6 +499,7 @@ export default {
|
||||
this.getSites()
|
||||
this.getShortcut()
|
||||
this.getFavorites()
|
||||
this.getLatestVersion()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user