AI销管
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

109 righe
2.4 KiB

  1. <template>
  2. <uni-popup ref="privacyPopup" type="center" :is-mask-click="true">
  3. <view class="privacyPopup">
  4. <view class="title">
  5. <view>数智工牌</view>
  6. </view>
  7. <view class="content_pri">
  8. <text>在你使用【数智工牌】服务之前,请仔细阅读</text>
  9. <text style="color: #1793ee;" @click="goToPrivacy">《数智工牌小程序隐私保护指引》</text>。
  10. <text>如你同意数智工牌小程序隐私保护指引,请点击“同意”开始使用【数智工牌】。</text>
  11. </view>
  12. <view class="pri_btn">
  13. <button class="confuse_btn" @click="confusePrivacy">拒绝</button>
  14. <button class="confirm_btn" id="agree-btn"
  15. open-type="agreePrivacyAuthorization"
  16. @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
  17. </view>
  18. </view>
  19. </uni-popup>
  20. </template>
  21. <script>
  22. export default {
  23. data(){
  24. return{
  25. }
  26. },
  27. methods:{
  28. init(resolve){
  29. this.$refs.privacyPopup.open()
  30. this.resolvePrivacyAuthorization = resolve
  31. },
  32. // 打开隐私协议
  33. goToPrivacy(){
  34. uni.openPrivacyContract({
  35. success: () => {
  36. console.log('打开成功');
  37. },
  38. fail: () => {
  39. uni.showToast({
  40. title:'打开失败,稍后重试',
  41. icon: 'none'
  42. })
  43. }
  44. })
  45. },
  46. // 拒绝
  47. confusePrivacy(){
  48. this.$refs.privacyPopup.close();
  49. this.resolvePrivacyAuthorization({ event:'disagree' });
  50. },
  51. // 同意
  52. handleAgreePrivacyAuthorization(){
  53. this.resolvePrivacyAuthorization({ buttonId: 'agree-btn', event: 'agree' });
  54. this.$refs.privacyPopup.close();
  55. }
  56. }
  57. }
  58. </script>
  59. <style>
  60. *{
  61. box-sizing: border-box;
  62. }
  63. .privacyPopup{
  64. width: 520rpx;
  65. /* height: 500rpx; */
  66. background-color: #fff;
  67. border-radius: 20rpx;
  68. padding: 20rpx 40rpx;
  69. }
  70. .title{
  71. display: flex;
  72. align-items: center;
  73. justify-content: start;
  74. margin: 20rpx 0;
  75. font-size: 38rpx;
  76. font-weight: 600;
  77. }
  78. .content_pri{
  79. width: 480rpx;
  80. margin: 0 auto;
  81. font-size: 34rpx;
  82. line-height: 1.5;
  83. }
  84. .pri_btn{
  85. width: 100%;
  86. height: 158rpx;
  87. display: flex;
  88. align-items: center;
  89. justify-content: space-evenly;
  90. }
  91. .pri_btn .confuse_btn,.pri_btn .confirm_btn{
  92. width: 200rpx;
  93. height: 90rpx;
  94. border-radius: 20rpx;
  95. font-size: 34rpx;
  96. }
  97. .pri_btn .confuse_btn{
  98. background-color: #eee;
  99. color: #52bf6b;
  100. }
  101. .pri_btn .confirm_btn{
  102. background-color: #52bf6b;
  103. color: #fff;
  104. }
  105. </style>