index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template name="popup">
  2. <view @touchmove.stop.prevent="clear">
  3. <view class="popup_mask" @touchmove.stop.prevent="clear"></view>
  4. <view class="popup_content">
  5. <view class="title">{{ title }}</view>
  6. <view class="explain_text">
  7. 请您务必认真阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了向您提供数据、分享等服务所要获取的权限信息。
  8. <view class="line">
  9. 您可以阅读
  10. <navigator
  11. :url="protocolPath"
  12. class="path"
  13. hover-class="navigator-hover"
  14. >《注册协议》</navigator
  15. >和<navigator
  16. :url="policyPath"
  17. class="path"
  18. hover-class="navigator-hover"
  19. >《隐私协议》</navigator
  20. >了解详细信息。如您同意,请点击"同意"开始接受我们的服务。
  21. </view>
  22. </view>
  23. <view class="button">
  24. <view class="back" @tap="back">暂不使用</view>
  25. <view class="consent" @tap="consent">同意</view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'popup',
  33. props: {
  34. title: {
  35. type: String,
  36. default: '服务协议和隐私政策'
  37. },
  38. // 协议路径
  39. protocolPath: {
  40. type: String
  41. },
  42. // 政策路径
  43. policyPath: {
  44. type: String
  45. }
  46. },
  47. data() {
  48. return {
  49. showPopup: true
  50. };
  51. },
  52. methods: {
  53. // 禁止滚动
  54. clear() {
  55. },
  56. back() {
  57. this.$emit('popupState', false);
  58. // // #ifdef APP-PLUS
  59. // plus.runtime.quit();
  60. // // #endif
  61. },
  62. // 关闭弹框
  63. consent() {
  64. this.$emit('popupState', true);
  65. }
  66. }
  67. };
  68. </script>
  69. <style lang="scss">
  70. .popup_mask {
  71. position: fixed;
  72. bottom: 0;
  73. top: 0;
  74. left: 0;
  75. right: 0;
  76. background-color: rgba(0, 0, 0, 0.4);
  77. transition-property: opacity;
  78. transition-duration: 0.3s;
  79. opacity: 0;
  80. z-index: 98;
  81. }
  82. .popup_mask {
  83. opacity: 1;
  84. }
  85. .popup_content {
  86. overflow: hidden;
  87. box-sizing: border-box;
  88. padding: 40upx 20upx 0 20upx;
  89. position: fixed;
  90. bottom: 30%;
  91. border-radius: 8px;
  92. left: 50%;
  93. margin-left: -40%;
  94. right: 0;
  95. min-height: 400upx;
  96. background: #ffffff;
  97. width: 80%;
  98. z-index: 99;
  99. .title {
  100. text-align: center;
  101. font-size: 34upx;
  102. padding: 10upx 0 0 0;
  103. }
  104. .explain_text {
  105. font-size: 30upx;
  106. padding: 30upx 30upx 40upx 30upx;
  107. line-height: 38upx;
  108. .line {
  109. display: block;
  110. .path {
  111. color: #007aff;
  112. display: inline-block;
  113. text-align: center;
  114. }
  115. }
  116. }
  117. .button {
  118. display: flex;
  119. padding: 20upx;
  120. align-items: center;
  121. font-size: 34upx;
  122. justify-content: space-around;
  123. border-top: 1upx solid #f2f2f2;
  124. view {
  125. text-align: center;
  126. }
  127. }
  128. }
  129. </style>