Compare commits

...

8 Commits

Author SHA1 Message Date
haiyangcui
efd2095261 v2.4.7 2020-09-18 19:09:51 +02:00
haiyangcui
cbedb859c3 电影列表页面屏蔽福利片 2020-09-17 16:08:12 +02:00
haiyangcui
65aedc84cf 有最新版本时,在设置页面有提示 2020-09-16 22:17:04 +02:00
haiyangcui
95c58095ee 屏蔽福利片选项 2020-09-16 20:00:22 +02:00
haiyangcui
b5da3c7f81 屏蔽主分类 2020-09-13 15:05:54 +02:00
haiyangcui
5b0211b2ed 如果编辑源页面没有打开,无需更新 2020-09-13 14:51:22 +02:00
haiyangcui
0bb6409687 只有EditSites的资源列表变化时才更新Film页面 2020-09-13 08:19:57 +02:00
haiyangcui
7078e05668 修复编辑第三方播放器地址的bug 2020-09-12 22:35:54 +02:00
5 changed files with 64 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "zy",
"version": "2.4.6",
"version": "2.4.7",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

View File

@@ -80,7 +80,7 @@
}
.zy-checkbox{
position: relative;
display: flex;
display: inline-block;
width: 200px;
height: 30px;
vertical-align: middle;

View File

@@ -80,8 +80,10 @@ export default {
this.detail = {
show: false
}
this.editSites = {
show: false
if (this.editSites.show === true) {
this.editSites = {
show: false
}
}
}
}

View File

@@ -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

View File

@@ -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>