a5c591eaf371a660b784ee9512418344dc48c811
Root cause: _setNavBarColor used _lastNavColor (a module-level cache) to skip wx.setNavigationBarColor when the color appeared unchanged. But wx.setNavigationBarColor is per-page — each tab page has its own navigation bar and needs an explicit call. The cache prevented subsequent pages from ever receiving the call. Example trace: index onShow → _setNavBarColor(#FF6B35) → _lastNavColor=#FF6B35 ✓ settings onShow → _setNavBarColor(#FF6B35) → cache hit, return ✗ User picks green → setTheme → _setNavBarColor(#43A047) ✓ index onShow → _setNavBarColor(#43A047) → cache hit, return ✗ → Index still shows orange! Fix: remove _lastNavColor guard entirely. Keep setTimeout debounce.
Description
微信小程序-平板支撑
Languages
JavaScript
100%