confirmPaymentDialog.vue 939 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!-- -->
  2. <template>
  3. <div>
  4. <CtDialog
  5. :visible="payDialog"
  6. :widthType="3"
  7. titleClass="text-h6"
  8. title="确认支付"
  9. :footer="false"
  10. submitText="确认"
  11. @close="handleClose"
  12. >
  13. <pay
  14. ref="payRef"
  15. v-bind="$attrs"
  16. @paySuccess="paySuccess"
  17. @stopInterval="stopInterval"
  18. ></pay>
  19. </CtDialog>
  20. </div>
  21. </template>
  22. <script setup>
  23. defineOptions({name: 'pay-confirmPaymentDialog'})
  24. import pay from './index.vue'
  25. import { ref } from 'vue'
  26. const emit = defineEmits(['close', 'paySuccess'])
  27. const payDialog = ref(false)
  28. setTimeout(() => {
  29. payDialog.value = true
  30. }, 500)
  31. const handleClose = () => {
  32. payDialog.value = false
  33. emit('close')
  34. }
  35. const paySuccess = () => {
  36. emit('paySuccess')
  37. // payDialog.value = false
  38. }
  39. const stopInterval = () => {
  40. emit('stopInterval')
  41. // payDialog.value = false
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. </style>