Text模拟隐私协议,有好的方案吗?

Text模拟隐私协议

HarmonyOS
2024-05-26 14:23:56
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
ychfang

核心代码

import promptAction from '@ohos.promptAction'; 
 
@Entry 
@Preview 
@CustomDialog 
export struct PrivacyDialog { 
  scroller: Scroller = new Scroller() 
  title: string | Resource = '' 
  message: string | Resource = '' 
  cancelButtonText: string | Resource = '' 
  confirmButtonText: string | Resource = '' 
  cancel: () => void = () => { 
 
  } 
  confirm: () => void = () => { 
  } 
  controller?: CustomDialogController = undefined 
  contentTextArray: string[] = [ 
    `欢迎您使用钛媒体!为了加强对您个人信息的保护,依据相关法律要求,我们更新了《`, 
    `钛媒体用户使用协议`, 
    `》和《`, 
    `钛媒体用户隐私政策`, 
    `》。在您继续使用钛媒体服务之前,请您仔细阅读各项条款。点击「同意」代表你已同意前述协议及以下约定。 
  
1、在浏览时,我们可能会获取IP地址,用于请求产品内容数据,确保产品正常使用。 
  
2、在浏览时,我们可能会申请系统设备权限收集设备信息、日志信息,用于用户身份识别、信息推送及安全风控,并申请存储权限,用于图片分享、图片下载以及缓存文件。 
  
3、我们可能会申请拍照权限,用于账号头像的修改。 
  
4、为实现信息分享、第三方登录、综合统计分析等目的所需,我们可能会将与功能相关的最小必要信息(口令、链接、统计参数等)。 
  
5、为了保障软件与服务的安全运行,我们会收集您的设备型号、设备名称、设备唯一标识符(包括:IMEI、Android ID、IDFA、OPENUDID、IMSI、MAC地址)、SSID、BSSID、SD卡数据、安装列表、设备序列号、浏览器类型和设置、语言设置、操作系统和应用程序版本、网络设备硬件地址、登录IP地址、接入网络的方式、网络质量数据、移动网络信息(包括运营商名称)、产品版本号、运行中的进程信息。 
  
我们将严格按照经您同意的各项条款使用您的个人信息,以便为您提供更好的服务。 
` 
  ] 
  firstTime = true 
  isTargetPrivacy(index: number) { 
    let res: ITargetValue = { 
      isTarget: false, 
      src: '' 
    } 
    if (index === 1) { 
      res.isTarget = true; 
      res.src = 'http://copywriting?copywritingkey=user_agreemen' 
    } 
 
    if (index === 3) { 
      res.isTarget = true; 
      res.src = 'http://copywriting?copywritingkey=user_privacy_policy' 
    } 
 
    return res 
  } 
 
  build() { 
    Column() { 
      Text('隐私政策和用户协议') 
        .fontSize(18)// .fontFamily($rawfile('hyqihei_60s.otf')) 
        .fontColor(Color.Blue) 
      Scroll(this.scroller) { 
        Column() { 
          Text() { 
            ForEach(this.contentTextArray, (item: string, i) => { 
              Span(item) 
                .fontColor(this.isTargetPrivacy(i).isTarget ? Color.Red : Color.Black) 
                .onClick(() => { 
                  let src = this.isTargetPrivacy(i).src; 
                  if (src) { 
                    // 跳转 jump() 
                    promptAction.showToast({ 
                      message: `将跳转${src}` 
                    }) 
                  } 
                }) 
            }, (item: string) => item) 
          } 
          .width('100%') 
          .lineHeight(20) 
          .fontSize(14) 
          .padding(15) 
        }.width('100%') 
      } 
      .scrollable(ScrollDirection.Vertical) 
      .scrollBarWidth(0) 
      .height('70%') 
 
      Text('同意') 
        .fontSize(20)// .fontFamily($rawfile('hyqihei_60s.otf')) 
        .fontColor(Color.Red) 
        .textAlign(TextAlign.Center) 
        .width('90%') 
        .height(38) 
        .backgroundColor('#eee') 
        .borderRadius(20) 
 
      Row() { 
        Text('不同意并退出') 
          .fontSize(14)// .fontFamily($rawfile('hyqihei_50s.otf')) 
          .fontColor(Color.Red) 
          .textAlign(TextAlign.Center) 
          .width('50%') 
          .borderRadius(20) 
 
        Text('使用基础功能') 
          .fontSize(14)// .fontFamily($rawfile('hyqihei_50s.otf')) 
          .fontColor(Color.Red) 
          .textAlign(TextAlign.Center) 
          .borderRadius(20) 
          .width('50%') 
 
      }.width('100%') 
      .margin({ top: 16, bottom: 20 }) 
 
    }.width('100%').height('73%') 
    .backgroundColor('#fff') 
    .padding({ top: 30, bottom: 10 }) 
  } 
} 
 
interface ITargetValue { 
  isTarget: boolean, 
  src: string 
}

实现效果

分享
微博
QQ
微信
回复
2024-05-27 18:12:53
相关问题
连接网络信息获取方案
277浏览 • 1回复 待解决
har和hsp转换,方案
239浏览 • 1回复 待解决
转场动画,谁有方案
134浏览 • 1回复 待解决
SM4 CBC模式加解密,方案
448浏览 • 1回复 待解决
屏幕旋转计算,什么方案
406浏览 • 1回复 待解决
taskpool使用 ,谁有方案
198浏览 • 1回复 待解决
Scrollerfling实现有什么方案
370浏览 • 1回复 待解决
本地收发消息实践,谁有方案
222浏览 • 1回复 待解决
Listitem点击变色什么方法
576浏览 • 1回复 待解决
关于text内容删除问题
1289浏览 • 1回复 待解决
udp协议是否提供框架
501浏览 • 1回复 待解决
mqtt协议使用有知道
1015浏览 • 1回复 待解决
请问现在harmonyOS屏幕适配方案
2281浏览 • 1回复 待解决
本地模拟器时间问题
1038浏览 • 1回复 待解决
页面截图功能,什么方法?
350浏览 • 1回复 待解决
鸿蒙java开发 实人认证方案
2794浏览 • 1回复 待解决