hookehuyr

feat(权限): 添加权限申请时的数据用途说明

在个人信息收集、位置权限和微信运动数据授权时,添加详细的数据用途说明和隐私保护承诺
- 修改个人信息收集弹窗内容,说明收集字段用途
- 在位置权限申请前添加用途说明弹窗
- 在微信运动授权组件中添加数据用途说明卡片
...@@ -4,16 +4,23 @@ ...@@ -4,16 +4,23 @@
4 <view v-if="!isAuthorized" class="auth-prompt"> 4 <view v-if="!isAuthorized" class="auth-prompt">
5 <view class="px-5 py-6 bg-white rounded-xl shadow-md mx-4 mt-4"> 5 <view class="px-5 py-6 bg-white rounded-xl shadow-md mx-4 mt-4">
6 <view class="flex flex-col items-center justify-center py-8"> 6 <view class="flex flex-col items-center justify-center py-8">
7 - <view class="mb-4"> 7 + <!-- <view class="mb-4">
8 <image 8 <image
9 src="https://placehold.co/100x100/e2f3ff/0369a1?text=步数&font=roboto" 9 src="https://placehold.co/100x100/e2f3ff/0369a1?text=步数&font=roboto"
10 class="w-20 h-20 rounded-full" 10 class="w-20 h-20 rounded-full"
11 /> 11 />
12 - </view> 12 + </view> -->
13 <text class="text-lg font-medium mb-2">获取微信运动数据</text> 13 <text class="text-lg font-medium mb-2">获取微信运动数据</text>
14 - <text class="text-gray-500 text-center mb-6 px-4"> 14 + <text class="text-gray-500 text-center mb-4 px-4">
15 授权后可查看您的步数信息,与家人一起记录健康生活 15 授权后可查看您的步数信息,与家人一起记录健康生活
16 </text> 16 </text>
17 + <view class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4 mx-4">
18 + <text class="text-blue-800 text-sm font-medium block mb-2">数据用途说明:</text>
19 + <text class="text-blue-700 text-xs leading-relaxed block mb-1">• 获取您的每日步数数据,用于家庭步数统计和积分计算</text>
20 + <text class="text-blue-700 text-xs leading-relaxed block mb-1">• 与家庭成员共享步数信息,促进健康运动</text>
21 + <text class="text-blue-700 text-xs leading-relaxed block mb-1">• 参与活动打卡和积分兑换功能</text>
22 + <text class="text-blue-700 text-xs leading-relaxed block">• 我们承诺不会将您的数据用于其他用途,严格保护您的隐私</text>
23 + </view>
17 <view 24 <view
18 class="bg-blue-500 text-white px-8 py-3 rounded-full text-sm" 25 class="bg-blue-500 text-white px-8 py-3 rounded-full text-sm"
19 @click="requestAuth" 26 @click="requestAuth"
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-05 21:40:44 4 + * @LastEditTime: 2025-09-06 00:22:56
5 * @FilePath: /lls_program/src/pages/ActivitiesCover/index.vue 5 * @FilePath: /lls_program/src/pages/ActivitiesCover/index.vue
6 * @Description: 活动海报页面 - 展示活动信息并处理定位授权 6 * @Description: 活动海报页面 - 展示活动信息并处理定位授权
7 --> 7 -->
...@@ -175,6 +175,29 @@ const checkLocationAuth = async () => { ...@@ -175,6 +175,29 @@ const checkLocationAuth = async () => {
175 const getUserLocation = async () => { 175 const getUserLocation = async () => {
176 try { 176 try {
177 locationError.value = false // 重置错误状态 177 locationError.value = false // 重置错误状态
178 +
179 + // 检查是否已有位置权限
180 + const authSetting = await Taro.getSetting()
181 + const hasLocationAuth = authSetting.authSetting['scope.userLocation']
182 +
183 + // 如果没有授权,先显示数据用途说明
184 + if (hasLocationAuth !== true) {
185 + const modalRes = await Taro.showModal({
186 + title: '位置权限申请',
187 + content: '为了提供更好的活动体验,我们需要获取您的位置信息:1. 验证您是否在活动区域内 2. 为您推荐附近的打卡点 3. 记录活动轨迹和完成情况 4. 提供基于位置的个性化服务, 我们承诺严格保护您的位置隐私,仅用于活动相关功能。',
188 + confirmText: '同意授权',
189 + cancelText: '暂不授权'
190 + })
191 +
192 + if (!modalRes.confirm) {
193 + Taro.showToast({
194 + title: '需要位置权限才能参与活动',
195 + icon: 'none'
196 + })
197 + return false
198 + }
199 + }
200 +
178 const location = await Taro.getLocation({ 201 const location = await Taro.getLocation({
179 type: 'gcj02' 202 type: 'gcj02'
180 }) 203 })
......
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:43:45 2 * @Date: 2025-08-27 17:43:45
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-05 23:36:28 4 + * @LastEditTime: 2025-09-06 00:22:10
5 * @FilePath: /lls_program/src/pages/Welcome/index.vue 5 * @FilePath: /lls_program/src/pages/Welcome/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -111,11 +111,12 @@ useDidShow(async () => { ...@@ -111,11 +111,12 @@ useDidShow(async () => {
111 const handleNavigate = (url) => { 111 const handleNavigate = (url) => {
112 // 检查个人信息是否完善 112 // 检查个人信息是否完善
113 if (!hasProfile.value) { 113 if (!hasProfile.value) {
114 + // 先显示隐私提醒
114 Taro.showModal({ 115 Taro.showModal({
115 - title: '提示', 116 + title: '个人信息收集说明',
116 - content: '参加活动需要完善个人信息', 117 + content: `为了提供更好的服务,我们需要收集您的基本信息: 1. 头像和昵称:用于家庭成员识别 2. 出生年月:验证年龄资格,60岁以上可创建家庭 3. 轮椅出行信息:为您提供无障碍活动推荐 我们承诺严格保护您的个人隐私,仅用于家庭功能和活动服务。`,
117 - cancelText: '关闭', 118 + confirmText: '同意',
118 - confirmText: '完善信息', 119 + cancelText: '取消',
119 success: (res) => { 120 success: (res) => {
120 if (res.confirm) { 121 if (res.confirm) {
121 Taro.navigateTo({ url: '/pages/AddProfile/index' }); 122 Taro.navigateTo({ url: '/pages/AddProfile/index' });
......