privacy.uvue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="dialog-container">
  3. <view class="dialog-content">
  4. <view style="width: 100%;justify-content: center;align-items: center;background-color: #fff;">
  5. <image src="../image/logo.png" style="margin-top: 25px;width: 60px;height: 60px;"></image>
  6. </view>
  7. <text
  8. style="text-align: center;padding-top: 20px;font-size: 20px;color: black;background-color: #fff;">个人信息保护指引</text>
  9. <scroll-view
  10. style="flex: 1;align-content: center;padding-top: 10px;padding-left: 25px;padding-right: 25px;background-color: #fff;"
  11. show-scrollbar="false">
  12. <text>
  13. <!-- #ifdef APP-HARMONY -->
  14. <text class="privacy-text">欢迎使用DCloud开发者中心系统,我们将通过</text>
  15. <!-- #endif -->
  16. <!-- #ifndef APP-HARMONY -->
  17. <text class="privacy-text">欢迎使用Hello uni-app x,我们将通过</text>
  18. <text class="privacy-href" @click="hrefClick(hrefLicense)">《用户服务协议》及</text>
  19. <!-- #endif -->
  20. <text
  21. class="privacy-text">相关个人信息处理规则帮助你了解我们如何收集、处理个人信息。根据《常见类型移动互联网应用程序必要个人信息范围规定》。同意《基本功能数据处理规则》仅代表你同意使用浏览、搜索、下载等主要功能收集、处理相关必要个人信息及数据。此外,为了向你提供更多丰富、优质的服务,我们可能在你使用本产品的过程中提供电商购物、财经支付等扩展功能,如果你拒绝提供,你可能无法使用相应的扩展服务,但不影响你使用我们的基础服务。我们通过</text>
  22. <text class="privacy-href" @click="hrefClick(hrefPrivacy)">《隐私政策》</text>
  23. <text class="privacy-text">帮助你全面了解我们的服务及收集、处理个人信息的详细情况。</text>
  24. </text>
  25. </scroll-view>
  26. <button class="button" @click="reject">不同意</button>
  27. <button class="button" type="primary" open-type="agreePrivacyAuthorization" @click="agree">同意</button>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. // #ifdef APP-ANDROID || APP-IOS || APP-HARMONY
  33. import { openSchema } from '@/uni_modules/uts-openSchema'
  34. // #endif
  35. export default {
  36. data() {
  37. return {
  38. number: 0,
  39. hrefLicense: 'https://dcloud.io/license/DCloud.html',
  40. hrefPrivacy: 'https://dcloud.io/license/hello-uni-app-x.html'
  41. }
  42. },
  43. unmounted() {
  44. uni.offPrivacyAuthorizationChange(this.number)
  45. },
  46. onLoad() {
  47. this.number = uni.onPrivacyAuthorizationChange((callback) => {
  48. uni.showToast({
  49. title: 'isPrivacyAgree:' + !callback.needAuthorization
  50. })
  51. })
  52. },
  53. methods: {
  54. agree() {
  55. uni.closeDialogPage({
  56. dialogPage: this.$page
  57. })
  58. },
  59. reject() {
  60. uni.resetPrivacyAuthorization()
  61. uni.closeDialogPage({
  62. dialogPage: this.$page
  63. })
  64. },
  65. hrefClick(href : string) {
  66. // #ifdef APP-HARMONY
  67. uni.navigateTo({
  68. url: '/pages/component/button/privacy-web-view?url=/hybrid/html/privacy.html&title=隐私政策'
  69. })
  70. // #endif
  71. // #ifdef APP-ANDROID || APP-IOS
  72. openSchema(href)
  73. // #endif
  74. },
  75. }
  76. }
  77. </script>
  78. <style>
  79. .dialog-container {
  80. width: 100%;
  81. height: 100%;
  82. background-color: rgba(0, 0, 0, 0.3);
  83. display: flex;
  84. justify-content: center;
  85. align-items: center;
  86. }
  87. .dialog-content {
  88. height: 60%;
  89. width: 80%;
  90. /* background-color: #fff; */
  91. border-radius: 12px;
  92. }
  93. .button {
  94. border-radius: 0px;
  95. border: 0px none;
  96. font-size: 15px;
  97. color: lightgrey;
  98. text-align: center;
  99. line-height: 40px;
  100. }
  101. .button-hover1 {
  102. color: black;
  103. background-color: #fff;
  104. }
  105. .button-hover2 {
  106. color: black;
  107. background-color: royalblue;
  108. }
  109. .privacy-text {
  110. color: grey;
  111. }
  112. .privacy-href {
  113. color: cadetblue;
  114. font-weight: bold;
  115. text-decoration-line: underline;
  116. }
  117. </style>