This commit is contained in:
xs 2024-12-24 15:09:44 +08:00
parent 4685ea3026
commit 45f33aaac0
20 changed files with 97 additions and 69 deletions

View File

@ -40,5 +40,5 @@ export const getAppointmentOrder = ({ id, date, name }: any) =>
export const getAppointmentHistory = (data: any) => instance({
url: '/appointment/setAppointmentOrder',
method: 'post',
data: {data}
data: data
})

View File

@ -8,6 +8,9 @@ export const getAllDiagnosis = () =>
export const getMyConsultation = () =>
instance.get('/center/logs/consult')
export const getMyConsultationDetail = (number: number) =>
instance.post(`/center/logs/getConsult?number=${number}`)
// 我的收藏
export const getHospitalCollector = () =>
instance.get('/center/collection/hospital')

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

View File

@ -34,22 +34,22 @@ const loading = show
</template>
</van-skeleton>
<div style="display: flex; height: 100%; width: 100%" v-else>
<div style="display: flex; height: 100%; width: 100%; position: relative;" v-else>
<img :src="prop.info.url || '/doctor.png'" alt="" />
<div class="info">
<div>
<span style="font-size: 15px; margin-right: 8px">{{ prop.info.doctorName}}</span>
<span style="margin-right: 8px; font-size: 15px;">{{ prop.info.doctorName}}</span>
<span>{{ prop.info.level }}</span>
</div>
<div style="color: #555">
<span style="margin-right: 8px">{{ prop.info.hospitalName }}</span>
<div style="color: #555; display: flex;" >
<span class="c1" >{{ prop.info.hospitalName }}</span>
<span>{{ prop.info.name }}</span>
</div>
<div class="use">
{{ prop.info.briefly }}
</div>
</div>
<el-button type="primary" size="small">预约 </el-button>
<el-button type="primary" size="small" class="btn">预约 </el-button>
</div>
</div>
</template>
@ -77,7 +77,7 @@ const loading = show
display: flex;
flex-direction: column;
justify-content: space-between;
width: 10%;
width: 70%;
height: 100%;
font-size: 12px;
font-weight: 600;
@ -88,6 +88,17 @@ const loading = show
overflow: hidden;
text-overflow: ellipsis;
}
.c1 {
margin-right: 8px;
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
}
.btn {
position: absolute;
right: 0;
}
}

View File

@ -25,7 +25,7 @@ export const useUserStore = defineStore('user', () => {
return { token, setToken, userInfo, getUserInfo, setUserInfo }
},
{
persist: true
}
// {
// persist: true
// }
)

View File

