feat(share): 启用全站系统分享 + 完善分享文案配置

- 各 Page 补齐 onShareAppMessage/onShareTimeline,修复右上角转发/朋友圈按钮灰色
- ui-btn 透传 open-type,完成弹窗接入分享按钮
- config.share 集中维护文案,动态标题用 titleTemplate 占位符
- leaderboard 的 myEntry.rank 缺失时回退静态标题,避免出现"排第 undefined"
- 完成弹窗分享按钮高度对齐 88rpx,与同排按钮等高

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
liucheng
2026-07-25 11:03:02 +08:00
parent 3e1d3bd05e
commit e712741425
9 changed files with 190 additions and 3 deletions
+21
View File
@@ -542,5 +542,26 @@ Page({
wx.showToast({ title: '已恢复默认', icon: 'success', duration: 1200 })
}
})
},
/**
* 分享给朋友 — 设置页(很少有人会从这里分享,但微信要求每个 Page 都
* 实现钩子,否则对应页面的右上角菜单的转发按钮就是灰色的)。
*/
onShareAppMessage() {
const s = config.share.settings
return {
title: s.title,
path: s.path
}
},
/**
* 分享到朋友圈。
*/
onShareTimeline() {
return {
title: config.share.timelineTitle
}
}
})