finish.vue 2.2 KB

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