From 95ee2911ec6c0cdfd85968e84c9a98f24fdf79e1 Mon Sep 17 00:00:00 2001 From: yanyan Date: Fri, 10 May 2024 17:39:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=BC=B9=E7=AA=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E7=AD=94=E9=A2=98=E8=B7=B3=E8=BD=AC=E5=BB=B6?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/s-video/s-video.vue | 7 +++++- pages/index/index.vue | 41 +++++++++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/components/s-video/s-video.vue b/components/s-video/s-video.vue index 1ca4b61..7e0e024 100644 --- a/components/s-video/s-video.vue +++ b/components/s-video/s-video.vue @@ -170,6 +170,11 @@ this.resCheck = true; this.question = false; this.innerAudioContext.play(); + + // this.timer = setTimeout(() => { + // this.showTitle = false + // clearTimeout(this.timer) + // }, 5000) } } }, @@ -277,7 +282,7 @@ that.start = false; that.question = false; that.auto = true; - }, 300); + }, 2000); }, getBindJson() { this.start = true; diff --git a/pages/index/index.vue b/pages/index/index.vue index e095658..41440d5 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -17,7 +17,9 @@ - + + + @@ -61,17 +63,24 @@ //场景入口 sceneList: [], x:0, - y:0 + showTitle:true, + y:0, + content:"" }; }, computed: { ...mapState('m_user', ['token']) }, - onLoad() { + onLoad(options) { this.checkLogin(); if (this.token != "") { this.getSwiperList(); this.getLocation(); + this.getContent(); + this.timer = setTimeout(() => { + this.showTitle = false + clearTimeout(this.timer) + }, 5000) } }, onShow() { @@ -108,6 +117,18 @@ // uni.$showMsg('数据请求成功!') }, + async getContent() { + + const { + data: res + } = await uni.$http.post('/small/project/text/listAll',{type:3}) + if (!res.success) return uni.$showMsg() + + res.data.forEach(item=>{ + this.content = item.content + + }) + }, navClickHandler(item) { uni.navigateTo({ url: '/subpkg/list/list?isOpen='+item.isOpen @@ -214,6 +235,20 @@