@ -6,8 +6,8 @@ import { getCodeApi, loginApi } from '@/api/login'
import type { LoginParamsType } from '@/types'
const form = ref<LoginParamsType>({
phone: '13178594493',
code: '1234'
phone: '',
code: ''
})
const rules = ref({

View File

@ -78,10 +78,16 @@ onMounted(async () => {
<!-- 轮播图 -->
<van-swipe :autoplay="3000" :show-indicators="false">
<van-swipe-item>
<img src="/hospital.png" alt="" />
<img src="@/assets/banner/hospital.png" alt="" />
</van-swipe-item>
<van-swipe-item>
<img src="/hospital.png" alt="" />
<img src="@/assets/banner/hospital2.png" alt="" />
</van-swipe-item>
<van-swipe-item>
<img src="@/assets/banner/hospital3.png" alt="" />
</van-swipe-item>
<van-swipe-item>
<img src="@/assets/banner/hospital4.png" alt="" />
</van-swipe-item>
</van-swipe>
<!-- 预约 -->

View File

@ -21,9 +21,9 @@ watchEffect(() => {
const consultList = Object.values(groupedData).map((group: any) => {
return group.sort((a: any, b: any) => a.id - b.id)
})
for (let i = 0; i < consultList.length; i++) {
list.value.push(consultList[i][0].expertise)
}
list.value = consultList.map((group: any) => group[0].expertise)
list.value.unshift('严选专家')
}
})
</script>

View File

@ -111,7 +111,7 @@ const goToAppointmentSource = (department: string) => {
</AppointmentTitle>
<!-- 预约指南 -->
<AppointmentTitle>
<template #title>预约指南</template>
<template #title>推荐专家</template>
<template #content>
<div class="doc">
<li

View File

@ -96,14 +96,12 @@ const goAppointSucceed = async () => {
<em style="color: #888">
{{ appointmentInfo.hospitalName }}
</em>
<van-icon name="arrow" size="16px" color="#888" />
</span>
<span>
预约医生 -
<em style="color: #888">
{{ appointmentInfo.doctorName }}
</em>
<van-icon name="arrow" size="16px" color="#888" />
</span>
<div class="address">
<van-icon name="location-o" size="20px" color="#888"></van-icon>

View File

@ -1,15 +1,16 @@
<script setup lang="ts">
const props = defineProps(['info'])
</script>
<template>
<div class="hospital">
<div class="img">
<img :src="props.info || '/hospital.png'" alt="" />
<img :src="props.info.url || '/hospital.png'" alt="" />
</div>
<div class="name">
{{ info.doctorName }}
{{ props.info.doctorName }}
</div>
</div>
</template>

View File

@ -38,24 +38,28 @@ content.value = articleDetail.value.content
const articleDetailList = async () => {
const res = await getArticleDetail(+route.params.id)
articleDetail.value = res.data.data
if ((collectNum.value = articleDetail.value.isCollection)) {
collect.value!.style.color = 'orange'
thumbs.value!.style.color = 'rgb(240, 119, 117)'
}
content.value = articleDetail.value.content
.replace(/\n/g, '<br>')
.replace(/\t/g, '&emsp;&emsp;')
console.log(articleDetail.value.doctorInfo.doctorName)
show.value = true
}
const route = useRoute()
onMounted(() => {
articleDetailList()
})
const thumbsNum = ref(false)
const thumbs = useTemplateRef('thumbs')
const collectNum = ref(false)
const collect = useTemplateRef('collect')
const route = useRoute()
onMounted(async () => {
await articleDetailList()
if ((collectNum.value = articleDetail.value.isCollection)) {
collect.value!.style.color = 'orange'
}
})
const thumbsFn = () => {
thumbsNum.value = !thumbsNum.value
if (thumbsNum.value) {
@ -65,8 +69,6 @@ const thumbsFn = () => {
}
}
const collectNum = ref(false)
const collect = useTemplateRef('collect')
const collectFn = () => {
collectNum.value = !collectNum.value
if (collectNum.value) {
@ -78,16 +80,12 @@ const collectFn = () => {
</script>
<template>
<van-loading
v-if="!show"
style="
<van-loading v-if="!show" style="
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
"
size="60"
/>
" size="60" />
<div class="main" v-else>
<Header>文章详情</Header>
<div class="articleDoctor">
@ -103,24 +101,17 @@ const collectFn = () => {
{{ articleDetail.doctorInfo.source }}
</span>
</div>
<el-button
type="primary"
size="small"
class="btn"
@click="$router.push('/doctorDetail/' + doctorInfo.id)"
>预约
<el-button type="primary" size="small" class="btn" @click="$router.push('/doctorDetail/' + doctorInfo.id)">预约
</el-button>
</div>
<div class="articleContent">
<div style="margin: 24px 0">
<div
style="
<div style="
width: 100%;
font-size: 20px;
text-align: justify;
font-weight: 600;
"
>
">
{{ articleDetail.titleBig }}
<span class="tag">原创</span>
</div>
@ -190,12 +181,14 @@ const collectFn = () => {
.articleContent {
width: 90vw;
margin-bottom: 24px;
.articleTitle {
color: #888;
padding: 0 16px;
font-size: 14px;
text-align: justify;
}
.tag {
padding: 2px 8px;
margin-left: 8px;
@ -206,6 +199,7 @@ const collectFn = () => {
color: #0379ff;
background-color: #d9e9ff;
}
img {
width: 100%;
height: 100%;

View File

@ -100,7 +100,7 @@ onBeforeRouteLeave((to, from, next) => {
/>
<li v-else v-for="(item, index) in appointmentList" :key="index">
<MyAppointment
v-if="item.state === 2"
v-if="item.state === 1"
:info="item"
@click="toAppointmentOrder(item)"
/>
@ -117,7 +117,7 @@ onBeforeRouteLeave((to, from, next) => {
/>
<li v-else v-for="(item, index) in appointmentList" :key="index">
<MyAppointment
v-if="item.state === 1"
v-if="item.state === 2"
:info="item"
@click="toAppointmentOrder(item)"
/>

View File

@ -6,15 +6,15 @@ const prop = defineProps(['info'])
<div class="main1">
<div class="info">
<img :src="prop.info.url" alt="logo" />
<div class="content">
<div class="content" style="font-size: 14px;">
<div>
<span style="font-size: 20px">{{ prop.info.doctorName }}</span>
<span style="font-size: 16px;">{{ prop.info.doctorName }}</span>
<span style="margin-left: 6px">{{ prop.info.level }}</span>
<span class="status">{{
prop.info.state == 2 ? '待就诊' : '已就诊'
prop.info.state == 1 ? '待就诊' : '已就诊'
}}</span>
</div>
<div style="display: flex; color: #777; font-size: 14px">
<div style="display: flex; color: #777">
<span class="c1">{{ prop.info.hospitalName }}</span>
<span>{{ prop.info.department }}</span>
</div>
@ -71,7 +71,7 @@ const prop = defineProps(['info'])
}
.c1 {
margin-right: 8px;
max-width: 150px;
max-width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

View File

@ -1,11 +1,19 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useAiDetailStore } from '@/stores'
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
// import { useAiDetailStore } from '@/stores'
import { getMyConsultationDetail } from '@/api/myself'
const aiDetailStore = useAiDetailStore()
// const aiDetailStore = useAiDetailStore()
const consultDetailList = ref([]) as any
consultDetailList.value = aiDetailStore.detail
// consultDetailList.value = aiDetailStore.detail
const route = useRoute()
onMounted(async() => {
const res = await getMyConsultationDetail(+route.params.id)
consultDetailList.value = res.data.data
})
</script>
<template>

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useAiDetailStore } from '@/stores'
// import { useAiDetailStore } from '@/stores'
import { getMyConsultation } from '@/api/myself'
const data = ref([])
@ -28,6 +28,9 @@ const getMyConsultList = async () => {
})
show.value = true
}
onMounted(() => {
getMyConsultList()
@ -35,10 +38,10 @@ onMounted(() => {
//
const router = useRouter()
const aiDetail = useAiDetailStore()
// const aiDetail = useAiDetailStore()
const toConsultDetail = (id: number) => {
router.push('/ConsultDetail/' + (id + 1))
aiDetail.setDetail(consultList.value[id])
router.push('/ConsultDetail/' + id)
// aiDetail.setDetail(consultList.value[id])
}
</script>
@ -68,11 +71,11 @@ const toConsultDetail = (id: number) => {
<div
v-for="(item, index) in consultList"
:key="item.id"
@click="toConsultDetail(index)"
@click="toConsultDetail(item[0].number)"
>
<span class="problem">问题{{ index + 1 }}</span>
<span>{{ item[0].problem }}</span>
<span class="time">{{ item.time || '2023-01-01' }}</span>
<span class="time">点击查看详情</span>
</div>
</van-list>
</div>
@ -124,7 +127,6 @@ const toConsultDetail = (id: number) => {
line-height: 1;
font-size: 12px;
font-weight: 400;
font-family: '楷体';
}
}
}

View File

@ -52,9 +52,8 @@ const toEdit = () => {
<img
:src="userInfo.avatarUrl || avatar"
alt=""
style="width: 42px; margin-right: 8px"
/>
<span style="flex: 1; font-weight: 600">
<span style="flex: 1; font-weight: 600; font-size: 18px;">
{{ userInfo.nickname || '用户名' }}
</span>
<el-icon @click="toEdit" size="22" color="#bbb"><Edit /></el-icon>
@ -131,6 +130,12 @@ const toEdit = () => {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transform: translateY(-50px);
background-color: #fff;
img {
border-radius: 50%;
height: 70px;
width: 70px;
margin-right: 8px
}
}
.content {
width: 90vw;