From c0519ad200a61a51727216f82c164c9bd30caee2 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Wed, 18 Sep 2024 17:26:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.diy---=E5=9B=BE=E7=89=87=E9=AD=94?= =?UTF-8?q?=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/hot-zone.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/diy/hot-zone.vue b/components/diy/hot-zone.vue index 0d4b965d..daf7f178 100644 --- a/components/diy/hot-zone.vue +++ b/components/diy/hot-zone.vue @@ -56,6 +56,7 @@ const query = uni.createSelectorQuery(); // 选择我们想要的元素 query + .in(this) .select('.container') .boundingClientRect((res) => { console.log('1:' + res); @@ -70,6 +71,7 @@ }) .exec(); // 执行查询 query + .in(this) .select('.hot') .boundingClientRect((res) => { console.log('2:' + res); From c52df12043b3d5a5ff476dae6942099b6ca00b87 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Thu, 19 Sep 2024 09:52:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.diy---=E9=80=89=E9=A1=B9=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/diy.vue | 5 +++-- components/diy/hot-zone.vue | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/diy/diy.vue b/components/diy/diy.vue index a69ad597..4fc10c26 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -2,6 +2,7 @@ + {{ is_tabs }} @@ -120,8 +121,8 @@ methods: { init() { // tabs选项卡数据过滤 - const filter_tabs_list = this.value.diy_data.filter((item) => item.key == 'tabs'); - if (filter_tabs_list > 0) { + const filter_tabs_list = this.value.tabs_data; + if (filter_tabs_list.length > 0) { this.setData({ tabs_data: filter_tabs_list[0].com_data, is_tabs: true, diff --git a/components/diy/hot-zone.vue b/components/diy/hot-zone.vue index daf7f178..b39e6333 100644 --- a/components/diy/hot-zone.vue +++ b/components/diy/hot-zone.vue @@ -52,14 +52,12 @@ }, // 图片加载完成 获取宽高 on_load_img(e) { - console.log('123'); const query = uni.createSelectorQuery(); // 选择我们想要的元素 query .in(this) .select('.container') .boundingClientRect((res) => { - console.log('1:' + res); if ((res || null) != null) { // data包含元素的宽度、高度等信息 this.setData({ @@ -74,7 +72,6 @@ .in(this) .select('.hot') .boundingClientRect((res) => { - console.log('2:' + res); if ((res || null) != null) { // data包含元素的宽度、高度等信息 this.setData({