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 @@