You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="youMightLike tw-border tw-border-solid tw-border-neutrals-200 tw-h-auto tw-overflow-hidden tw-rounded-[24px] tw-mt-[20px]"
  4. >
  5. <a
  6. :href="localePath(`/service/${item.id}`)"
  7. class="tw-block tw-w-full xl:tw-overflow-hidden"
  8. >
  9. <lazyImg
  10. :src="item.preview_image"
  11. :customClass="'tw-h-[40vw] md:tw-h-[25vw] xl:tw-h-[10vw] swiper-lazy tw-rounded-t-[24px] tw-w-full tw-h-auto tw-transition tw-duration-200 tw-ease-in-out xl:hover:tw-scale-110'"
  12. >
  13. </lazyImg>
  14. </a>
  15. <div class="tw-px-[16px] tw-py-[10px]">
  16. <div class="t14 tw-text-neutrals-600 tw-mb-[4px] tw-flex">
  17. <div v-if="item.region">{{ regionNameList[item.region] }}</div>
  18. <div v-if="item.region"></div>
  19. <div v-if="item.country">{{ countryNameList[item.country] }}</div>
  20. </div>
  21. <a :href="localePath(`/service/${item.id}`)">
  22. <div
  23. class="t14 tw-text-base-primary tw-mb-[10px] tw-h-[36px] tw-line-clamp-2 tw-text-ellipsis tw-overflow-hidden"
  24. >
  25. {{ item.name }}
  26. </div>
  27. </a>
  28. <div class="tw-min-h-[50px] tw-relative">
  29. <div
  30. class="t12 tw-text-neutrals-800 tw-bg-[#f6f6f6] tw-rounded-[10px] tw-inline-block tw-px-[10px] tw-py-[5px] tw-mb-[10px] tw-h-[26px]">
  31. {{ item.subcategory }}
  32. </div>
  33. <div class="tw-flex tw-items-center tw-mb-[8px] tw-h-[18px]">
  34. <div class="tw-body-4 tw-text-primary-1 tw-mr-[4px]">
  35. {{ item.rating }}
  36. </div>
  37. <img
  38. src="~/assets/svg/star.svg"
  39. class="tw-h-[12px] tw-w-[12px] tw-mr-[7px]"
  40. />
  41. <div class="tw-body-4 tw-text-neutrals-600">
  42. ({{ item.reviews }} reviews)
  43. </div>
  44. </div>
  45. <div
  46. class="tw-flex tw-flex-col tw-items-end tw-absolute tw-bottom-0 tw-right-0"
  47. >
  48. <!-- <div
  49. class="t12 tw-bg-primary-1 tw-text-neutrals-100 tw-inline-block tw-rounded-[8px] tw-mb-[8px] tw-px-[10px] tw-py-[4px] tw-h-[24px]">
  50. {{ service.discount }}% OFF
  51. </div> -->
  52. <div class="t14 tw-flex tw-h-[21px] md:t16">
  53. <!-- <div
  54. class="tw-text-neutrals-400 tw-inline-block tw-line-through tw-mr-[8px]"
  55. >
  56. ${{ service.total }}
  57. </div> -->
  58. <div class="tw-text-primary-1">
  59. ${{ item.price + " " + item.payment_currency }}
  60. <span class="tw-text-primary-2">up</span>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import lazyImg from "@/components/img/img.vue";
  70. export default {
  71. props: {
  72. service: {
  73. type: Object,
  74. },
  75. item: {
  76. type: Object,
  77. },
  78. countryNameList: {
  79. type: Array,
  80. default: () => []
  81. },
  82. cityNameList: {
  83. type: Array,
  84. default: () => []
  85. },
  86. regionNameList: {
  87. type: Array,
  88. default: () => []
  89. },
  90. },
  91. components: {
  92. lazyImg,
  93. },
  94. data() {
  95. return {};
  96. },
  97. mounted() {},
  98. methods: {},
  99. };
  100. </script>
  101. <style lang="scss" scoped>
  102. .youMightLike {
  103. -webkit-mask-image: -webkit-radial-gradient(white, black);
  104. }
  105. </style>