feat: 增加招生数据

share-code
xjs 2026-06-11 13:46:23 +08:00
parent 6a793de862
commit a9227419b2
2 changed files with 95 additions and 36 deletions

View File

@ -11,7 +11,15 @@ const props = defineProps({
schoolNature: "", schoolNature: "",
overview: "", overview: "",
admissionOfficePhone: "", admissionOfficePhone: "",
officialWebsite: "" officialWebsite: "",
childdto:{
planDataOutput:{
admissionCount:0,
planCount:0,
scoreLine:0,
year:""
}
}
}) })
} }
}) })
@ -21,40 +29,40 @@ const officePhoneList = computed(() => {
}) })
const contacts = computed(() => { const contacts = computed(() => {
const phone = officePhoneList.value.length > 0 ? officePhoneList.value[0]["phone"] : '暂无电话' const phone = officePhoneList.value.length > 0 ? officePhoneList.value[0]["phone"] : '暂无电话'
return [ return [
{ {
title: '招办电话', msg: phone, type: 'phone', typeLabel: '拨打', eventClick: () => { title: '招办电话', msg: phone, type: 'phone', typeLabel: '拨打', eventClick: () => {
visible.value = true; visible.value = true;
renderType.value = 'phone'; renderType.value = 'phone';
}
},
{
title: '学校官网', msg: props.schoolDetail.officialWebsite, type: 'view', typeLabel: '复制', eventClick: () => {
uni.setClipboardData({
data: props.schoolDetail.officialWebsite
})
}
},
{
title: '就读地址', msg: props.schoolDetail.address, type: 'navigation', typeLabel: '导航', eventClick: () => {
uni.openLocation({
longitude: Number.parseFloat(props.schoolDetail.lng),
latitude: Number.parseFloat(props.schoolDetail.lat),
address: props.schoolDetail.address,
name: props.schoolDetail.address,
scale: 5
})
}
},
{
title: '公众号', msg: props.schoolDetail.schoolName, type: 'gzh', typeLabel: '查看', eventClick: () => {
visible.value = true;
renderType.value = 'gzh';
}
} }
}, ]
{
title: '学校官网', msg: props.schoolDetail.officialWebsite, type: 'view', typeLabel: '复制', eventClick: () => {
uni.setClipboardData({
data: props.schoolDetail.officialWebsite
})
}
},
{
title: '就读地址', msg: props.schoolDetail.address, type: 'navigation', typeLabel: '导航', eventClick: () => {
uni.openLocation({
longitude: Number.parseFloat(props.schoolDetail.lng),
latitude: Number.parseFloat(props.schoolDetail.lat),
address: props.schoolDetail.address,
name: props.schoolDetail.address,
scale: 5
})
}
},
{
title: '公众号', msg: props.schoolDetail.schoolName, type: 'gzh', typeLabel: '查看', eventClick: () => {
visible.value = true;
renderType.value = 'gzh';
}
}
]
}) })
const visible = ref(false) const visible = ref(false)
@ -72,10 +80,42 @@ const makePhoneCall = (val: string) => {
<template> <template>
<view class="bg-[#f8f8f8]"> <view class="bg-[#f8f8f8]">
<view class="px-[32rpx] py-[20rpx] bg-white mb-[20rpx]" v-if="schoolDetail.childdto.planDataOutput.scoreLine">
<view class="text-[30rpx] font-500">{{ schoolDetail.childdto.planDataOutput.year }}年录取情况</view>
<view class="flex items-center justify-between mt-[20rpx] px-[52rpx]">
<view class="flex flex-col items-center">
<view class="text-[#1E40AF] flex items-baseline">
<view class="font-[DinBold] text-[40rpx] font-700">{{ schoolDetail.childdto.planDataOutput.planCount }}</view>
<view class="font-[24rpx]"></view>
</view>
<view class="text-[#666] text-[24rpx]">招生计划数</view>
</view>
<view class="flex flex-col items-center">
<view class="text-[#1E40AF] flex items-baseline">
<view class="font-[DinBold] text-[40rpx] font-700">{{ schoolDetail.childdto.planDataOutput.scoreLine }}</view>
<view class="font-[24rpx]"></view>
</view>
<view class="text-[#666] text-[24rpx]">录取分数线</view>
</view>
<view class="flex flex-col items-center">
<view class="text-[#1E40AF] flex items-baseline">
<view class="font-[DinBold] text-[40rpx] font-700">{{ schoolDetail.childdto.planDataOutput.admissionCount }}</view>
<view class="font-[24rpx]"></view>
</view>
<view class="text-[#666] text-[24rpx]">剩余计划数</view>
</view>
</view>
</view>
<view class="bg-white flex flex-col px-[30rpx] py-[20rpx]"> <view class="bg-white flex flex-col px-[30rpx] py-[20rpx]">
<view class="text-[#000] font-500 text-[30rpx] mb-[10rpx]">学校概况</view> <view class="text-[#000] font-500 text-[30rpx] mb-[10rpx]">学校概况</view>
<ReadMore :paragraph="schoolDetail.overview" /> <ReadMore :paragraph="schoolDetail.overview" />
</view> </view>
<view class="px-[30rpx] pt-[20rpx] bg-white mt-[20rpx]"> <view class="px-[30rpx] pt-[20rpx] bg-white mt-[20rpx]">
<view class="text-[30rpx] text-black font-500">联系方式</view> <view class="text-[30rpx] text-black font-500">联系方式</view>
<view <view

View File

@ -126,6 +126,19 @@ onLoad(() => {
}) })
}) })
function goToLiveHomePageZZ(){
uni.openChannelsUserProfile({
finderUserName:'sphju9MCfZetYHP',
success: () => {
console.log('跳转视频号主页成功')
},
fail: (err) => {
console.error('跳转视频号主页失败:', err)
},
})
}
onShow(() => { onShow(() => {
getTopNew({ query: { Top: 3 } }).then((resp) => { getTopNew({ query: { Top: 3 } }).then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
@ -336,10 +349,16 @@ onShow(() => {
</view> </view>
</view> </view>
</view> </view>
<view class="w-full flex flex-col items-center justify-center" @click="goToLiveHomePage()" v-if="channelVideoList.length === 0"> <view class="w-full grid grid-cols-2 items-center justify-center gap-[24rpx]" v-if="channelVideoList.length === 0">
<view class="w-full h-[236rpx]"> <view class="w-full h-[400rpx]" @click="goToLiveHomePage()">
<image <image
src="https://lw-zk.oss-cn-hangzhou.aliyuncs.com/img/home/home_zhibo.png" src="https://lw-zk.oss-cn-hangzhou.aliyuncs.com/img/home/zhibo_banner1.png"
mode="scaleToFill"
/>
</view>
<view class="w-full h-[400rpx]" @click="goToLiveHomePageZZ()">
<image
src="https://lw-zk.oss-cn-hangzhou.aliyuncs.com/img/home/zhibo_banner2.png"
mode="scaleToFill" mode="scaleToFill"
/> />
</view> </view>