diff --git a/components.d.ts b/components.d.ts
index 780c852..9d7582b 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -30,6 +30,7 @@ declare module 'vue' {
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
+ VanLoading: typeof import('vant/es')['Loading']
VanOverlay: typeof import('vant/es')['Overlay']
VanPopup: typeof import('vant/es')['Popup']
VanSearch: typeof import('vant/es')['Search']
diff --git a/src/api/appointment.ts b/src/api/appointment.ts
index 46f4544..a237479 100644
--- a/src/api/appointment.ts
+++ b/src/api/appointment.ts
@@ -26,12 +26,19 @@ export const getAppointmentDetail = ({ id, date }: AppointmentDetailType) =>
}
})
-export const getAppointmentOrder = ({ id, date }: AppointmentDetailType) =>
+export const getAppointmentOrder = ({ id, date, name }: any) =>
instance({
url: '/appointment/getAppointmentOrderByIdAndTime',
method: 'post',
params: {
id,
- date
+ date,
+ name
}
})
+
+export const getAppointmentHistory = (data: any) => instance({
+ url: '/appointment/setAppointmentOrder',
+ method: 'post',
+ data: {data}
+})
diff --git a/src/api/article.ts b/src/api/article.ts
index 3a0a1a0..3f2c6d4 100644
--- a/src/api/article.ts
+++ b/src/api/article.ts
@@ -1,6 +1,6 @@
import instance from '@/util/request'
-export const getArticle = () => instance.post('/article/getArticleByContent')
+export const getArticle = () => instance.post('/article/getArticleByTitle')
export const getArticleByType = (navNum: number) => instance.post('/article/getArticleByType?type=' + navNum)
diff --git a/src/api/search.ts b/src/api/search.ts
index c8ecb07..251572e 100644
--- a/src/api/search.ts
+++ b/src/api/search.ts
@@ -1,10 +1,10 @@
import instance from '@/util/request'
export const searchDoctorByName = (name: any) =>
- instance.post('/doctor/getDoctorByName', { params: { name } })
+ instance.post('/doctor/getDoctorByName?name=' + name )
export const searchHospitalByName = (hospitalName: string) =>
instance.post('/hospital/getHospitalByName?name=' + hospitalName)
-export const searchArticleByName = (articleByName: string) =>
- instance.post('/hospital/getArticleByName?name=' + articleByName)
\ No newline at end of file
+export const searchArticleByName = (title: string) =>
+ instance.post('/article/getArticleByTitle?title=' + title)
\ No newline at end of file
diff --git a/src/components/ArticleComponents.vue b/src/components/ArticleComponents.vue
index 28ea293..61133cc 100644
--- a/src/components/ArticleComponents.vue
+++ b/src/components/ArticleComponents.vue
@@ -1,9 +1,8 @@
@@ -49,7 +48,7 @@ const loading = show
{{ prop.info.publishTime }}
-
+
diff --git a/src/components/DoctorComponents.vue b/src/components/DoctorComponents.vue
index 106c365..c2c2dfd 100644
--- a/src/components/DoctorComponents.vue
+++ b/src/components/DoctorComponents.vue
@@ -1,9 +1,8 @@
@@ -36,7 +35,7 @@ const loading = show
-
+
{{ prop.info.doctorName}}
diff --git a/src/components/HospitalComponents.vue b/src/components/HospitalComponents.vue
index 5968b94..5d0c0ee 100644
--- a/src/components/HospitalComponents.vue
+++ b/src/components/HospitalComponents.vue
@@ -1,9 +1,8 @@
@@ -36,7 +35,7 @@ const loading = show
-
+
{{
prop.info.hospitalName
@@ -46,7 +45,6 @@ const loading = show
{{ prop.info.address }}
- 2km
- {{ prop.info.labelList[0] }}
diff --git a/src/stores/modules/user.ts b/src/stores/modules/user.ts
index d56ae85..f8134e4 100644
--- a/src/stores/modules/user.ts
+++ b/src/stores/modules/user.ts
@@ -12,8 +12,8 @@ export const useUserStore = defineStore('user', () => {
}
const userInfo = ref({
- user: '',
- avatar: ''
+ nickname: '',
+ avatarUrl: ''
})
const getUserInfo = async () => {
const res = await getUserInfoApi()
@@ -24,4 +24,8 @@ export const useUserStore = defineStore('user', () => {
}
return { token, setToken, userInfo, getUserInfo, setUserInfo }
-})
+},
+{
+ persist: true
+}
+)
diff --git a/src/util/request.ts b/src/util/request.ts
index ed5ee59..9772133 100644
--- a/src/util/request.ts
+++ b/src/util/request.ts
@@ -5,7 +5,6 @@ import { useUserStore } from '@/stores'
const baseURL = '/app'
const instance = axios.create({
baseURL,
- timeout: 5000,
headers: {
token: ''
}
diff --git a/src/views/3_home/AIConsult.vue b/src/views/3_home/AIConsult.vue
index 17be31e..4e5486a 100644
--- a/src/views/3_home/AIConsult.vue
+++ b/src/views/3_home/AIConsult.vue
@@ -1,5 +1,5 @@
diff --git a/src/views/3_home/components/HomeHospital.vue b/src/views/3_home/components/HomeHospital.vue
index 1ae6973..c9602e8 100644
--- a/src/views/3_home/components/HomeHospital.vue
+++ b/src/views/3_home/components/HomeHospital.vue
@@ -1,5 +1,4 @@
@@ -7,14 +6,16 @@ const prop = defineProps(['list'])
-
{{ prop.list.labelList[0] }}
-
{{ prop.list.level }}
+
{{ prop.list.labelList[0] }}
+
{{
+ prop.list.level
+ }}
-
-
-
{{ prop.list.appointmentNumber }}
-
次预约
+
+
+ {{ prop.list.appointmentNumber }}
+ 次预约
@@ -37,7 +38,7 @@ const prop = defineProps(['list'])
height: 100%;
border-radius: 8px 8px 0 0;
}
- span{
+ span {
position: absolute;
bottom: 5px;
font-size: 12px;
@@ -45,7 +46,7 @@ const prop = defineProps(['list'])
padding: 2px 5px;
font-weight: 100;
opacity: 0.9;
- background-color: #4AA5FF;
+ background-color: #4aa5ff;
border-radius: 4px;
}
}
diff --git a/src/views/3_home/components/HomeTitle.vue b/src/views/3_home/components/HomeTitle.vue
index 0f1aed3..692623c 100644
--- a/src/views/3_home/components/HomeTitle.vue
+++ b/src/views/3_home/components/HomeTitle.vue
@@ -1,29 +1,31 @@
@@ -39,11 +41,19 @@ if (props.doctorVoList) {
swipe-threshold="0"
>
- -
+
-
diff --git a/src/views/4_hospital/HospitalDetail.vue b/src/views/4_hospital/HospitalDetail.vue
index d98fa63..c4f6c5c 100644
--- a/src/views/4_hospital/HospitalDetail.vue
+++ b/src/views/4_hospital/HospitalDetail.vue
@@ -5,41 +5,40 @@ import HospitalDoctor from './components/HospitalDoctor.vue'
import { getHospitalDetail } from '@/api/hospital'
const hospitalDetail = ref({
- id: 1,
- hospitalName: '中南大学湘雅医院',
- districtId: 430105,
- districtName: '开福区',
- cityId: 4301,
- cityName: '长沙市',
- provinceId: 43,
- provinceName: '湖南省',
- address: '湖南省长沙市开福区湘雅路87号',
- introduction:
- '中南大学湘雅医院(Xiangya Hospital Central South University)创建于1906年,坐落在人文荟萃的楚汉名城长沙,是中国最早的西医医院之一,是国家卫生健康委员会直管的三级甲等综合医院、教育部直属高校中南大学的附属医院。\n建院伊始,即将欧美医学最高标准融入办医理念,从长沙西牌楼一幢旧房起步,筚路蓝缕、精勤进取,书写了我国西医发展史的重要篇章。\n新中国成立后,在中国共产党的领导下,经过几代湘雅人的不懈努力,各项事业取得长足发展,现已发展成为我国重要的临床诊疗、医学教育与科技创新中心。\n现有编制床位3500张,总建筑面积51万平方米。开设临床医疗医技科室和亚专科111个,病区76个,护理单元101个。拥有国家重点学科7个,国家临床重点专科25个。神经内科、神经外科、皮肤科、骨科、呼吸内科、老年病学等专科的诊疗水平和科技影响力位居全国前列,是国家老年疾病临床医学研究中心。具备医学本科生、研究生、进修生、住院医师规范化培训等完整的学位教育和继续教育教学体系。2020年6月,入选湖南省开展新冠病毒核酸检测的医疗卫生机构名单。2021年8月,中南大学湘雅医院骨科被评选为第20届全国青年文明号。',
- appointmentNumber: 18888,
- phone: '0746-4356788',
- level: '三甲',
+ id: 0,
+ hospitalName: '',
+ districtId: 0,
+ districtName: '',
+ cityId: 0,
+ cityName: '',
+ provinceId: 0,
+ provinceName: '',
+ address: '',
+ introduction: '',
+ appointmentNumber: 0,
+ phone: '',
+ level: '',
url: '',
isCollection: true,
doctorInfoList: [
{
id: 1,
url: '',
- doctorName: '王强'
- },
- {
- id: 2,
- url: '',
- doctorName: '刘帅'
+ doctorName: ''
}
],
- departmentList: ['内分泌科', '呼吸内科']
+ departmentList: ['']
})
+const show = ref(false)
const route = useRoute()
+const department = ref([])
const getHospitalDetailList = async () => {
const res = await getHospitalDetail(+route.params.id)
hospitalDetail.value = res.data.data
+ // 最多显示10个科室
+ department.value = res.data.data.departmentList.slice(0, 10)
+ show.value = true
}
onMounted(() => {
getHospitalDetailList()
@@ -58,12 +57,22 @@ const goToAppointmentSource = (department: string) => {
-