Commit e60e1645 by 前端

定时器

1 parent abbac733
......@@ -27,6 +27,12 @@ export default {
};
},
mounted() {
// 获取当前页面栈数组
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const route = currentPage.route;
const url = ["pages/home/home", "pages/boutique/index"];
if (url.includes(route)) return;
this.initTime();
// this.checkVoice();
},
......@@ -351,6 +357,7 @@ export default {
initTime() {
if (this.audioInfo.audioStatus != "start") return;
this.timer = setInterval(() => {
console.log(this.times);
this.times++;
if (this.times >= this.timeout) {
this.$refs.tipBox?.open();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!