|
@@ -23,6 +23,7 @@ import {
|
|
|
getSetIndexConfigs,
|
|
|
getStudyTours,
|
|
|
shareCircle,
|
|
|
+ updateSetIndexConfig,
|
|
|
} from '../../core/libs/requests'
|
|
|
import { logo } from '../../core/libs/svgs'
|
|
|
import PageHelper from '@/components/page-helper.vue'
|
|
@@ -38,7 +39,7 @@ import ButtonEvo from '@/components/button-evo.vue'
|
|
|
import ImgBtnEvo from '@/components/img-btn-evo.vue'
|
|
|
import SectionHeading from '@/components/section-heading.vue'
|
|
|
import dayjs from 'dayjs'
|
|
|
-import { sort } from 'radash'
|
|
|
+import { pick, sort } from 'radash'
|
|
|
import { Activity, StudyTour } from '../../core/libs/models'
|
|
|
|
|
|
defineOptions({
|
|
@@ -91,6 +92,10 @@ const setHotActivities = async () => {
|
|
|
console.log(sort(res.flat(), (it) => it.startAt))
|
|
|
hotActivities.value = sort(res.flat(), (it) => it.startAt) as any
|
|
|
}
|
|
|
+const handlePlay = async (id) => {
|
|
|
+ const body = pick(swiperData.value?.find((it) => it.data.id === id).data, ['id', 'status'])
|
|
|
+ await updateSetIndexConfig(body)
|
|
|
+}
|
|
|
onShow(async () => {
|
|
|
pageHelperRef.value?.refresh()
|
|
|
// await setStudyTours()
|
|
@@ -130,7 +135,12 @@ onShareAppMessage(async ({ from, target }) => {
|
|
|
:key="id"
|
|
|
>
|
|
|
<swiper-item>
|
|
|
- <HomeBanner :id="id" :url="indexPromotionalVideoImage" :cover="coverVideoImage" />
|
|
|
+ <HomeBanner
|
|
|
+ :id="id"
|
|
|
+ :url="indexPromotionalVideoImage"
|
|
|
+ :cover="coverVideoImage"
|
|
|
+ @play="handlePlay"
|
|
|
+ />
|
|
|
</swiper-item>
|
|
|
</template>
|
|
|
</swiper>
|