Browse Source

修复对比价格功能第二次点击无效果的问题

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
1cfe68a697
  1. 6
      custom-tab-bar/index.js
  2. 4
      pages/goods-detail/goods-detail.js

6
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(() => {

4
pages/goods-detail/goods-detail.js

@ -875,7 +875,7 @@ Page({
// 延迟重置导航锁,确保导航操作有足够时间完成
setTimeout(() => {
this.setData({ navigating: false });
}, 4000);
}, 1000);
return true;
},
@ -3030,7 +3030,6 @@ Page({
// 对比价格功能:处理按钮点击事件
onCompareClick: function () {
this.navigateLock(() => {
console.log('用户点击了对比价格按钮,准备显示弹窗');
// 检查用户登录状态
@ -3121,7 +3120,6 @@ Page({
// 加载收藏数据
this.loadFavoriteGoods();
}.bind(this)).exec();
});
},
// 关闭对比价格弹窗

Loading…
Cancel
Save