agreeFirstDialog.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <uni-popup ref="agreeFirstDialog" :animation="false" :is-mask-click="false"
  3. mask-background-color="rgba(255, 255, 255, 0.6);">
  4. <view class="agree-first-sections-dialog">
  5. <view class="sections-content-box">
  6. <view class="agree-tip">我们将通过<text @click="agreeBtn('yhxy')">《用户协议》</text>和<text @click="agreeBtn('ystk')">《隐私政策》</text> 向您介绍我们为您提供的服务、我们如何处理个人信息以及您享有的权利。点击“同意”按钮,表示您已知情并同意以上协议。</view>
  7. <view class="first-confirm-btn" @click="confirmBtn">同意</view>
  8. <text class="not-confirm-btn" @click="handleClose">不同意</text>
  9. </view>
  10. </view>
  11. </uni-popup>
  12. <agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
  13. </template>
  14. <script setup>
  15. import { ref } from 'vue';
  16. import agreeContentDialog from './agreeContentDialog.vue';
  17. const agreeContentDialogRef = ref(null);
  18. const agreeType = ref(null);
  19. const agreeFirstDialog = ref(null); // 索引
  20. const $emit = defineEmits(['first-confirm-btn'])
  21. const agreeBtn = (data) => {
  22. if (data === 'yhxy') {
  23. agreeType.value = 'yhxy'
  24. } else {
  25. agreeType.value = 'ystk'
  26. }
  27. agreeContentDialogRef.value.handleShow();
  28. };
  29. // 打开弹窗
  30. function handleShow() {
  31. agreeFirstDialog.value.open();
  32. }
  33. // 关闭弹窗
  34. function handleClose() {
  35. agreeFirstDialog.value.close();
  36. }
  37. // 同意并登录按钮
  38. function confirmBtn(){
  39. $emit('first-confirm-btn');
  40. agreeFirstDialog.value.close();
  41. }
  42. defineExpose({
  43. handleShow
  44. })
  45. </script>
  46. <style>
  47. </style>