|
@@ -14,13 +14,69 @@ import dayjs from 'dayjs'
|
|
|
import BottomAppBar from '@/components/bottom-app-bar.vue'
|
|
|
import { useRouter } from '../../../../core/utils/router'
|
|
|
import PageHelper from '@/components/page-helper.vue'
|
|
|
+import { ConfigProviderThemeVars } from 'wot-design-uni'
|
|
|
+import SectionHeading from '@/components/section-heading.vue'
|
|
|
+import AvatarGroupCasual from '@/components/avatar-group-casual/avatar-group-casual.vue'
|
|
|
+import { calendar, clock, funnel, location, user } from '@designer-hub/assets/src/icons'
|
|
|
+import { NetImages } from '../../../../core/libs/net-images'
|
|
|
|
|
|
+const themeVars = ref<ConfigProviderThemeVars>({
|
|
|
+ tableBorderColor: 'white',
|
|
|
+ tabsNavLineBgColor: 'white',
|
|
|
+ tabsNavColor: 'white',
|
|
|
+})
|
|
|
const router = useRouter()
|
|
|
const id = ref()
|
|
|
-const { data, run: setData } = useRequest(() => getActivity(id.value))
|
|
|
+const type = ref<'activity' | 'studyTour'>()
|
|
|
+const activityTypes = ref({ activity: '活动', studyTour: '游学' })
|
|
|
+const { data, run: setData } = useRequest(() => getActivity(id.value), { initialData: {} })
|
|
|
+const { data: signups, run: setSignups } = useRequest(
|
|
|
+ () => getActivitySignups({ activityId: id.value }),
|
|
|
+ { initialData: { list: [], total: 0 } },
|
|
|
+)
|
|
|
const show = ref(false)
|
|
|
const successShow = ref(false)
|
|
|
const listShow = ref(false)
|
|
|
+const isActivity = computed(() => type.value === 'activity')
|
|
|
+const isStudyTour = computed(() => type.value === 'studyTour')
|
|
|
+const infos = computed(() => [
|
|
|
+ {
|
|
|
+ icon: clock,
|
|
|
+ title: '报名时间',
|
|
|
+ content: [
|
|
|
+ dayjs(data.value.applyStartTime).format('YYYY.MM.DD'),
|
|
|
+ dayjs(data.value.applyEndTime).format('YYYY.MM.DD'),
|
|
|
+ ],
|
|
|
+ visable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: calendar,
|
|
|
+ title: `${activityTypes.value[type.value]}时间`,
|
|
|
+ content: [
|
|
|
+ dayjs(data.value.activityStartTime).format('YYYY.MM.DD'),
|
|
|
+ dayjs(data.value.activityEndTime).format('YYYY.MM.DD'),
|
|
|
+ ],
|
|
|
+ visable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: location,
|
|
|
+ title: `${activityTypes.value[type.value]}地点`,
|
|
|
+ content: [data.value.activityAddr],
|
|
|
+ visable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: user,
|
|
|
+ title: `${activityTypes.value[type.value]}名额`,
|
|
|
+ content: [data.value.activityAllowCount],
|
|
|
+ visable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: funnel,
|
|
|
+ title: `等级限制`,
|
|
|
+ content: ['白银以上等级'],
|
|
|
+ visable: true,
|
|
|
+ },
|
|
|
+])
|
|
|
|
|
|
const handleConfirm = async () => {
|
|
|
const { data, code, msg } = await activitySignup({ id: id.value })
|
|
@@ -31,39 +87,60 @@ const handleConfirm = async () => {
|
|
|
successShow.value = true
|
|
|
}
|
|
|
}
|
|
|
-onLoad(async (query: { id: string }) => {
|
|
|
+onLoad(async (query: { id: string; type: 'activity' }) => {
|
|
|
id.value = query.id
|
|
|
+ type.value = query.type
|
|
|
await setData()
|
|
|
console.log(data.value)
|
|
|
+ await setSignups()
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
- <div class="flex-grow bg-[#36200f] px-3.5">
|
|
|
+ <div
|
|
|
+ class="flex-grow bg-white px-3.5 bg-[length:100%_100%]"
|
|
|
+ :style="{ backgroundImage: `url(${data.backgroundUrl})` }"
|
|
|
+ >
|
|
|
<NavbarEvo transparent dark></NavbarEvo>
|
|
|
- <div class="aspect-[1.26/1] relative">
|
|
|
- <wd-img width="100%" height="100%" src=""></wd-img>
|
|
|
- <div
|
|
|
- class="absolute bottom-3 bg-white/20 rounded-[20px] backdrop-blur-[6px] px-3.5 py-1 flex gap-2.5"
|
|
|
- @click="listShow = true"
|
|
|
- >
|
|
|
- <wd-img width="20" height="20" :src="bell"></wd-img>
|
|
|
- <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 白金会员王凯峰已报名
|
|
|
+ <div class="aspect-[1.26/1] relative mx--3.5">
|
|
|
+ <wd-img width="100%" height="100%" :src="data.bannerUrl?.at(0)"></wd-img>
|
|
|
+ <div class="absolute left-3.5 bottom-3" @click="listShow = true">
|
|
|
+ <div
|
|
|
+ v-if="isStudyTour"
|
|
|
+ class="bg-white/20 rounded-[20px] backdrop-blur-[6px] px-3.5 py-1 flex gap-2.5"
|
|
|
+ >
|
|
|
+ <wd-img width="20" height="20" :src="bell"></wd-img>
|
|
|
+ <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ 白金会员王凯峰已报名
|
|
|
+ </div>
|
|
|
+ <div class="w-6 bg-black aspect-square rounded-full flex items-center justify-center">
|
|
|
+ <wd-img width="18" height="18" :src="rightFill"></wd-img>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="w-6 bg-black aspect-square rounded-full flex items-center justify-center">
|
|
|
- <wd-img width="18" height="18" :src="rightFill"></wd-img>
|
|
|
+ <div v-if="isActivity" class="flex items-center gap-1.25">
|
|
|
+ <AvatarGroupCasual
|
|
|
+ :urls="signups.list.map(() => NetImages.DefaultAvatar)"
|
|
|
+ :width="40"
|
|
|
+ :height="40"
|
|
|
+ ></AvatarGroupCasual>
|
|
|
+ <div class="text-white/60 text-sm font-normal font-['PingFang SC'] leading-[10.18px]">
|
|
|
+ {{ signups.total }}人已报名
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="flex">
|
|
|
- <wd-img width="18" height="18" :src="map"></wd-img>
|
|
|
- <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 第一站
|
|
|
+ <div class="h-9">
|
|
|
+ <div v-if="type === 'studyTour'" class="flex">
|
|
|
+ <wd-img width="18" height="18" :src="map"></wd-img>
|
|
|
+ <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ 第一站
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="w-[347px] text-white text-[26px] font-normal font-['PingFang SC'] leading-[44px]">
|
|
|
+ <div
|
|
|
+ class="w-[347px] text-white text-[26px] font-normal font-['PingFang SC'] leading-[44px] flex items-center gap-4"
|
|
|
+ >
|
|
|
<!-- 日本研学·东京艺术大学设计游学 -->
|
|
|
- {{ data?.name }}
|
|
|
+ <div class="inline-block">{{ data?.name }}</div>
|
|
|
<div class="inline-block py-1.5 px-4 bg-white rounded-[20px] backdrop-blur-[15px]">
|
|
|
<div
|
|
|
class="w-[42px] h-[21px] text-[#a60707] text-sm font-normal font-['PingFang SC'] leading-relaxed"
|
|
@@ -72,70 +149,44 @@ onLoad(async (query: { id: string }) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="px-4 py-6 bg-[#29170b] rounded-2xl my-8">
|
|
|
- <div class="flex items-center">
|
|
|
- <wd-img width="16" height="16"></wd-img>
|
|
|
- <div
|
|
|
- class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
|
|
|
- >
|
|
|
- 报名时间
|
|
|
- </div>
|
|
|
- <div class="w-4"></div>
|
|
|
- <div
|
|
|
- class="flex items-center text-white text-base font-normal font-['PingFang SC'] leading-[34px]"
|
|
|
- >
|
|
|
- {{ dayjs(data.applyStartTime).format('YYYY.MM.DD') }}
|
|
|
- <wd-icon name="play" size="22px"></wd-icon>
|
|
|
- {{ dayjs(data.applyEndTime).format('YYYY.MM.DD') }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex items-center">
|
|
|
- <wd-img width="16" height="16"></wd-img>
|
|
|
- <div
|
|
|
- class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
|
|
|
- >
|
|
|
- 游学时间
|
|
|
- </div>
|
|
|
- <div class="w-4"></div>
|
|
|
- <div
|
|
|
- class="flex items-center text-white text-base font-normal font-['PingFang SC'] leading-[34px]"
|
|
|
- >
|
|
|
- <!-- 2024.12.15 2025.01.15 -->
|
|
|
- {{ dayjs(data.activityStartTime).format('YYYY.MM.DD') }}
|
|
|
- <wd-icon name="play" size="22px"></wd-icon>
|
|
|
- {{ dayjs(data.activityEndTime).format('YYYY.MM.DD') }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex items-center">
|
|
|
- <wd-img width="16" height="16"></wd-img>
|
|
|
- <div
|
|
|
- class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
|
|
|
- >
|
|
|
- 游学名额
|
|
|
- </div>
|
|
|
- <div class="w-4"></div>
|
|
|
- <div class="text-white text-base font-normal font-['PingFang SC'] leading-[34px]">
|
|
|
- 40人/剩余10人
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex items-center">
|
|
|
- <wd-img width="16" height="16"></wd-img>
|
|
|
- <div
|
|
|
- class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
|
|
|
- >
|
|
|
- 等级限制
|
|
|
- </div>
|
|
|
- <div class="w-4"></div>
|
|
|
- <div class="text-white text-base font-normal font-['PingFang SC'] leading-[34px]">
|
|
|
- 黄金以上等级
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="px-4 py-6 bg-[#010102]/30 backdrop-blur-[20px] rounded-2xl my-8 flex flex-col gap-3"
|
|
|
+ >
|
|
|
+ <template v-for="(it, i) in infos" :key="i">
|
|
|
+ <div class="flex items-center gap-1.5">
|
|
|
+ <wd-img width="16" height="16" :src="it.icon"></wd-img>
|
|
|
+ <div
|
|
|
+ class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
|
|
|
+ >
|
|
|
+ {{ it.title }}
|
|
|
+ </div>
|
|
|
+ <div class="w-3"></div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="flex items-center text-white text-base font-normal font-['PingFang SC'] leading-[34px]"
|
|
|
+ >
|
|
|
+ <template v-if="it.content.length === 2">
|
|
|
+ <div class="w-22 text-center">{{ it.content[0] }}</div>
|
|
|
+ <wd-icon name="play" size="22px"></wd-icon>
|
|
|
+ <div class="w-22 text-center">{{ it.content[0] }}</div>
|
|
|
+ </template>
|
|
|
+ <template v-else>{{ it.content[0] }}</template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <wd-tabs class="bg-transparent!" custom-class="bg-transparent!">
|
|
|
- <wd-tab title="活动介绍"></wd-tab>
|
|
|
- <wd-tab title="行程安排"></wd-tab>
|
|
|
- </wd-tabs>
|
|
|
- <div class="mt-5">
|
|
|
+ <div v-if="isStudyTour" class="w-50%">
|
|
|
+ <wd-config-provider :themeVars="themeVars">
|
|
|
+ <wd-tabs class="bg-transparent!" custom-class="bg-transparent!">
|
|
|
+ <wd-tab title="活动介绍"></wd-tab>
|
|
|
+ <wd-tab title="行程安排"></wd-tab>
|
|
|
+ </wd-tabs>
|
|
|
+ </wd-config-provider>
|
|
|
+ </div>
|
|
|
+ <SectionHeading v-if="isActivity" size="lg" title="活动介绍"></SectionHeading>
|
|
|
+
|
|
|
+ <div class="mt-5 mx-3.5">
|
|
|
<div
|
|
|
class="text-justify text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-relaxed"
|
|
|
>
|