|
@@ -12,7 +12,7 @@ import Card from '@/components/card.vue'
|
|
|
import SectionHeading from '@/components/section-heading.vue'
|
|
|
import { getBadges, getCertificates } from '../../../../core/libs/requests'
|
|
|
import { Badge } from '../../../../core/libs/models'
|
|
|
-import { NetImages } from '@/core/libs/net-images'
|
|
|
+import { NetImages } from '../../../../core/libs/net-images'
|
|
|
|
|
|
const active = ref('badge')
|
|
|
const tabs = ref([
|
|
@@ -35,10 +35,14 @@ const { data: badges, run: setBadges } = useRequest(() => getBadges({}), {
|
|
|
const { data: certificates, run: setCertificates } = useRequest(() => getCertificates({}), {
|
|
|
initialData: [],
|
|
|
})
|
|
|
-const data = ref<Badge | undefined>()
|
|
|
-onLoad(async (query: { data: string }) => {
|
|
|
- data.value = JSON.parse(query.data) as Badge
|
|
|
- console.log(data.value)
|
|
|
+const data = ref<{ name: string }>()
|
|
|
+onLoad(async (query: { type: 'badge' | 'certificate'; data: string }) => {
|
|
|
+ console.log(JSON.parse(query.data))
|
|
|
+
|
|
|
+ if (query.type === 'badge') {
|
|
|
+ const badge = JSON.parse(query.data) as Badge
|
|
|
+ data.value = { name: badge.badgeName }
|
|
|
+ }
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
@@ -65,10 +69,11 @@ onLoad(async (query: { data: string }) => {
|
|
|
<wd-img width="42%" mode="widthFix" :src="data.badgeYesObtainedImage"></wd-img>
|
|
|
<div class="flex flex-col items-center gap-1">
|
|
|
<div class="text-white text-[26px] font-normal font-['PingFang_SC'] uppercase">
|
|
|
- 东方研习营
|
|
|
+ <!-- 东方研习营 -->
|
|
|
+ {{ data.name }}
|
|
|
</div>
|
|
|
<div class="text-center text-white text-sm font-normal font-['PingFang_SC'] uppercase">
|
|
|
- 参加东方艺术设计研学营
|
|
|
+ <!-- 参加东方艺术设计研学营 -->
|
|
|
</div>
|
|
|
<div class="mt-6 flex items-center gap-4">
|
|
|
<div class="w-4 h-0.25 bg-white"></div>
|