privacyPopup.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="pop">
  3. <view class="pop_con">
  4. <view class="title">用户隐私保护提示</view>
  5. <view class="desc">
  6. <view class="desc_con">感谢您使用本程序,您使用本程序前应当阅井同意</view>
  7. <view class="file" @click="openPrivacyContract">《大卫博士争霸赛小程序隐私保护指引》</view>
  8. <view class="desc_con">
  9. 当您点击同意并开始时用产品服务时,即表示你已理解并同息该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法进入程序。</view>
  10. </view>
  11. <view class="btn_box">
  12. <navigator open-type="exit" target="miniProgram" class="exit_btn" id="disagree-btn">不同意退出</navigator>
  13. <button id="agree-btn" @agreeprivacyauthorization="handleAgreePrivacyAuthorization"
  14. open-type="agreePrivacyAuthorization">同意并继续</button>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {};
  23. },
  24. methods: {
  25. openPrivacyContract() {
  26. wx.openPrivacyContract({
  27. success: res => {
  28. console.log('openPrivacyContract success')
  29. },
  30. fail: res => {
  31. console.error('openPrivacyContract fail', res)
  32. }
  33. })
  34. },
  35. handleAgreePrivacyAuthorization() {
  36. this.$nextTick(function() {
  37. this.$emit('confirm');
  38. })
  39. },
  40. handleDisagree() {
  41. // this.$store.commit('HIDESHOWPRIVACY')
  42. uni.navigateBackMiniProgram()
  43. uni.exit({
  44. success: () => {
  45. console.log("exit success")
  46. },
  47. fail: (e) => {
  48. console.log("exit fail")
  49. }
  50. });
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .pop {
  57. width: 100vw;
  58. height: 100vh;
  59. position: fixed;
  60. background-color: rgba(0, 0, 0, 0.1);
  61. z-index: 999;
  62. overflow: hidden;
  63. .pop_con {
  64. width: 100%;
  65. height: 40vh;
  66. background: #fff;
  67. border-top-left-radius: 26rpx;
  68. border-top-top-radius: 26rpx;
  69. position: fixed;
  70. left: 0;
  71. bottom: 0;
  72. padding: 0 30rpx;
  73. box-sizing: border-box;
  74. .title {
  75. font-size: 36rpx;
  76. font-weight: bold;
  77. margin: 24rpx 0;
  78. }
  79. .desc {
  80. font-size: 30rpx;
  81. color: 999;
  82. .file {
  83. color: #FB231F;
  84. margin: 24rpx 0;
  85. font-size: 32rpx;
  86. }
  87. }
  88. .btn_box {
  89. margin-top: 40rpx;
  90. display: flex;
  91. justify-content: space-around;
  92. align-items: center;
  93. .exit_btn {
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. width: 300rpx;
  98. height: 88rpx;
  99. background: #E9E9E9;
  100. border-radius: 44rpx;
  101. font-size: 32rpx;
  102. color: #333;
  103. }
  104. button {
  105. display: flex;
  106. justify-content: center;
  107. align-items: center;
  108. width: 300rpx;
  109. height: 88rpx;
  110. background: #FB231F;
  111. border-radius: 44rpx;
  112. font-size: 32rpx;
  113. color: #fff;
  114. background: linear-gradient(93deg, #F30000 0%, #FE4815 100%);
  115. }
  116. }
  117. }
  118. }
  119. </style>