Commit a649343a by hank

event --fix

parent 46408f30
...@@ -42,7 +42,7 @@ import { getFilmDetail } from "@/framework/templateApi/index"; ...@@ -42,7 +42,7 @@ import { getFilmDetail } from "@/framework/templateApi/index";
import requireAllPage from "./pages/index.js"; import requireAllPage from "./pages/index.js";
import Message from "@/framework/tempalteMessage"; import Message from "@/framework/tempalteMessage";
import Scene from "@/framework/utils/sence"; import Scene from "@/framework/utils/sence";
import { setTimeout } from "timers"; import { setTimeout, clearTimeout } from "timers";
export default { export default {
name: "page", name: "page",
mixins: [mixin], mixins: [mixin],
...@@ -101,8 +101,9 @@ export default { ...@@ -101,8 +101,9 @@ export default {
Scene.EventBus.on("enterAfter", e => { Scene.EventBus.on("enterAfter", e => {
console.log(e, "enterAfter"); console.log(e, "enterAfter");
if (this.sliderActiveIndex == e.page) { if (this.sliderActiveIndex == e.page) {
setTimeout( var aa = setTimeout(
() => { () => {
this.$refs.child[0].leave(); this.$refs.child[0].leave();
setTimeout(() => { setTimeout(() => {
var index = this.sliderActiveIndex; var index = this.sliderActiveIndex;
...@@ -112,6 +113,7 @@ export default { ...@@ -112,6 +113,7 @@ export default {
} }
console.log(index); console.log(index);
this.swiper.slideTo(index + 1, 1000, false); this.swiper.slideTo(index + 1, 1000, false);
clearTimeout(aa)
}, 1500); }, 1500);
}, },
e.nextDuration ? e.nextDuration : 1000 e.nextDuration ? e.nextDuration : 1000
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
this.enter((countEnterTime) => { this.enter((countEnterTime) => {
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
Scene.enterAfter({ Scene.enterAfter({
nextDuration: 5000, nextDuration: 10000,
page: this.page page: this.page
}); });
}, countEnterTime); }, countEnterTime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment