소스 검색

根据游学计划列表页-游学项目对应的第x站,详情页也显示第x站

Jake 4 달 전
부모
커밋
26381fb3b2

+ 1 - 1
packages/app/src/pages/home/activity/detail/index.vue

@@ -268,7 +268,7 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
       <div v-if="type === 'studyTour'" class="flex items-center h-full mt-9 gap-1.5">
         <wd-img width="18" height="18" :src="map"></wd-img>
         <div class="text-[#c1c1c1] text-base font-normal font-['PingFang_SC'] leading-normal">
-          第
+          第{{ data?.sort }}
         </div>
       </div>
     </div>

+ 1 - 1
packages/app/src/pages/home/study-tour/components/study-tour-card.vue

@@ -34,7 +34,7 @@ const toDetail = () => {
       <div class="flex gap-1">
         <wd-img width="23" height="23" :src="map"></wd-img>
         <div class="text-white text-base font-normal font-['PingFang_SC'] leading-relaxed">
-          第{{ options?.index + 1 }}站
+          第{{ options?.sort }}站
         </div>
         <div class="flex-1"></div>
         <div

+ 5 - 1
packages/app/src/pages/home/study-tour/index.vue

@@ -60,7 +60,11 @@ onMounted(async () => {
             height="100%"
             custom-class="aspect-[1.73/1]"
             :src="banners[0].bannerImgUrl"
-            @click="router.push(`/pages/home/study-tour/list`)"
+            @click="
+              router.push(
+                `/pages/home/study-tour/list?designStudyAbroadYear=${banners[0].designStudyAbroadYear}`,
+              )
+            "
           ></wd-img>
         </div>
       </template>

+ 18 - 3
packages/app/src/pages/home/study-tour/list.vue

@@ -8,12 +8,18 @@
 </route>
 <script setup lang="ts">
 import SectionHeading from '@/components/section-heading.vue'
-import { getAppMemberLevelConfigs, getStudyTours } from '../../../core/libs/requests'
+import { getAppMemberLevelConfigs, getByDictType, getStudyTours } from '../../../core/libs/requests'
 import dayjs from 'dayjs'
 import StudyTourCard from './components/study-tour-card.vue'
 import PageHelper from '@/components/page-helper.vue'
+import { CircleType, DictType } from '@/core/libs/models'
+import { zipToObject } from 'radash'
+
+// const title = computed(() => `${dayjs().year()}年游学计划`)
+const designStudyAbroadYear = ref('')
+const title = ref('')
+const studyYear = ref('')
 
-const title = computed(() => `${dayjs().year()}年游学计划`)
 const { data: levels, run: setLevels } = useRequest(() => getAppMemberLevelConfigs(), {
   initialData: [],
 })
@@ -23,6 +29,12 @@ const levelsByMemberLevel = computed(() =>
     return acc
   }, {}),
 )
+onLoad(async (query) => {
+  console.log('designStudyAbroadYear=', query)
+  designStudyAbroadYear.value = query.designStudyAbroadYear
+  title.value = `${designStudyAbroadYear.value}年游学计划`
+})
+
 onMounted(async () => {
   await setLevels()
 })
@@ -35,7 +47,10 @@ onMounted(async () => {
     >
       *我们为您精心打造了一个独特且极具价值的游学项目。这个项目的核心旨在全方位提升
     </div>
-    <PageHelper :request="getStudyTours" :query="{ showStatus: '1' }">
+    <PageHelper
+      :request="getStudyTours"
+      :query="{ showStatus: '1', studyYear: designStudyAbroadYear }"
+    >
       <template #default="{ source }">
         <div class="py-4 flex flex-col gap-6">
           <template v-for="(it, index) in source?.list" :key="index">