diff --git a/src/components/Film.vue b/src/components/Film.vue
index f48b414..e80d3d3 100644
--- a/src/components/Film.vue
+++ b/src/components/Film.vue
@@ -68,7 +68,8 @@
- detailEvent(row.site, row)"
style="width: 100%">
@@ -367,7 +367,7 @@ export default {
const key = this.site.key
const type = this.type.tid
const page = this.pagecount
- console.log(key, type, page, 'infiniteHandler')
+ console.log(key, type, page, 'infiniteHandler') // TODO: 初次进入会重复请求两次, 导致数据重复, 代码报错.
this.statusText = ' '
if (key && page < 1) { // OK资源前几类硬是去不掉
$state.complete()
diff --git a/src/components/Play.vue b/src/components/Play.vue
index 736260d..a6e5881 100644
--- a/src/components/Play.vue
+++ b/src/components/Play.vue
@@ -457,11 +457,18 @@ export default {
this.timerEvent()
},
changeVideo () {
+ const win = remote.getCurrentWindow()
+ win.setProgressBar(-1)
this.checkStar()
this.checkTop()
},
timerEvent () {
this.timer = setInterval(async () => {
+ const endTime = this.xg.duration
+ const currentTime = this.xg.currentTime
+ const progress = parseFloat((currentTime / endTime).toFixed(2))
+ const win = remote.getCurrentWindow()
+ win.setProgressBar(progress)
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
if (db) {
const doc = { ...db }
@@ -1087,6 +1094,8 @@ export default {
})
},
videoStop () {
+ const win = remote.getCurrentWindow()
+ win.setProgressBar(-1)
if (this.xg.fullscreen) {
this.xg.exitFullscreen()
}
diff --git a/src/mini/Mini.vue b/src/mini/Mini.vue
index f9aabf1..e31d82c 100644
--- a/src/mini/Mini.vue
+++ b/src/mini/Mini.vue
@@ -198,6 +198,9 @@ export default {
const currentTime = this.xg.currentTime
const progress = (currentTime / endTime) * 100
this.progress = progress.toFixed(2)
+ const percent = parseFloat((currentTime / endTime).toFixed(2))
+ const win = remote.getCurrentWindow()
+ win.setProgressBar(percent)
const db = await history.find({ site: this.video.site, ids: this.video.ids })
if (db) {
const v = db