index.vue 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <route lang="json">
  2. { "style": { "navigationBarTitleText": "案例拍摄", "navigationBarBackgroundColor": "#ffffff" } }
  3. </route>
  4. <script setup lang="ts">
  5. import PageHelper from '@/components/page-helper.vue'
  6. import { useRouter } from '../../../../core/utils/router'
  7. import { getProducts } from '../../../../core/libs/requests'
  8. const router = useRouter()
  9. onShareAppMessage(() => ({
  10. title: '案例拍摄',
  11. }))
  12. onShareTimeline(() => ({
  13. title: '案例拍摄',
  14. }))
  15. </script>
  16. <template>
  17. <div class="flex-grow p-3.5">
  18. <PageHelper
  19. class="flex-grow flex flex-col"
  20. :request="getProducts"
  21. :query="{ oneCategory: '2', secondCategory: '101' }"
  22. >
  23. <template #default="{ source }">
  24. <div class="grid grid-cols-2 gap-x-2.5 gap-y-10">
  25. <template v-for="(it, i) in source.list" :key="i">
  26. <div
  27. class="flex flex-col gap-4"
  28. @click="
  29. router.push(
  30. `/pages/home/spread/product-detail/index?id=${it.productId}&title=案例拍摄&item=4`,
  31. )
  32. "
  33. >
  34. <div class="aspect-square rounded-2xl overflow-hidden relative">
  35. <wd-img
  36. width="100%"
  37. height="100%"
  38. :src="it.productCoverImgUrl"
  39. custom-class="aspect-square"
  40. mode="aspectFill"
  41. />
  42. <div
  43. class="w-full h-[39px] bg-gradient-to-t from-black to-black/0 rounded-bl-2xl rounded-br-2xl absolute bottom-0 flex items-center justify-center"
  44. >
  45. <div class="text-white text-base font-normal font-['PingFang_SC'] leading-normal">
  46. <!-- 方晓峰 -->
  47. {{ it.prodcutName }}
  48. </div>
  49. </div>
  50. </div>
  51. <div class="flex items-center">
  52. <div
  53. class="text-[#ef4343] text-[22px] font-normal font-['D-DIN_Exp'] leading-normal"
  54. >
  55. <!-- 1600 -->
  56. {{ it.showFavourable ? it.favourablePoints : it.points }}
  57. </div>
  58. <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-[34px]">
  59. {{ String(it.needPoints) == '1' ? '折' : '积分' }}
  60. </div>
  61. <div class="flex-1"></div>
  62. <div
  63. class="w-[53px] text-black/30 text-xs font-normal font-['PingFang_SC'] line-through leading-normal"
  64. v-if="Number(data?.productPrice)"
  65. >
  66. ¥{{ it.productPrice }}
  67. </div>
  68. </div>
  69. </div>
  70. </template>
  71. </div>
  72. </template>
  73. </PageHelper>
  74. </div>
  75. </template>