From 6bb40b32d919bbea17f14035573d79fa421a6617 Mon Sep 17 00:00:00 2001 From: Mu Yi Date: Thu, 20 Nov 2025 14:58:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/HighSchoolDetailHeader.vue | 2 +- .../information/components/SchoolIntroduce.vue | 14 ++++++++------ src/pages-sub/information/middleDetail.vue | 8 ++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pages-sub/information/components/HighSchoolDetailHeader.vue b/src/pages-sub/information/components/HighSchoolDetailHeader.vue index 96ada1d..dc4c747 100644 --- a/src/pages-sub/information/components/HighSchoolDetailHeader.vue +++ b/src/pages-sub/information/components/HighSchoolDetailHeader.vue @@ -43,7 +43,7 @@ const starSchool = () => { {{ schoolDetail.schoolName }} - + {{ feature }} diff --git a/src/pages-sub/information/components/SchoolIntroduce.vue b/src/pages-sub/information/components/SchoolIntroduce.vue index b4ba790..12d1e68 100644 --- a/src/pages-sub/information/components/SchoolIntroduce.vue +++ b/src/pages-sub/information/components/SchoolIntroduce.vue @@ -19,8 +19,9 @@ const props = defineProps({ const contacts = computed(() => [ { title: '招办电话', msg: props.schoolDetail.admissionOfficePhone, type: 'phone', typeLabel: '拨打', eventClick: () => { - visible.value = true; - renderType.value = 'phone' + // visible.value = true; + // renderType.value = 'phone' + makePhoneCall(props.schoolDetail.admissionOfficePhone) } }, { @@ -33,10 +34,11 @@ const contacts = computed(() => [ { title: '就读地址', msg: props.schoolDetail.address, type: 'navigation', typeLabel: '导航', eventClick: () => { uni.openLocation({ - longitude: 121.50342663420965, - latitude: 31.294363285983216, + longitude: Number.parseFloat(props.schoolDetail.lng), + latitude: Number.parseFloat(props.schoolDetail.lat), address: props.schoolDetail.address, - name: props.schoolDetail.address + name: props.schoolDetail.address, + scale: 5 }) } }, @@ -57,7 +59,7 @@ const onOverlayClick = () => { const renderType = ref("phone") const makePhoneCall = (val: string) => { - uni.makePhoneCall({ phoneNumber: '4000616985' }) + uni.makePhoneCall({ phoneNumber: val }) } diff --git a/src/pages-sub/information/middleDetail.vue b/src/pages-sub/information/middleDetail.vue index a72be19..759a823 100644 --- a/src/pages-sub/information/middleDetail.vue +++ b/src/pages-sub/information/middleDetail.vue @@ -5,7 +5,7 @@ import { DomHandler, Parser } from 'htmlparser2' type RichTextNode = | { type: 'text'; text: string } | { type: 'element'; name: string; attrs: Record; children: RichTextNode[] } -const newsDetail = ref({ title: '', publishTime: "", remark: "" }) +const newsDetail = ref({ title: '', publishTime: "", remark: "",content:"" }) const nodes = ref([]) @@ -53,8 +53,8 @@ onLoad(options => { getNewsDetail({ query: { id: options.id } }).then(resp => { if (resp.code == 200) { newsDetail.value = resp.result - const _nodes = parseHTMLToObject(resp.result.remark) - nodes.value = traverseNodes(_nodes) + // const _nodes = parseHTMLToObject(resp.result.remark) + // nodes.value = traverseNodes(_nodes) } }) } else { @@ -74,7 +74,7 @@ const navigateToCustom = () => { - +