diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index d4f40c8..118e4d2 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -37,7 +37,7 @@ Component({ // 延迟重置导航锁,确保导航操作有足够时间完成 setTimeout(() => { this.setData({ navigating: false }); - }, 5000); + }, 1000); return true; }, // 切换tab页面的方法 - 增强版,改进状态管理 @@ -412,8 +412,8 @@ Component({ // 额外确保profile页面状态正确 setTimeout(() => { this.forceUpdateSelectedState('profile') - }, 200) - }, 200) + }, 100) + }, 100) } else { // 其他页面使用适当延迟 setTimeout(() => { diff --git a/pages/goods-detail/goods-detail.js b/pages/goods-detail/goods-detail.js index b80613d..54a5747 100644 --- a/pages/goods-detail/goods-detail.js +++ b/pages/goods-detail/goods-detail.js @@ -875,7 +875,7 @@ Page({ // 延迟重置导航锁,确保导航操作有足够时间完成 setTimeout(() => { this.setData({ navigating: false }); - }, 4000); + }, 1000); return true; }, @@ -3030,8 +3030,7 @@ Page({ // 对比价格功能:处理按钮点击事件 onCompareClick: function () { - this.navigateLock(() => { - console.log('用户点击了对比价格按钮,准备显示弹窗'); + console.log('用户点击了对比价格按钮,准备显示弹窗'); // 检查用户登录状态 const openid = wx.getStorageSync('openid'); @@ -3119,9 +3118,8 @@ Page({ this.loadHomeGoods(); // 加载收藏数据 - this.loadFavoriteGoods(); - }.bind(this)).exec(); - }); + this.loadFavoriteGoods(); + }.bind(this)).exec(); }, // 关闭对比价格弹窗