From 4685ea30264da0af5f37e239ad2e553902bba809 Mon Sep 17 00:00:00 2001 From: xs <3047979577@qq.com> Date: Mon, 23 Dec 2024 22:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E8=B7=AF=E6=97=A0=E5=BF=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 + src/api/appointment.ts | 11 +- src/api/article.ts | 2 +- src/api/search.ts | 6 +- src/components/ArticleComponents.vue | 5 +- src/components/DoctorComponents.vue | 5 +- src/components/HospitalComponents.vue | 6 +- src/stores/modules/user.ts | 10 +- src/util/request.ts | 1 - src/views/3_home/AIConsult.vue | 90 ++++----- src/views/3_home/_HomePage.vue | 116 ++---------- src/views/3_home/components/HomeHospital.vue | 19 +- src/views/3_home/components/HomeTitle.vue | 48 +++-- src/views/4_hospital/HospitalDetail.vue | 79 +++++--- src/views/4_hospital/HospitalRegistration.vue | 83 +++------ src/views/4_hospital/_HospitalPage.vue | 100 ++++------ .../appointment/AppointmentDetail.vue | 74 +++++--- .../appointment/AppointmentSource.vue | 105 +++-------- .../appointment/AppointmentSucceed.vue | 64 ++++--- .../4_hospital/components/HospitalDoctor.vue | 4 +- src/views/5_doctor/DoctorDetail.vue | 104 +++-------- src/views/5_doctor/_DoctorPage.vue | 112 +++-------- .../5_doctor/components/DoctorAppointment.vue | 5 +- src/views/6_article/ArticleDetail.vue | 75 +++++--- src/views/6_article/_ArticlePage.vue | 92 ++------- .../MyselfAppointment/Appointment.vue | 52 ++++-- .../MyselfAppointment/MyselfAppointment.vue | 147 ++++----------- .../components/MyAppointment.vue | 42 ++--- .../MyselfCollector/MyselfCollector.vue | 174 +++--------------- .../7_myself/MyselfConsult/ConsultDetail.vue | 3 +- .../7_myself/MyselfConsult/_MyselfConsult.vue | 132 +++++-------- src/views/7_myself/MyselfPage.vue | 11 +- 32 files changed, 634 insertions(+), 1144 deletions(-) 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 @@