From f790b17021f72610e64205b8a22240fabb5cc40d Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 12 Apr 2024 00:32:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AF=BC=E8=88=AA=E8=A7=92?= =?UTF-8?q?=E6=A0=87=E6=9B=B4=E6=96=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 1730b62c..cf6883f8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -561,16 +561,16 @@ // 弹屏广告插件处理 this.plugins_popupscreen_handle(); - // 导航购物车处理 - if (this.cart_total <= 0) { - app.globalData.set_tab_bar_badge(2, 0); - } else { - app.globalData.set_tab_bar_badge(2, 1, this.cart_total); - } - // 是否需要重新加载数据 if(parseInt(data.is_result_data_cache || 0) == 1) { this.init({is_cache: 0}); + } else { + // 导航购物车处理、缓存数据则不更新导航角标 + if (this.cart_total <= 0) { + app.globalData.set_tab_bar_badge(2, 0); + } else { + app.globalData.set_tab_bar_badge(2, 1, this.cart_total); + } } } else { this.setData({