hookehuyr

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

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