list.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationBarTitleText": "游学计划",
  5. "navigationBarBackgroundColor": "#fff"
  6. }
  7. }
  8. </route>
  9. <script setup lang="ts">
  10. import SectionHeading from '@/components/section-heading.vue'
  11. import { getContents, getStudyTours } from '../../../core/libs/requests'
  12. import dayjs from 'dayjs'
  13. import StudyTourCard from './components/study-tour-card.vue'
  14. import { list } from 'radash'
  15. const { data, run: setData } = useRequest(() => getContents({ contentType: '0' }), {
  16. initialData: { list: [] },
  17. })
  18. const title = computed(() => `${dayjs().year()}年游学计划`)
  19. onMounted(async () => {
  20. await setData()
  21. console.log(data.value)
  22. })
  23. </script>
  24. <template>
  25. <div class="px-3.5">
  26. <SectionHeading custom-class="py-6" :title="title"></SectionHeading>
  27. <div
  28. class="mx-3.5 text-justify text-black/40 text-sm font-normal font-['PingFang SC'] leading-relaxed"
  29. >
  30. *我们为您精心打造了一个独特且极具价值的游学项目。这个项目的核心旨在全方位提升
  31. </div>
  32. <template v-for="(it, index) in data.list" :key="index">
  33. <StudyTourCard custom-class="my-6" :options="it"></StudyTourCard>
  34. </template>
  35. </div>
  36. </template>