index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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.points }}
  57. </div>
  58. <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-[34px]">
  59. 积分
  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. >
  65. 2000积分
  66. </div>
  67. </div>
  68. </div>
  69. </template>
  70. </div>
  71. </template>
  72. </PageHelper>
  73. </div>
  74. </template>