From bfb21af9d182fa01e5daa5cb5b613e31e9742f11 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Wed, 25 Sep 2024 16:42:29 +0800 Subject: [PATCH] =?UTF-8?q?1.diy---=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/diy.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/diy/diy.vue b/components/diy/diy.vue index f8319e6f..e67dc007 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -214,7 +214,7 @@ }, // 选项卡回调更新数据 tabs_click_event(tabs_id, bool, params = {}) { - let new_data = this.value.diy_data; + let new_data = []; this.setData({ is_tabs_type: bool, }); @@ -261,7 +261,9 @@ this.get_goods_list(1); } } else { - new_data = uni.getStorageSync('diy-data-' + this.tabs_home_id) || []; + if (tabs_id == '') { + new_data = uni.getStorageSync('diy-data-' + this.tabs_home_id) || []; + } // 先使用缓存数据展示 this.setData({ diy_data: new_data,