diff --git a/package.json b/package.json index 70cf5c5..08e199c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zy", - "version": "1.1.3", + "version": "1.1.4", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/background.js b/src/background.js index d4207e4..a4fc2a3 100644 --- a/src/background.js +++ b/src/background.js @@ -122,7 +122,6 @@ if (!gotTheLock) { }) } - if (isDevelopment) { if (process.platform === 'win32') { process.on('message', data => { diff --git a/src/components/Film.vue b/src/components/Film.vue index 60fa238..c20e3f9 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -22,57 +22,80 @@
-
- - - - +
+
-
-
-
-
    -
  • - {{i.name}} - {{i.type}} - {{i.year}} - {{i.last}} - - 播放 - 收藏 - 分享 - -
  • -
- +
+
+
+
+
    +
  • + {{i.name}} + {{i.type}} + {{i.year}} + {{i.last}} + + 播放 + 收藏 + 分享 + +
  • +
+
@@ -95,7 +118,9 @@ export default { class: false, classList: false, search: false, - img: true + img: true, + table: false, + find: false }, sites: [], site: {}, @@ -104,9 +129,9 @@ export default { pagecount: 0, list: [], infiniteId: +new Date(), - refresh: 0, searchList: [], - searchTxt: '' + searchTxt: '', + searchContents: [] } }, components: { @@ -151,12 +176,6 @@ export default { } }, watch: { - setting: { - handler () { - this.changeSetting() - }, - deep: true - }, view () { this.changeView() }, @@ -170,6 +189,7 @@ export default { this.list = [] this.site = e this.show.site = false + this.show.class = false if (this.searchTxt.length > 0) { this.searchEvent() } else { @@ -232,9 +252,13 @@ export default { if (res) { this.pagecount -= 1 const type = Object.prototype.toString.call(res) + if (type === '[object Undefined]') { + $state.complete() + } if (type === '[object Array]') { this.list.push(...res) - } else { + } + if (type === '[object Object]') { this.list.push(res) } $state.loaded() @@ -288,17 +312,11 @@ export default { info: e } }, - changeSetting () { - this.list = [] - this.setting.view === 'picture' ? this.show.img = true : this.show.img = false - this.refresh++ - }, changeView () { - if (this.refresh >= 1) { + if (this.view === 'Film') { this.$refs.waterfall.refresh() this.getPage().then(() => { this.infiniteId += 1 - this.refresh = 0 }) } }, @@ -309,7 +327,7 @@ export default { }, searchEvent () { const wd = this.searchTxt - this.list = [] + this.searchContents = [] this.pagecount = 0 this.show.search = false if (wd) { @@ -320,14 +338,29 @@ export default { this.getAllSearch() }) zy.search(this.site.key, wd).then(res => { - this.list = res + const type = Object.prototype.toString.call(res) + if (type === '[object Undefined]') { + this.$message.info('无搜索结果') + } + if (type === '[object Array]') { + this.searchContents.push(...res) + } + if (type === '[object Object]') { + this.searchContents.push(res) + } + this.show.find = true }) } else { - this.$message.warning('请输入关键字') + this.show.find = false + this.getClass().then(res => { + if (res) { + this.infiniteId += 1 + } + }) } }, searchClickEvent (e) { - this.list = [] + this.searchContents = [] this.pagecount = 0 this.searchTxt = e.keywords this.show.search = false @@ -336,7 +369,17 @@ export default { this.getAllSearch() }) zy.search(this.site.key, e.keywords).then(res => { - this.list = res + const type = Object.prototype.toString.call(res) + if (type === '[object Undefined]') { + this.$message.info('无搜索结果') + } + if (type === '[object Array]') { + this.searchContents.push(...res) + } + if (type === '[object Object]') { + this.searchContents.push(res) + } + this.show.find = true }) }, clearSearch () { @@ -397,6 +440,10 @@ export default { border-radius: 10px; position: absolute; } + .body-box{ + height: 100%; + width: 100%; + } .show-img{ height: 100%; width: 100%; diff --git a/src/lib/dexie/initData.js b/src/lib/dexie/initData.js index e6043e8..39489a8 100644 --- a/src/lib/dexie/initData.js +++ b/src/lib/dexie/initData.js @@ -14,256 +14,168 @@ const sites = [ key: 'okzy', name: 'OK 资源网', api: 'http://cj.okzy.tv/inc/api.php', - download: 'http://cj.okzy.tv/inc/apidown.php', - level: 16 + download: 'http://cj.okzy.tv/inc/apidown.php' }, { id: 2, key: 'zuidazy', name: '最大资源网', api: 'http://www.zdziyuan.com/inc/api.php', - download: 'http://www.zdziyuan.com/inc/apidown.php', - level: 16 + download: 'http://www.zdziyuan.com/inc/apidown.php' }, { id: 3, - key: 'gaoqingzy', - name: '高清资源网', - api: 'http://cj.gaoqingzyw.com/inc/api.php', - download: 'http://cj.gaoqingzyw.com/inc/apidown.php', - level: 16 - }, - { - id: 4, key: 'doubanzy', name: '豆瓣电影资源', api: 'http://v.1988cj.com/inc/api.php', - download: 'http://v.1988cj.com/inc/apidown.php', - level: 16 + download: 'http://v.1988cj.com/inc/apidown.php' }, { - id: 5, + id: 4, key: '135zy', name: '135 资源网', api: 'http://cj.zycjw1.com/inc/api.php', - download: 'http://cj.zycjw1.com/inc/apidown.php', - level: 16 + download: 'http://cj.zycjw1.com/inc/apidown.php' }, { - id: 6, + id: 5, key: 'kuyunzy', name: '酷云资源', api: 'http://caiji.kuyun98.com/inc/ldg_api.php', - download: 'http://caiji.kuyun98.com/inc/apidown.php', - level: 16 + download: 'http://caiji.kuyun98.com/inc/apidown.php' + }, + { + id: 6, + key: 'mgtvzy', + name: '芒果 TV 资源网', + api: 'https://api.shijiapi.com/api.php/provide/vod/at/xml/', + download: '' }, { id: 7, key: 'subo988', name: '速播资源站', api: 'https://www.subo988.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 8, key: '209zy', name: '209 资源', api: 'http://cj.1156zy.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 9, key: 'zuixinzy', name: '最新资源', api: 'http://api.zuixinapi.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 10, key: 'kubozy', name: '酷播资源', api: 'http://api.kbzyapi.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 11, key: 'yongjiuzy', name: '永久资源', api: 'http://cj.yongjiuzyw.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 12, key: '123ku', name: '123 资源', api: 'http://cj.123ku2.com:12315/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 13, key: '88zyw', name: '88 影视资源站', api: 'http://www.88zyw.net/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 14, key: 'wolongzy', name: '卧龙资源', api: 'http://cj.wlzy.tv/inc/api_mac.php', - download: '', - level: 16 + download: '' }, { id: 15, key: 'mahuazy', name: '麻花资源', api: 'https://www.mhapi123.com/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 16, key: 'kkzy', name: '快快资源', api: 'https://api.kkzy.tv/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 17, key: '158zy', name: '壹伍捌资源网', api: 'http://cj.158zyz.net:158/inc/api.php', - download: '', - level: 16 + download: '' }, { id: 18, key: 'rrzy', name: '人人资源', api: 'https://www.rrzyw.cc/api.php/provide/vod/from/rrm3u8/at/xml/', - download: '', - level: 16 + download: '' }, { id: 19, key: 'mokazy', name: '魔卡资源网', api: 'https://cj.heiyap.com/api.php/provide/vod/at/xml/', - download: '', - level: 16 + download: '' }, { id: 20, key: 'kyzy', name: '快影资源站', api: 'https://www.kyzy.tv/api.php/kyyun/vod/at/xml/', - download: '', - level: 16 + download: '' }, { id: 21, - key: 'khzy', - name: '快活资源站', - api: 'https://www.khzyapi.com/api.php/provide/vod/at/xml/', - download: '', - level: 18 - }, - { - id: 22, - key: 'smzy', - name: '神马资源网', - api: 'http://api.shenmacj.com/api.php/provide/vod/at/xml/', - download: '', - level: 18 - }, - { - id: 23, - key: 'xhgcjym', - name: '小黄瓜资源', - api: 'http://cj.xhgcjym.com/inc/api.php', - download: 'http://cj.xhgcjym.com/inc/apidown.php', - level: 18 - }, - { - id: 24, - key: 'jiali', - name: '佳丽 TV', - api: 'https://jialiapi.com/api.php/provide/vod/at/xml/', - download: '', - level: 18 - }, - { - id: 25, - key: 'agzy', - name: '环亚资源', - api: 'http://wmcj8.com/inc/sapi.php', - download: '', - level: 18 - }, - { - id: 26, key: 'solezy', name: '搜乐资源网', api: 'https://www.caijizy.vip/api.php/provide/vod/at/xml/', - download: '', - level: 16 + download: '' }, { - id: 27, - key: 'lajiaozy', - name: '辣椒资源', - api: 'http://api.11bat.com/mac10.php', - download: '', - level: 18 - }, - { - id: 28, - key: '9188zy', - name: '9188 资源', - api: 'http://cj.vod1769.com/zyapimacc.php', - download: '', - level: 18 - }, - { - id: 29, + id: 22, key: 'bbkdj', name: '步步高顶尖资源网', api: 'http://api.bbkdj.com/api', - download: '', - level: 16 + download: '' }, { - id: 30, + id: 23, key: '1886zy', name: '1886 资源', api: 'http://cj.1886zy.co/inc/api.php', - download: '', - level: 16 + download: '' }, { - id: 31, + id: 24, key: 'mbo', name: '秒播资源', api: 'http://caiji.mb77.vip/inc/api.php', - download: '', - level: 16 - }, - { - id: 32, - key: 'mgtvzy', - name: '芒果 TV 资源网', - api: 'https://api.shijiapi.com/api.php/provide/vod/at/xml/', - download: '', - level: 16 + download: '' } ]