feat(fe): 隐私政策改为打开微信后台配置的《用户隐私保护指引》

settings 隐私政策入口改调 wx.openPrivacyContract;旧基础库或未配置时兜底
回内置 agreement 页。用户协议仍走内置页面。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-08-04 10:14:15 +08:00
parent d3a3e9ad1e
commit 04a99df434
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -40,10 +40,21 @@ Page({
openSheet(e) { openSheet(e) {
this.setData({ sheetType: e.currentTarget.dataset.type, sheetShow: true }); this.setData({ sheetType: e.currentTarget.dataset.type, sheetShow: true });
}, },
// 用户协议 / 隐私政策 // 用户协议:走我们自己的页面
goAgreement(e) { goAgreement(e) {
wx.navigateTo({ url: '/pages/agreement/agreement?type=' + e.currentTarget.dataset.type }); wx.navigateTo({ url: '/pages/agreement/agreement?type=' + e.currentTarget.dataset.type });
}, },
// 隐私政策:直接打开微信公众平台后台配置的《用户隐私保护指引》。
// 旧基础库没有该接口时,兜底用内置页面
openPrivacy() {
if (wx.openPrivacyContract) {
wx.openPrivacyContract({
fail: () => wx.navigateTo({ url: '/pages/agreement/agreement?type=privacy' }),
});
} else {
wx.navigateTo({ url: '/pages/agreement/agreement?type=privacy' });
}
},
// 自己的关注/粉丝。之前只有帖子上的「+关注」按钮,关注完没有任何地方能看 // 自己的关注/粉丝。之前只有帖子上的「+关注」按钮,关注完没有任何地方能看
goRelations(e) { goRelations(e) {
const uid = (this.data.user && this.data.user.id) || ''; const uid = (this.data.user && this.data.user.id) || '';
+1 -1
View File
@@ -15,7 +15,7 @@
<view class="profile-list"> <view class="profile-list">
<view class="profile-row" data-type="user" bindtap="goAgreement"><view class="pr-ic"><pt-icon name="doc" size="{{34}}"></pt-icon></view><text class="pr-label">用户协议</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view> <view class="profile-row" data-type="user" bindtap="goAgreement"><view class="pr-ic"><pt-icon name="doc" size="{{34}}"></pt-icon></view><text class="pr-label">用户协议</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
<view class="profile-row" data-type="privacy" bindtap="goAgreement"><view class="pr-ic"><pt-icon name="note" size="{{34}}"></pt-icon></view><text class="pr-label">隐私政策</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view> <view class="profile-row" bindtap="openPrivacy"><view class="pr-ic"><pt-icon name="note" size="{{34}}"></pt-icon></view><text class="pr-label">隐私政策</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
</view> </view>
</view> </view>