diff --git a/config.js b/config.js index adbc7ff..2dc516b 100644 --- a/config.js +++ b/config.js @@ -4,7 +4,7 @@ */ module.exports = { /** 应用版本号,外显在设置页「关于」 */ - version: 'v1.5', + version: 'v2.0', /** 最后更新日期,外显在设置页「关于」 */ updatedAt: '2026-06-24', diff --git a/pages/leaderboard/leaderboard.js b/pages/leaderboard/leaderboard.js index e7061b8..2df1620 100644 --- a/pages/leaderboard/leaderboard.js +++ b/pages/leaderboard/leaderboard.js @@ -66,10 +66,14 @@ Page({ if (cb) cb() }).catch((err) => { // Cloud function not deployed or network error — fall back to - // local data but let the user know the leaderboard is degraded. + // local data. Only show a toast if we have nothing to display + // yet (avoid confusing toast when a retry already has data). console.warn('[leaderboard] cloud function failed, using local fallback:', err) - wx.showToast({ title: '云端榜单暂不可用', icon: 'none', duration: 2000 }) + const hadData = this.data.rankedList && this.data.rankedList.length > 0 this._applyLocal() + if (!hadData && (!this.data.rankedList || this.data.rankedList.length === 0)) { + wx.showToast({ title: '云端榜单暂不可用', icon: 'none', duration: 2000 }) + } if (cb) cb() }) },