|
@@ -8,6 +8,8 @@
|
|
</route>
|
|
</route>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { getPhotoList } from '../../../../core/libs/requests'
|
|
import { getPhotoList } from '../../../../core/libs/requests'
|
|
|
|
+import SectionHeading from '@/components/section-heading.vue'
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
const id = ref()
|
|
const id = ref()
|
|
const type = ref()
|
|
const type = ref()
|
|
@@ -21,7 +23,7 @@ const { data, run: setData } = useRequest(
|
|
{ initialData: { list: [], total: 0 } },
|
|
{ initialData: { list: [], total: 0 } },
|
|
)
|
|
)
|
|
onLoad(async (query: { id: string; type: 'activity' | 'studyTour'; title: string }) => {
|
|
onLoad(async (query: { id: string; type: 'activity' | 'studyTour'; title: string }) => {
|
|
- uni.setNavigationBarTitle({ title: query.title })
|
|
|
|
|
|
+ await uni.setNavigationBarTitle({ title: query.title })
|
|
id.value = query.id
|
|
id.value = query.id
|
|
type.value = query.type
|
|
type.value = query.type
|
|
await setData()
|
|
await setData()
|
|
@@ -30,11 +32,14 @@ onLoad(async (query: { id: string; type: 'activity' | 'studyTour'; title: string
|
|
<template>
|
|
<template>
|
|
<div class="flex flex-col flex-grow p-4 bg-white gap-4">
|
|
<div class="flex flex-col flex-grow p-4 bg-white gap-4">
|
|
<template v-for="(it, i) in data.list" :key="i">
|
|
<template v-for="(it, i) in data.list" :key="i">
|
|
|
|
+ <SectionHeading
|
|
|
|
+ :title="'第' + Number(i + 1) + '天 ' + dayjs(it.travelDate).format('MM月DD日')"
|
|
|
|
+ ></SectionHeading>
|
|
<template v-for="(video, index) in it.video" :key="index">
|
|
<template v-for="(video, index) in it.video" :key="index">
|
|
<video class="w-full" :src="video"></video>
|
|
<video class="w-full" :src="video"></video>
|
|
</template>
|
|
</template>
|
|
<template v-for="(img, index) in it.picture" :key="index">
|
|
<template v-for="(img, index) in it.picture" :key="index">
|
|
- <wd-img width="100%" mode="widthFix" :src="img" />
|
|
|
|
|
|
+ <wd-img width="100%" mode="widthFix" :src="img" enable-preview show-menu-by-longpress />
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|