Commit a649343a by hank

event --fix

parent 46408f30
......@@ -42,7 +42,7 @@ import { getFilmDetail } from "@/framework/templateApi/index";
import requireAllPage from "./pages/index.js";
import Message from "@/framework/tempalteMessage";
import Scene from "@/framework/utils/sence";
import { setTimeout } from "timers";
import { setTimeout, clearTimeout } from "timers";
export default {
name: "page",
mixins: [mixin],
......@@ -101,8 +101,9 @@ export default {
Scene.EventBus.on("enterAfter", e => {
console.log(e, "enterAfter");
if (this.sliderActiveIndex == e.page) {
setTimeout(
var aa = setTimeout(
() => {
this.$refs.child[0].leave();
setTimeout(() => {
var index = this.sliderActiveIndex;
......@@ -112,6 +113,7 @@ export default {
}
console.log(index);
this.swiper.slideTo(index + 1, 1000, false);
clearTimeout(aa)
}, 1500);
},
e.nextDuration ? e.nextDuration : 1000
......
......@@ -97,7 +97,7 @@ export default {
this.enter((countEnterTime) => {
this.timer = setTimeout(() => {
Scene.enterAfter({
nextDuration: 5000,
nextDuration: 10000,
page: this.page
});
}, 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