hookehuyr

feat(privacy): 添加隐私政策弹窗和常量配置

- 新增 PrivacyPopup 组件,支持多层级标题和内容展示
- 新增 privacy.js 常量文件,统一管理隐私政策内容
- 更新 search 和 visitorList 页面,集成隐私弹窗
- 更新项目配置文件(components.d.ts, config/index.js, jsconfig.json)
- 更新 CLAUDE.md 和 CHANGELOG.md 文档

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
...@@ -38,6 +38,7 @@ pnpm build:h5 # 构建H5端生产包 ...@@ -38,6 +38,7 @@ pnpm build:h5 # 构建H5端生产包
38 - `@/api``src/api` 38 - `@/api``src/api`
39 - `@/stores``src/stores` 39 - `@/stores``src/stores`
40 - `@/hooks``src/hooks` 40 - `@/hooks``src/hooks`
41 +- `@/constants``src/constants`
41 42
42 ### 认证与授权流程 43 ### 认证与授权流程
43 44
......
...@@ -18,6 +18,7 @@ declare module 'vue' { ...@@ -18,6 +18,7 @@ declare module 'vue' {
18 OfflineQrCode: typeof import('./src/components/offlineQrCode.vue')['default'] 18 OfflineQrCode: typeof import('./src/components/offlineQrCode.vue')['default']
19 Picker: typeof import('./src/components/time-picker-data/picker.vue')['default'] 19 Picker: typeof import('./src/components/time-picker-data/picker.vue')['default']
20 PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default'] 20 PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default']
21 + PrivacyPopup: typeof import('./src/components/PrivacyPopup.vue')['default']
21 QrCode: typeof import('./src/components/qrCode.vue')['default'] 22 QrCode: typeof import('./src/components/qrCode.vue')['default']
22 QrCodeSearch: typeof import('./src/components/qrCodeSearch.vue')['default'] 23 QrCodeSearch: typeof import('./src/components/qrCodeSearch.vue')['default']
23 ReserveCard: typeof import('./src/components/reserveCard.vue')['default'] 24 ReserveCard: typeof import('./src/components/reserveCard.vue')['default']
......
...@@ -36,6 +36,7 @@ export default defineConfig(async (merge) => { ...@@ -36,6 +36,7 @@ export default defineConfig(async (merge) => {
36 "@/api": path.resolve(__dirname, "../src/api"), 36 "@/api": path.resolve(__dirname, "../src/api"),
37 "@/stores": path.resolve(__dirname, "../src/stores"), 37 "@/stores": path.resolve(__dirname, "../src/stores"),
38 "@/hooks": path.resolve(__dirname, "../src/hooks"), 38 "@/hooks": path.resolve(__dirname, "../src/hooks"),
39 + "@/constants": path.resolve(__dirname, "../src/constants"),
39 }, 40 },
40 sourceRoot: 'src', 41 sourceRoot: 'src',
41 outputRoot: 'dist', 42 outputRoot: 'dist',
......
1 # CHANGELOG 1 # CHANGELOG
2 2
3 ## [Unreleased] 3 ## [Unreleased]
4 +- feat: 新增隐私政策和用户服务协议确认弹窗
5 + - 新增 `PrivacyPopup` 组件
6 + - 新增 `src/constants/privacy.js` Mock 数据
7 + -`search` (查询页) 和 `visitorList` (参观者列表页) 增加首次进入时的隐私协议弹窗逻辑
8 + - 用户需同意协议才能继续使用,否则返回上一页
4 - 修改 verificationResult 页面,将空的 view 替换为 photograph 图标 9 - 修改 verificationResult 页面,将空的 view 替换为 photograph 图标
5 - 调整 verificationResult 页面 photograph 图标大小为 52rpx 并设置水平居中 10 - 调整 verificationResult 页面 photograph 图标大小为 52rpx 并设置水平居中
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
10 "@/composables/*": ["src/composables/*"], 10 "@/composables/*": ["src/composables/*"],
11 "@/api/*": ["src/api/*"], 11 "@/api/*": ["src/api/*"],
12 "@/stores/*": ["src/stores/*"], 12 "@/stores/*": ["src/stores/*"],
13 - "@/hooks/*": ["src/hooks/*"] 13 + "@/hooks/*": ["src/hooks/*"],
14 + "@/constants/*": ["src/constants/*"]
14 } 15 }
15 }, 16 },
16 "include": ["src/**/*", "config/**/*"] 17 "include": ["src/**/*", "config/**/*"]
......
1 +<!--
2 + * @Date: 2026-02-02 15:58:03
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2026-02-02 16:18:17
5 + * @FilePath: /xyxBooking-weapp/src/components/PrivacyPopup.vue
6 + * @Description: 隐私协议弹窗组件
7 +-->
8 +<template>
9 + <nut-popup
10 + :visible="visible"
11 + :close-on-click-overlay="false"
12 + round
13 + :style="{ width: '80%', padding: '0' }"
14 + >
15 + <view class="bg-white rounded-[24rpx] overflow-hidden">
16 + <view class="pt-[48rpx] pb-[32rpx] text-center">
17 + <text class="text-[36rpx] font-semibold text-[#333]">温馨提示</text>
18 + </view>
19 +
20 + <view class="px-[48rpx] pb-[48rpx] text-[30rpx] text-[#666] leading-relaxed text-center">
21 + <text>请您在使用前仔细阅读并同意</text>
22 + <text class="text-[#A67939] inline" @tap="showAgreement('user')">《用户服务协议》</text>
23 + <text>和</text>
24 + <text class="text-[#A67939] inline" @tap="showAgreement('privacy')">《隐私政策》</text>
25 + </view>
26 +
27 + <view class="flex border-t border-[#eee]">
28 + <view class="flex-1 h-[96rpx] leading-[96rpx] text-center text-[32rpx] text-[#999] border-r border-[#eee] active:bg-gray-50" @tap="handleDisagree">不同意</view>
29 + <view class="flex-1 h-[96rpx] leading-[96rpx] text-center text-[32rpx] font-medium text-[#A67939] active:bg-gray-50" @tap="handleAgree">同意</view>
30 + </view>
31 + </view>
32 + </nut-popup>
33 +
34 + <!-- 协议详情弹窗 -->
35 + <nut-popup
36 + :visible="detailVisible"
37 + position="bottom"
38 + round
39 + :style="{ height: '80%' }"
40 + @update:visible="val => detailVisible = val"
41 + >
42 + <view class="flex flex-col h-full bg-white relative overflow-hidden">
43 + <!-- 标题栏 -->
44 + <view class="flex-none flex items-center justify-center h-[96rpx] border-b border-[#eee] relative">
45 + <text class="text-[32rpx] font-semibold text-[#333]">{{ detailTitle }}</text>
46 + <view
47 + class="absolute right-[32rpx] top-0 h-[96rpx] flex items-center justify-center text-[#999] text-[40rpx] px-[20rpx]"
48 + @tap="detailVisible = false"
49 + >×</view>
50 + </view>
51 +
52 + <!-- 内容区域 -->
53 + <scroll-view :scroll-y="true" class="flex-1 h-0 px-[32rpx] py-[24rpx] box-border w-full">
54 + <view v-html="detailContent"></view>
55 + </scroll-view>
56 +
57 + <!-- 底部确认按钮 -->
58 + <view class="flex-none p-[32rpx] border-t border-[#eee] bg-white">
59 + <button
60 + class="w-full h-[88rpx] leading-[88rpx] bg-[#A67939] text-white text-[32rpx] rounded-[44rpx] active:opacity-90"
61 + @tap="detailVisible = false"
62 + >
63 + 我已阅读
64 + </button>
65 + </view>
66 + </view>
67 + </nut-popup>
68 +</template>
69 +
70 +<script setup>
71 +import { ref } from 'vue'
72 +import { USER_AGREEMENT, PRIVACY_POLICY } from '@/constants/privacy'
73 +import Taro from '@tarojs/taro'
74 +
75 +const props = defineProps({
76 + visible: {
77 + type: Boolean,
78 + default: false
79 + }
80 +})
81 +
82 +const emit = defineEmits(['update:visible', 'agree', 'disagree'])
83 +
84 +// 协议详情控制
85 +const detailVisible = ref(false)
86 +const detailTitle = ref('')
87 +const detailContent = ref('')
88 +
89 +/**
90 + * @description 显示协议内容
91 + * @param {string} type - 协议类型 'user' | 'privacy'
92 + */
93 +const showAgreement = (type) => {
94 + detailTitle.value = type === 'user' ? '用户服务协议' : '隐私政策'
95 + detailContent.value = type === 'user' ? USER_AGREEMENT : PRIVACY_POLICY
96 + detailVisible.value = true
97 +}
98 +
99 +/**
100 + * @description 处理不同意操作
101 + */
102 +const handleDisagree = () => {
103 + emit('disagree')
104 +}
105 +
106 +/**
107 + * @description 处理同意操作
108 + */
109 +const handleAgree = () => {
110 + emit('agree')
111 + emit('update:visible', false)
112 +}
113 +</script>
1 +export const USER_AGREEMENT = `
2 +<div style="font-size: 28rpx; line-height: 1.6; color: #333;">
3 + <h1 style="text-align: center; font-size: 36rpx; font-weight: bold; margin-bottom: 20rpx; color: #000;">用户服务协议</h1>
4 +
5 + <p style="text-align: center; font-size: 24rpx; color: #999; margin-bottom: 40rpx;">版本生效日期:2024年01月01日</p>
6 +
7 + <p style="margin-bottom: 30rpx;">欢迎您使用西园寺预约小程序服务!</p>
8 +
9 + <p style="margin-bottom: 30rpx;">本《用户服务协议》(以下简称“本协议”)是您(以下或称“用户”)与西园寺预约平台(以下简称“我们”或“平台”)之间关于使用我们提供的产品和服务所订立的协议。</p>
10 +
11 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">一、 服务说明</h2>
12 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
13 + <li style="margin-bottom: 10rpx;">本平台提供包括但不限于门票预约、活动报名、信息查询等服务。</li>
14 + <li style="margin-bottom: 10rpx;">我们将尽力保障服务的稳定性,但在不可抗力、系统维护等情况下,可能会暂停部分服务。</li>
15 + </ol>
16 +
17 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">二、 用户账号</h2>
18 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
19 + <li style="margin-bottom: 10rpx;">您在使用本服务时可能需要注册账号或完善个人信息。</li>
20 + <li style="margin-bottom: 10rpx;">您应保证所提供信息的真实性、准确性。如因信息不实导致无法预约或入场,责任由您自行承担。</li>
21 + <li style="margin-bottom: 10rpx;">请妥善保管您的账号信息,任何通过您账号进行的操作均视为您本人的行为。</li>
22 + </ol>
23 +
24 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">三、 用户行为规范</h2>
25 + <p style="margin-bottom: 20rpx;">用户在使用本服务过程中,不得进行以下行为:</p>
26 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
27 + <li style="margin-bottom: 10rpx;">违反国家法律法规、危害国家安全或社会公共利益。</li>
28 + <li style="margin-bottom: 10rpx;">传播淫秽、色情、暴力、赌博或教唆犯罪的信息。</li>
29 + <li style="margin-bottom: 10rpx;">利用本平台进行刷票、倒卖预约名额等干扰正常秩序的行为。</li>
30 + <li style="margin-bottom: 10rpx;">侵犯他人知识产权、隐私权等合法权益。</li>
31 + </ol>
32 +
33 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">四、 预约规则</h2>
34 + <ul style="padding-left: 40rpx; margin-bottom: 30rpx;">
35 + <li style="margin-bottom: 10rpx;"><strong>实名制预约</strong>:所有预约均实行实名制,入场时需核验身份信息。</li>
36 + <li style="margin-bottom: 10rpx;"><strong>取消规则</strong>:如需取消预约,请在规定时间内在平台操作。多次无故爽约可能会影响您后续的预约资格。</li>
37 + <li style="margin-bottom: 10rpx;"><strong>入场须知</strong>:请按照预约时段入场,配合工作人员进行核验。</li>
38 + </ul>
39 +
40 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">五、 免责声明</h2>
41 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
42 + <li style="margin-bottom: 10rpx;">因不可抗力(如自然灾害、政府行为等)导致服务中断,我们不承担责任。</li>
43 + <li style="margin-bottom: 10rpx;">用户自行泄露个人信息导致的损失,我们不承担责任。</li>
44 + </ol>
45 +
46 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">六、 协议修改</h2>
47 + <p style="margin-bottom: 30rpx;">我们有权根据法律法规及业务需要修改本协议。修改后的协议将通过平台公示,您继续使用服务即视为接受修改。</p>
48 +
49 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">七、 联系我们</h2>
50 + <p style="margin-bottom: 30rpx;">如您对本协议有任何疑问,请联系平台客服。</p>
51 +</div>
52 +`
53 +
54 +export const PRIVACY_POLICY = `
55 +<div style="font-size: 28rpx; line-height: 1.6; color: #333;">
56 + <h1 style="text-align: center; font-size: 36rpx; font-weight: bold; margin-bottom: 20rpx; color: #000;">隐私政策</h1>
57 +
58 + <p style="text-align: center; font-size: 24rpx; color: #999; margin-bottom: 40rpx;">版本生效日期:2024年01月01日</p>
59 +
60 + <p style="margin-bottom: 30rpx;">西园寺预约平台(以下简称“我们”)深知个人信息对您的重要性,我们将按照法律法规要求,采取相应安全保护措施,尽力保护您的个人信息安全可控。</p>
61 +
62 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">一、 我们如何收集信息</h2>
63 + <p style="margin-bottom: 20rpx;">为了向您提供预约服务,我们需要收集以下信息:</p>
64 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
65 + <li style="margin-bottom: 10rpx;"><strong>身份信息</strong>:姓名、身份证号(用于实名预约核验)。</li>
66 + <li style="margin-bottom: 10rpx;"><strong>联系方式</strong>:手机号码(用于接收预约短信通知)。</li>
67 + <li style="margin-bottom: 10rpx;"><strong>设备信息</strong>:设备型号、操作系统版本(用于保障账号安全及系统适配)。</li>
68 + <li style="margin-bottom: 10rpx;"><strong>日志信息</strong>:IP地址、浏览记录(用于系统维护及优化)。</li>
69 + </ol>
70 +
71 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">二、 我们如何使用信息</h2>
72 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
73 + <li style="margin-bottom: 10rpx;"><strong>提供服务</strong>:用于处理您的预约请求、入场核验。</li>
74 + <li style="margin-bottom: 10rpx;"><strong>通知服务</strong>:向您发送预约成功、变动等通知。</li>
75 + <li style="margin-bottom: 10rpx;"><strong>安全保障</strong>:用于身份验证、防欺诈检测。</li>
76 + </ol>
77 +
78 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">三、 信息共享与披露</h2>
79 + <p style="margin-bottom: 20rpx;">我们不会将您的个人信息出售给第三方。仅在以下情况可能共享:</p>
80 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
81 + <li style="margin-bottom: 10rpx;"><strong>法律要求</strong>:根据法律法规或政府主管部门的强制性要求。</li>
82 + <li style="margin-bottom: 10rpx;"><strong>必要关联方</strong>:为实现服务目的,可能与关联方共享必要信息(如短信服务商)。</li>
83 + </ol>
84 +
85 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">四、 信息存储与保护</h2>
86 + <ol style="padding-left: 40rpx; margin-bottom: 30rpx;">
87 + <li style="margin-bottom: 10rpx;">我们会将您的信息存储在位于中国境内的服务器上。</li>
88 + <li style="margin-bottom: 10rpx;">我们采取加密技术、访问控制等措施保护您的信息安全。</li>
89 + <li style="margin-bottom: 10rpx;">您的个人信息保留期限为实现服务目的所必需的最短时间,法律法规另有规定的除外。</li>
90 + </ol>
91 +
92 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">五、 您的权利</h2>
93 + <p style="margin-bottom: 30rpx;">您有权访问、更正、删除您的个人信息,或注销账号。您可以通过平台相关功能或联系客服进行操作。</p>
94 +
95 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">六、 未成年人保护</h2>
96 + <p style="margin-bottom: 30rpx;">若您是未成年人,建议在监护人陪同下阅读本政策,并取得监护人同意后使用我们的服务。</p>
97 +
98 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">七、 政策更新</h2>
99 + <p style="margin-bottom: 30rpx;">本隐私政策可能会适时更新。更新后的内容将在平台公布,请您注意查阅。</p>
100 +
101 + <h2 style="font-size: 32rpx; font-weight: bold; margin-top: 40rpx; margin-bottom: 20rpx; color: #000;">八、 联系我们</h2>
102 + <p style="margin-bottom: 30rpx;">如有隐私保护相关问题,请通过平台客服渠道联系。</p>
103 +</div>
104 +`
1 <!-- 1 <!--
2 * @Date: 2024-01-26 13:08:09 2 * @Date: 2024-01-26 13:08:09
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2026-01-22 11:45:46 4 + * @LastEditTime: 2026-02-02 16:02:52
5 - * @FilePath: /git/xyxBooking-weapp/src/pages/search/index.vue 5 + * @FilePath: /xyxBooking-weapp/src/pages/search/index.vue
6 * @Description: 搜索页 6 * @Description: 搜索页
7 --> 7 -->
8 <template> 8 <template>
...@@ -59,13 +59,20 @@ ...@@ -59,13 +59,20 @@
59 @cancel="show_id_type_picker = false" 59 @cancel="show_id_type_picker = false"
60 ></nut-picker> 60 ></nut-picker>
61 </nut-popup> 61 </nut-popup>
62 +
63 + <PrivacyPopup
64 + v-model:visible="showPrivacyPopup"
65 + @agree="onPrivacyAgree"
66 + @disagree="onPrivacyDisagree"
67 + />
62 </template> 68 </template>
63 69
64 <script setup> 70 <script setup>
65 import { ref, computed } from 'vue' 71 import { ref, computed } from 'vue'
66 -import Taro from '@tarojs/taro' 72 +import Taro, { useDidShow } from '@tarojs/taro'
67 import { IconFont } from '@nutui/icons-vue-taro' 73 import { IconFont } from '@nutui/icons-vue-taro'
68 import qrCodeSearch from '@/components/qrCodeSearch' 74 import qrCodeSearch from '@/components/qrCodeSearch'
75 +import PrivacyPopup from '@/components/PrivacyPopup.vue'
69 import { useGo } from '@/hooks/useGo' 76 import { useGo } from '@/hooks/useGo'
70 77
71 const go = useGo() 78 const go = useGo()
...@@ -73,6 +80,35 @@ const is_search = ref(false) ...@@ -73,6 +80,35 @@ const is_search = ref(false)
73 const idCode = ref('') 80 const idCode = ref('')
74 const id_number = ref('') 81 const id_number = ref('')
75 const show_id_type_picker = ref(false) 82 const show_id_type_picker = ref(false)
83 +const showPrivacyPopup = ref(false)
84 +
85 +useDidShow(() => {
86 + const hasAgreed = Taro.getStorageSync('HAS_AGREED_PRIVACY')
87 + if (!hasAgreed) {
88 + showPrivacyPopup.value = true
89 + }
90 +})
91 +
92 +/**
93 + * @description 隐私协议同意回调
94 + */
95 +const onPrivacyAgree = () => {
96 + Taro.setStorageSync('HAS_AGREED_PRIVACY', true)
97 + showPrivacyPopup.value = false
98 +}
99 +
100 +/**
101 + * @description 隐私协议拒绝回调
102 + */
103 +const onPrivacyDisagree = () => {
104 + const pages = Taro.getCurrentPages()
105 + if (pages.length > 1) {
106 + Taro.navigateBack()
107 + } else {
108 + // 如果是首个页面,跳转到首页
109 + Taro.reLaunch({ url: '/pages/index/index' })
110 + }
111 +}
76 const id_type_options = [ 112 const id_type_options = [
77 { label: '身份证', value: 1 }, 113 { label: '身份证', value: 1 },
78 { label: '其他', value: 3 } 114 { label: '其他', value: 3 }
......
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
47 center_variant="normal" 47 center_variant="normal"
48 @select="on_nav_select" 48 @select="on_nav_select"
49 /> 49 />
50 + <PrivacyPopup
51 + v-model:visible="showPrivacyPopup"
52 + @agree="onPrivacyAgree"
53 + @disagree="onPrivacyDisagree"
54 + />
50 </view> 55 </view>
51 </template> 56 </template>
52 57
...@@ -57,6 +62,7 @@ import { IconFont } from '@nutui/icons-vue-taro' ...@@ -57,6 +62,7 @@ import { IconFont } from '@nutui/icons-vue-taro'
57 import { useGo } from '@/hooks/useGo' 62 import { useGo } from '@/hooks/useGo'
58 import { personListAPI, delPersonAPI } from '@/api/index' 63 import { personListAPI, delPersonAPI } from '@/api/index'
59 import indexNav from '@/components/indexNav.vue' 64 import indexNav from '@/components/indexNav.vue'
65 +import PrivacyPopup from '@/components/PrivacyPopup.vue'
60 import icon_3 from '@/assets/images/首页01@2x.png' 66 import icon_3 from '@/assets/images/首页01@2x.png'
61 import icon_4 from '@/assets/images/二维码icon.png' 67 import icon_4 from '@/assets/images/二维码icon.png'
62 import icon_5 from '@/assets/images/我的02@2x.png' 68 import icon_5 from '@/assets/images/我的02@2x.png'
...@@ -131,9 +137,36 @@ const removeItem = async item => { ...@@ -131,9 +137,36 @@ const removeItem = async item => {
131 } 137 }
132 } 138 }
133 139
140 +const showPrivacyPopup = ref(false)
141 +
134 useDidShow(() => { 142 useDidShow(() => {
135 loadList() 143 loadList()
144 + const hasAgreed = Taro.getStorageSync('HAS_AGREED_PRIVACY')
145 + if (!hasAgreed) {
146 + showPrivacyPopup.value = true
147 + }
136 }) 148 })
149 +
150 +/**
151 + * @description 隐私协议同意回调
152 + */
153 +const onPrivacyAgree = () => {
154 + Taro.setStorageSync('HAS_AGREED_PRIVACY', true)
155 + showPrivacyPopup.value = false
156 +}
157 +
158 +/**
159 + * @description 隐私协议拒绝回调
160 + */
161 +const onPrivacyDisagree = () => {
162 + const pages = Taro.getCurrentPages()
163 + if (pages.length > 1) {
164 + Taro.navigateBack()
165 + } else {
166 + // 如果是首个页面,跳转到首页
167 + Taro.reLaunch({ url: '/pages/index/index' })
168 + }
169 +}
137 </script> 170 </script>
138 171
139 <style lang="less"> 172 <style lang="less">
......