@@ -185,9 +184,9 @@ export default {
searchTxt () {
this.searchChangeEvent()
},
- setting: {
- handler (ov, nv) {
- this.settingChangeEvent(ov, nv)
+ 'setting.site': {
+ handler (nv) {
+ this.getAllsites(nv)
},
deep: true
}
@@ -352,7 +351,7 @@ export default {
changeView () {
if (this.view === 'Film') {
if (this.show.img) {
- this.$refs.wimg.refresh()
+ this.$refs.waterfall.refresh()
}
this.getPage().then(() => {
this.infiniteId += 1
@@ -371,6 +370,7 @@ export default {
this.searchContents = []
this.pagecount = 0
this.show.search = false
+ this.show.find = true
if (wd) {
search.find({ keywords: wd }).then(res => {
if (!res) {
@@ -389,7 +389,6 @@ export default {
if (type === '[object Object]') {
this.searchContents.push(res)
}
- this.show.find = true
})
} else {
this.show.find = false
@@ -405,6 +404,7 @@ export default {
this.pagecount = 0
this.searchTxt = e.keywords
this.show.search = false
+ this.show.find = true
search.remove(e.id).then(res => {
search.add({ keywords: e.keywords })
this.getAllSearch()
@@ -420,7 +420,6 @@ export default {
if (type === '[object Object]') {
this.searchContents.push(res)
}
- this.show.find = true
})
},
clearSearch () {
@@ -436,20 +435,29 @@ export default {
this.searchContents = []
this.show.find = false
if (this.show.img) {
- this.$refs.wimg.refresh()
+ this.$refs.waterfall.refresh()
}
}
},
- getAllsites () {
- sites.all().then(res => {
- this.sites = res
- this.site = this.sites[0]
- this.siteClick(this.site)
- })
- },
- settingChangeEvent (ov, nv) {
- console.log(ov, nv, 'ov nv')
- this.getAllsites()
+ getAllsites (nv) {
+ if (nv) {
+ sites.all().then(res => {
+ this.sites = res
+ for (const i of res) {
+ if (i.key === nv) {
+ this.site = i
+ this.siteClick(this.site)
+ return false
+ }
+ }
+ })
+ } else {
+ sites.all().then(res => {
+ this.sites = res
+ this.site = this.sites[0]
+ this.siteClick(this.site)
+ })
+ }
}
},
created () {
diff --git a/src/components/Play.vue b/src/components/Play.vue
index c2f042b..fec8448 100644
--- a/src/components/Play.vue
+++ b/src/components/Play.vue
@@ -210,7 +210,6 @@ export default {
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
getUrls () {
- console.log(this.video, 'this.video')
this.name = ''
if (this.timer !== null) {
clearInterval(this.timer)
diff --git a/src/components/Setting.vue b/src/components/Setting.vue
index af8aa14..92ca4e4 100644
--- a/src/components/Setting.vue
+++ b/src/components/Setting.vue
@@ -207,7 +207,9 @@ export default {
this.$message.success('已添加成功')
this.getSites()
this.d.site = json[0].key
- this.setting = this.d
+ setting.update(this.d).then(res => {
+ this.setting = this.d
+ })
})
})
},
diff --git a/src/components/Share.vue b/src/components/Share.vue
index aa2d3ea..4d17e89 100644
--- a/src/components/Share.vue
+++ b/src/components/Share.vue
@@ -1,9 +1,9 @@
-
![]()
+
-
+
{{ share.info.name }}
@@ -79,17 +79,17 @@ export default {
}
}
this.loading = false
- this.$nextTick(() => {
- const dom = document.getElementById('share')
- html2canvas(dom, { useCORS: true, allowTaint: true }).then(res => {
- const png = res.toDataURL('image/png')
- const p = nativeImage.createFromDataURL(png)
- clipboard.writeImage(p)
- this.$message.success('已复制到剪贴板,快去分享吧~ 严禁传播违法资源!!!')
- })
- })
}
})
+ },
+ picLoadEvent () {
+ const dom = document.getElementById('right')
+ html2canvas(dom, { useCORS: true, allowTaint: true }).then(res => {
+ const png = res.toDataURL('image/png')
+ const p = nativeImage.createFromDataURL(png)
+ clipboard.writeImage(p)
+ this.$message.success('已复制到剪贴板,快去分享吧~ 严禁传播违法资源!!!')
+ })
}
},
mounted () {
@@ -108,7 +108,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
- padding: 20px;
+ padding: 0px;
z-index: 999;
.left, .right{
width: 50%;
@@ -125,6 +125,7 @@ export default {
}
}
.right{
+ padding: 10px;
.title{
font-size: 18px;
margin-bottom: 10px;