feat(协议): 新增用户协议与隐私政策页面及入口

This commit is contained in:
2026-09-16 02:45:38 +08:00
parent fb92782c92
commit 98c45f2c1e
11 changed files with 827 additions and 21 deletions
+11 -2
View File
@@ -212,7 +212,16 @@ Page({
})
},
openAgreement() {
wx.showToast({ title: '协议内容敬请期待', icon: 'none' })
// 登录页协议链接:按 data-type 打开《用户协议》或《隐私政策》
openAgreement(e: WechatMiniprogram.TouchEvent) {
const type =
(e.currentTarget.dataset as { type?: 'user' | 'privacy' }).type === 'privacy'
? 'privacy'
: 'user'
logger.debug(LOG, '打开协议, type=', type)
wx.navigateTo({
url: `/pages/agreement/agreement?type=${type}`,
fail: (err) => logger.warn(LOG, 'navigateTo 协议页失败, err=', err && err.errMsg),
})
},
})