panel.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { getStaticDataApi } from '~/api/model/my'
  4. const staticList = ref({
  5. wishOrderCount: 0,
  6. rfqCount: 0,
  7. merchandiseFavoriteCount: 0,
  8. brandFavoriteCount: 0,
  9. })
  10. async function getStaticData() {
  11. try {
  12. const data = await getStaticDataApi()
  13. staticList.value = data
  14. }
  15. catch (error) {
  16. console.log(error)
  17. }
  18. }
  19. getStaticData()
  20. </script>
  21. <template>
  22. <div class="">
  23. <div
  24. class="py-16px px-24px bg-#FAFAFA b-rd-10px text-#000 text-20px fw-500 mb-20px"
  25. >
  26. Dashboard
  27. </div>
  28. <div class="flex">
  29. <div class="flex-grow-1">
  30. <div class="mb-20px bg-#FAFAFA b-rd-10px py-40px flex">
  31. <div
  32. class="text-center py-15px w-30% pos-relative after:pos-absolute after:content-empty after:right-0 after:top-0 after:bottom-0 after:w-1px after:bg-#EEEEEE"
  33. >
  34. <div class="mb-4px fw-500 text-40px text-#AB7045">
  35. {{ staticList.rfqCount }}
  36. </div>
  37. <div class="text-#999">
  38. Cart
  39. </div>
  40. </div>
  41. <div
  42. class="text-center py-15px w-30% pos-relative after:pos-absolute after:content-empty after:right-0 after:top-0 after:bottom-0 after:w-1px after:bg-#EEEEEE"
  43. >
  44. <div class="mb-4px fw-500 text-40px text-#AB7045">
  45. {{ staticList.wishOrderCount }}
  46. </div>
  47. <div class="text-#999">
  48. Orders
  49. </div>
  50. </div>
  51. <div class="text-center w-60% py-15px">
  52. <div class="flex text-#36363D justify-center mb-14px">
  53. <div class="mr-30px">
  54. <span class="fw-500 text-40px text-#AB7045 mr-4px">{{ staticList.merchandiseFavoriteCount }}</span>
  55. Products
  56. </div>
  57. <div>
  58. <span class="fw-500 text-40px text-#AB7045 mr-4px">{{ staticList.brandFavoriteCount }}</span>
  59. Brands
  60. </div>
  61. </div>
  62. <div class="text-#999">
  63. Favorites
  64. </div>
  65. </div>
  66. </div>
  67. <div class="bg-#FAFAFA b-rd-10px pt-18px pb-52px px-24px">
  68. <div class="text-18px fw-500 text-#36363D mb-24px">
  69. Brands
  70. </div>
  71. <business-account-panel-swiper-brands />
  72. </div>
  73. </div>
  74. <div class="w-410px ml-20px bg-#FAFAFA b-rd-10px">
  75. <business-account-notification />
  76. </div>
  77. </div>
  78. <div class="bg-#FAFAFA b-rd-10px mt-20px p-20px pb-30px">
  79. <div class="text-18px fw-500 text-#36363D mb-24px">
  80. Recommended
  81. </div>
  82. <business-account-panel-swiper-recommend />
  83. </div>
  84. </div>
  85. </template>
  86. <style lang="less" scoped></style>