finish.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <script lang='ts' setup>
  2. import { useCommonStore } from '@/stores/modules/common'
  3. import { downloadFileByA } from '@/utils/common/download'
  4. import { useUserStore } from '@/stores/modules/user'
  5. import { downloadRecordApi } from '@/api/model/user'
  6. const commonStore = useCommonStore()
  7. const { downloadCatalog } = storeToRefs(commonStore)
  8. const userStore = useUserStore()
  9. const { isLogin, isCompletedInfo } = storeToRefs(userStore)
  10. const isDownloading = ref(false)
  11. async function startDownload() {
  12. if (downloadCatalog.value) {
  13. isDownloading.value = true
  14. await downloadFileByA(downloadCatalog.value.pdf, `${downloadCatalog.value.title || ''}.pdf`)
  15. isCompletedInfo.value && await downloadRecordApi({ catalogueId: downloadCatalog.value.id })
  16. const timer = setTimeout(() => {
  17. isDownloading.value = false
  18. clearTimeout(timer)
  19. }, 5000)
  20. }
  21. else { console.error('No download catalog available') }
  22. }
  23. startDownload()
  24. </script>
  25. <template>
  26. <div>
  27. <div class="custom-title-font text-24px fw-800 text-#333 mb-10px flex items-center">
  28. {{ isDownloading ? 'Downloading...' : 'Download Successfully!👏' }}
  29. </div>
  30. <div class="text-14px text-#1A1A1A lh-22px mb-20px">
  31. Please feel free to contact us to customize your exclusive product solution.
  32. </div>
  33. <div class="b-rd-200px bg-#fff text-#333 py-14px px-46px b-1px b-solid b-#D8D8D8 hover:b-#9B6CFF flex !bg-#fff items-center mb-24px">
  34. <div class="p-14px b-rd-50% bg-#F2E5F2 mr-26px">
  35. <img src="@/assets/images/email.png" alt="" class="w-24px h-24px ">
  36. </div>
  37. <div>
  38. <div class="text-18px fw-bold custom-title-font">
  39. Email
  40. </div>
  41. <div class="text-#9B6CFF lh-24px">
  42. spark@ejet.com
  43. </div>
  44. </div>
  45. </div>
  46. <div class="b-rd-200px bg-#fff b-1px py-14px px-46px text-#333 b-solid b-#D8D8D8 hover:b-#9B6CFF flex items-center">
  47. <div class="p-14px b-rd-50% bg-#F2E5F2 mr-26px">
  48. <img src="@/assets/images/wechat.png" class="w-24px h-24px" alt="">
  49. </div>
  50. <div>
  51. <div class="text-18px fw-bold custom-title-font">
  52. WhatsApp
  53. </div>
  54. <div class="text-#9B6CFF lh-24px">
  55. +1 (234) 567-890
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </template>
  61. <style lang='less' scoped>
  62. ::v-deep(.login-input) {
  63. &.error-txt{
  64. .el-input__wrapper{
  65. border: 1px solid red!important;
  66. }
  67. }
  68. .el-input__wrapper{
  69. border-radius: 10px;
  70. }
  71. }
  72. </style>