普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.6 KiB

  1. <template>
  2. <view>
  3. <uv-popup ref="popup" :round="24">
  4. <view class="popup__view">
  5. <view class="header">
  6. 用户隐私保护提示
  7. </view>
  8. <view class="content">
  9. 在你使用 普兆医疗服务之前请仔细阅读我已阅读并同意
  10. <text class="highlight" @click="$refs.modal.open('config_agreement', '服务协议与隐私条款')">服务协议与隐私条款</text>
  11. <text class="highlight" @click="$refs.modal.open('config_privacy', '个人信息保护指引')">个人信息保护指引</text>
  12. 如你同意该指引请点击同意开始使用本小程序
  13. </view>
  14. <view class="footer">
  15. <button class="btn" @click="onConfirm(false)">拒绝</button>
  16. <button class="btn btn-confirm" @click="onConfirm(true)">同意</button>
  17. </view>
  18. </view>
  19. </uv-popup>
  20. <agreementModal ref="modal" @confirm="onConfirmSingle"></agreementModal>
  21. </view>
  22. </template>
  23. <script>
  24. import agreementModal from '@/pages_order/components/agreementModal.vue'
  25. export default {
  26. name: 'agreementModal',
  27. components: {
  28. agreementModal,
  29. },
  30. data() {
  31. return {
  32. confirmSet: new Set(),
  33. }
  34. },
  35. methods: {
  36. open() {
  37. this.$refs.popup.open('bottom');
  38. },
  39. onConfirm(confirm) {
  40. this.$emit('confirm', confirm)
  41. this.$refs.popup.close();
  42. },
  43. onConfirmSingle(confirm, key) {
  44. if (!this.confirmSet.has(key) && confirm) {
  45. this.confirmSet.add(key)
  46. } else if (this.confirmSet.has(key) && !confirm) {
  47. this.confirmSet.delete(key)
  48. }
  49. if (this.confirmSet.size === 2) {
  50. this.onConfirm(true)
  51. }
  52. }
  53. },
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .popup__view {
  58. display: flex;
  59. flex-direction: column;
  60. padding: 44rpx 46rpx 128rpx 46rpx;
  61. }
  62. .header {
  63. font-size: 32rpx;
  64. font-family: PingFang SC;
  65. font-weight: 600;
  66. line-height: 1.5;
  67. color: #000000;
  68. }
  69. .content {
  70. margin-top: 30rpx;
  71. font-size: 32rpx;
  72. font-family: PingFang SC;
  73. font-weight: 400;
  74. line-height: 1.5;
  75. text-align: left;
  76. color: #000000;
  77. .highlight {
  78. color: #4C6EAE;
  79. }
  80. }
  81. .footer {
  82. margin-top: 122rpx;
  83. text-align: center;
  84. .btn {
  85. display: inline-flex;
  86. align-items: center;
  87. justify-content: center;
  88. border-radius: 8rpx;
  89. width: 232rpx;
  90. padding: 18rpx 84rpx;
  91. font-size: 32rpx;
  92. font-family: PingFang SC;
  93. font-weight: 500;
  94. background: #F5F5F5;
  95. color: #07C160;
  96. &-confirm {
  97. background: #07C160;
  98. color: #FFFFFF;
  99. }
  100. }
  101. .btn + .btn {
  102. margin-left: 30rpx;
  103. }
  104. }
  105. </style>