feat: 增加电话
parent
95bd27ce4b
commit
3e2b3a9fdf
|
|
@ -16,12 +16,18 @@ const props = defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
const contacts = computed(() => [
|
||||
const officePhoneList = computed(() => {
|
||||
return JSON.parse(props.schoolDetail.admissionOfficePhone || '[]')
|
||||
})
|
||||
|
||||
const contacts = computed(() => {
|
||||
|
||||
const phone = officePhoneList.value.length > 0 ? officePhoneList.value[0]["phone"] : '暂无电话'
|
||||
return [
|
||||
{
|
||||
title: '招办电话', msg: props.schoolDetail.admissionOfficePhone, type: 'phone', typeLabel: '拨打', eventClick: () => {
|
||||
// visible.value = true;
|
||||
// renderType.value = 'phone'
|
||||
makePhoneCall(props.schoolDetail.admissionOfficePhone)
|
||||
title: '招办电话', msg: phone, type: 'phone', typeLabel: '拨打', eventClick: () => {
|
||||
visible.value = true;
|
||||
renderType.value = 'phone';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -48,7 +54,8 @@ const contacts = computed(() => [
|
|||
renderType.value = 'gzh';
|
||||
}
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
|
|
@ -86,8 +93,8 @@ const makePhoneCall = (val: string) => {
|
|||
<view class="bg-white pb-safe rounded-[24rpx_24rpx_0_0]" v-if="renderType === 'phone'">
|
||||
<view
|
||||
class="text-[#1580FF] py-[32rpx] text-center not-last:border-b-1 not-last:border-b-[#eaeaea] not-last:border-b-solid"
|
||||
v-for="value in 3" :key="value" @click="makePhoneCall">
|
||||
4000616985
|
||||
v-for="value in officePhoneList" :key="value" @click="makePhoneCall(value.phone)">
|
||||
{{ value.name }}:{{ value.phone }}
|
||||
</view>
|
||||
<view class="bg-[#F2F2F2] h-[16rpx]"></view>
|
||||
<view class="text-[34rpx] text-[#000] text-center pt-[32rpx]" @click="onOverlayClick">取消</view>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ onShow(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-hidden">
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-y-auto">
|
||||
<view v-for="(val, index) in list" :key="index" class="flex first:mt-[30rpx] not-last:mb-[20rpx]" v-if="list.length > 0" @click="useRouterDetail(val)">
|
||||
<view
|
||||
class="text-[30rpx] grid gap-[8rpx] bg-white px-[30rpx] py-[20rpx] rounded-[16rpx] w-full flex items-center justify-between">
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ onLoad(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-hidden">
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-y-auto">
|
||||
<view v-for="(val, index) in schools" :key="index" class="flex items-center not-last:mb-[20rpx] px-[30rpx] py-[20rpx] bg-white first:mt-[30rpx]"
|
||||
v-if="schools.length > 0" @click.stop="navigateToDetail(val.id)">
|
||||
<view class="text-[30rpx] grid gap-[8rpx] rounded-[16rpx] flex-1">
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ onShow(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-hidden">
|
||||
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-y-auto">
|
||||
<view v-for="(val, index) in wishlist" :key="index" class="flex first:mt-[30rpx] not-last:mb-[20rpx]" v-if="wishlist.length > 0" @click="navigateToDetail(val)">
|
||||
<view
|
||||
class="text-[30rpx] grid gap-[8rpx] bg-white px-[30rpx] py-[20rpx] rounded-[16rpx] w-full">
|
||||
|
|
|
|||
Loading…
Reference in New Issue