From 9cc39b20540eeed3291e44f696e870cdba1650df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E5=BB=BA=E6=9C=88?= <3079579668@qq.com> Date: Sat, 28 Oct 2023 18:48:12 +0800 Subject: [PATCH] 2 --- src/api/index.js | 86 +++++- src/router/index.js | 29 +- .../consultationServer/chat/chat.vue | 148 +++++++++- .../doctorList/doctorList.vue | 16 +- .../historyChat/historyChat.vue | 131 +++++++++ src/views/home/information/information.vue | 91 +++++- src/views/my/attention/attention.vue | 149 +++++++++- src/views/my/collection/collection.vue | 275 ++++++++++++++++-- .../my/forgetPassword1/forgetPassword1.vue | 4 +- src/views/my/my.vue | 2 + .../my/proFile/editProFile/editProFile.vue | 1 + src/views/my/proFile/index/index.vue | 7 +- .../set/changePassword/changePassword.vue | 89 +++++- src/views/set/index/index.vue | 36 ++- .../set/personInfomation/personInfomation.vue | 166 +++++++++-- src/views/set/setNickname/setNickname.vue | 61 +++- src/views/set/ss/ss.vue | 15 + .../viewAuthenticationInformation.vue | 128 +++++++- src/views/vedio/vedio.vue | 157 +++++++++- 19 files changed, 1453 insertions(+), 138 deletions(-) create mode 100644 src/views/consultation/consultationServer/historyChat/historyChat.vue create mode 100644 src/views/set/ss/ss.vue diff --git a/src/api/index.js b/src/api/index.js index cd0cff0..833c2e7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -27,6 +27,14 @@ export const fetchNav = async () => { export const fetchCon = async (params) => { return await http.get('/api/health/share/information/v1/findInformationList', params) } +// 咨询收藏 +export const fetchZxLike = async (params) => { + return await http.post('/api/health/user/verify/v1/addInfoCollection', params) +} +// 取消咨询收藏 +export const fetchZxNoLike = async (params) => { + return await http.delete('/api/health/user/verify/v1/cancelInfoCollection', params) +} // 首页跳转常见药品标题--根据药品类目查询查询常见药品 export const fetchYao = async (params) => { return await http.get('/api/health/share/knowledgeBase/v1/findDrugsKnowledgeList', params) @@ -55,6 +63,12 @@ export const fetchConsult = async (infoId) => { export const fetchVidio = async (params) => { return await http.get('/api//health/user/video/v1/findVideoVoList', params) } +// 视频科目 +export const fetchVidioNav = async () => { + return await http.get('/api/health/user/video/v1/findVideoCategoryList') +} + + // 热门搜索const---热门搜索 export const fetchHotSearch = async () => { return await http.get('/api/health/share/v1/popularSearch') @@ -200,8 +214,8 @@ export const fetchImage = async (params) => { }) } // 删除文档 -export const fetchDelete=async(params)=>{ - return await http.delete('/api/health/user/verify/v1/deleteUserArchives',params) +export const fetchDelete = async (params) => { + return await http.delete('/api/health/user/verify/v1/deleteUserArchives', params) } // 编辑文档 export const fetchEditProfile = async (params) => { @@ -217,27 +231,67 @@ export const fetchGetProfile = async (params) => { } // 收藏病友圈 -export const fetchPatientSave=async(params)=>{ - return await http.post('/api/health/user/verify/v1/addUserSickCollection',params) +export const fetchPatientSave = async (params) => { + return await http.post('/api/health/user/verify/v1/addUserSickCollection', params) } //取消 收藏病友圈 -export const fetchPatientNoSave=async(params)=>{ - return await http.delete('/api/health/user/verify/v1/cancelSickCollection',params) +export const fetchPatientNoSave = async (params) => { + return await http.delete('/api/health/user/verify/v1/cancelSickCollection', params) } -// 查看收藏病友圈 -export const fetchSeeCirle=async(params)=>{ - return await http.get('/api/health/user/verify/v1/findUserSickCollectionList',params) + +// 提现记录 网路异常? +export const fetchGetList = async (params) => { + return await http.get('/api/health/user/verify/v1/findUserDrawRecordList', params) } +// 查询用户id信息 +export const fetchIdUser = async () => { + return await http.get('/api/health/user/verify/v1/getUserInfoById') +} +// 修改昵称 +export const fetchNick = async (params) => { + return await http.put('/api/health/user/verify/v1/modifyNickName', params) +} +// 患者发送消息 +export const fetchMessage = async (params) => { + return await http.post('/api/health/user/inquiry/verify/v1/pushMessage', params) +} +// 查询聊天信息列表 +export const fetchChatList = async (params) => { + return await http.get('/api/health/user/inquiry/verify/v1/findInquiryRecordList', params) +} +// 视频收藏接口 +export const fetchVideoLike = async (params) => { + return await http.post('/api/health/user/video/verify/v1/addUserVideoCollection', params) +} +// 我的收藏 + // 查看收藏咨询 -export const fetchSeeAsk=async(params)=>{ - return await http.get('/api/health/user/verify/v1/findVideoCollectionList',params) +export const fetchSeeAsk = async (params) => { + return await http.get('/api/health/user/verify/v1/findUserInfoCollectionList', params) } // 查看收藏视屏 -export const fetchSeeVideo=async(params)=>{ - return await http.get('/api/health/user/verify/v1/findVideoCollectionList',params) +export const fetchSeeVideo = async (params) => { + return await http.get('/api/health/user/verify/v1/findVideoCollectionList', params) } -// 提现记录 网路异常? -export const fetchGetList=async(params)=>{ - return await http.get('/api/health/user/verify/v1/findUserDrawRecordList',params) +// 查看收藏病友圈 +export const fetchSeeCirle = async (params) => { + return await http.get('/api/health/user/verify/v1/findUserSickCollectionList', params) +} +// 绑定身份证 +export const fetchPerson = async (params) => { + return await http.post('/api/health/user/verify/v1/bindUserIdCard', params, { + headers: { + "Content-Type": "application/json", + }, + }) +} +// 修改密码 + +export const fetchUserPwd = async (params) => { + return await http.put('/api/health/user/verify/v1/updateUserPwd', params) +} +// 关注医生列表 +export const fetchDoctorList = async (params) => { + return await http.get('/api/health/user/verify/v1/findUserDoctorFollowList', params) } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 09f5109..7d4f45e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,7 +6,7 @@ Vue.use(VueRouter) const routes = [ { path: '/', - redirect: '/my/myLogin' + redirect: '/home' }, // -------------------------首页-------------------------- // 一级home页面 @@ -41,7 +41,7 @@ const routes = [ name: 'search', component: () => import('../views/home/search/search.vue') }, - { + { path: 'new/:id/:code', name: 'new', component: () => import('../views/home/new/new.vue') @@ -61,10 +61,15 @@ const routes = [ name: 'consultationServer', component: () => import('../views/consultation/consultationServer/consultationServer.vue'), children: [{ - path: 'consultationChat', + path: 'consultationChat/:doctorId/:recordId', name: 'consultationChat', component: () => import('../views/consultation/consultationServer/chat/chat.vue') }, + { + path: 'historyChat', + name: 'historyChat', + component: () => import('../views/consultation/consultationServer/historyChat/historyChat.vue') + }, { path: 'consultationCommentList', name: 'consultationCommentList', @@ -198,7 +203,7 @@ const routes = [ { path: '/my', name: 'my', - component:()=>import('../views/my/my.vue'), + component: () => import('../views/my/my.vue'), children: [{ path: 'myAdoptIdea', name: 'myAdoptIdea', @@ -273,12 +278,12 @@ const routes = [ { path: 'myProFile', name: 'myProFile', - component:()=>import('../views/my/proFile/proFile.vue'), + component: () => import('../views/my/proFile/proFile.vue'), children: [{ path: 'myProFileAddModifyProfile', name: 'myProFileAddModifyProfile', component: () => import('../views/my/proFile/addModifyProfile/addModifyProfile.vue') - },{ + }, { path: 'editProFile/:arr', name: 'editProFile', component: () => import('../views/my/proFile/editProFile/editProFile.vue') @@ -302,6 +307,11 @@ const routes = [ name: 'bindBankCard', component: () => import('../views/set/bindBankCard/bindBankCard.vue') }, + { + path: 'ss', + name: 'ss', + component: () => import('../views/set/ss/ss.vue') + }, { path: 'bindConfirm', name: 'bindConfirm', @@ -371,9 +381,10 @@ router.beforeEach((to, from, next) => { if (to.path === '/my/myLogin') { return next() } -// if (!localStorage.getItem('token')) { -// return next('/login') -// } + + if (!localStorage.getItem('userId')) { + return next('/my/myLogin') + } next() }) export default router diff --git a/src/views/consultation/consultationServer/chat/chat.vue b/src/views/consultation/consultationServer/chat/chat.vue index 4efc21b..d8a2349 100644 --- a/src/views/consultation/consultationServer/chat/chat.vue +++ b/src/views/consultation/consultationServer/chat/chat.vue @@ -1,13 +1,153 @@ - \ No newline at end of file diff --git a/src/views/consultation/consultationServer/doctorList/doctorList.vue b/src/views/consultation/consultationServer/doctorList/doctorList.vue index 0fa2f9a..fb6a276 100644 --- a/src/views/consultation/consultationServer/doctorList/doctorList.vue +++ b/src/views/consultation/consultationServer/doctorList/doctorList.vue @@ -2,6 +2,7 @@
@@ -69,7 +70,7 @@

- +
@@ -125,6 +126,7 @@ import { fetchDoctorlIST, fetchDoctorUser, fetchDoctorOnly, + fetchRecord, } from "@/api"; import src from "../../../../assets/images/icon/common resource/hdpi/common_icon_more_n.png"; import add from "../../../../assets/images/icon/common resource/hdpi/common_button_ascending_s.png"; @@ -239,15 +241,22 @@ export default { }, async zxList() { const resp = await fetchDoctorOnly({ doctorId: this.id }); + const resp1 = await fetchRecord(); + console.log(resp1); console.log(resp); if (localStorage.getItem("userId")) { Notify({ type: "success", message: "有正在沟通的医生" }); } else { Notify({ type: "danger", message: "请先登录" }); } - - // this.$router.push(`/consultation/consultationServer/consultationChat`); + if (resp.data.message !== "有正在沟通中的咨询") { + this.$router.push( + `/consultation/consultationServer/consultationChat/${resp1.data.result.doctorId}/${resp1.data.result.recordId}` + ); + } + }, + }, created() { this.getAsk(); @@ -417,7 +426,6 @@ export default { } } .foot1 { - height: 60px; width: 100%; // background-color: green; diff --git a/src/views/consultation/consultationServer/historyChat/historyChat.vue b/src/views/consultation/consultationServer/historyChat/historyChat.vue new file mode 100644 index 0000000..06ee2c0 --- /dev/null +++ b/src/views/consultation/consultationServer/historyChat/historyChat.vue @@ -0,0 +1,131 @@ + + + + + \ No newline at end of file diff --git a/src/views/home/information/information.vue b/src/views/home/information/information.vue index 8b16673..81e1e50 100644 --- a/src/views/home/information/information.vue +++ b/src/views/home/information/information.vue @@ -1,9 +1,15 @@ @@ -11,7 +17,8 @@ import xin from "@/assets/images/icon/common resource/xxhdpi/comment_list_icon_adoption_n.png"; import xinn from "@/assets/images/icon/common resource/xxhdpi/comment_list_icon_adoption_s.png"; import lianjie from "@/assets/images/icon/common resource/xxhdpi/common_button_share_n.png"; -import { fetchConsult } from "../../../api/index"; +import { fetchConsult, fetchZxLike, fetchZxNoLike } from "../../../api/index"; +import { Toast } from "vant"; export default { data() { return { @@ -19,6 +26,9 @@ export default { xinn: xinn, lianjie: lianjie, consult: {}, + id: 0, + isLike: false, + title: "", }; }, @@ -28,6 +38,21 @@ export default { const resp = await fetchConsult({ params: { infoId: this.id } }); console.log(resp); this.consult = resp.data.result.content; + this.id = resp.data.result.id; + this.title = resp.data.result.title; + }, + async handleLike() { + if (this.isLike === false) { + const resp = await fetchZxLike({ infoId: this.id }); + console.log(resp); + Toast.success("收藏成功"); + this.isLike = true; + } else { + const resp = await fetchZxNoLike({ params: { infoId: this.id } }); + console.log(resp); + Toast.success("取消收藏"); + this.isLike = false; + } }, }, created() { @@ -39,17 +64,53 @@ export default { }; - \ No newline at end of file diff --git a/src/views/my/attention/attention.vue b/src/views/my/attention/attention.vue index 23a1aef..dfb3521 100644 --- a/src/views/my/attention/attention.vue +++ b/src/views/my/attention/attention.vue @@ -1,15 +1,154 @@ - \ No newline at end of file diff --git a/src/views/my/collection/collection.vue b/src/views/my/collection/collection.vue index f5b8f20..aab14b9 100644 --- a/src/views/my/collection/collection.vue +++ b/src/views/my/collection/collection.vue @@ -3,19 +3,67 @@ -
- -
-
+ + + +
+
+
+
+

{{ v.title }}

+
+ {{ v.releaseTime | timeFormat }} +
+
+
+ +
+
+
+
+
+

{{ v.title }}

+
+ {{ v.releaseTime | timeFormat }} +
+
+
+
+
+
+ +
+
+ +
152121
+
+
+
+ +
+
+

{{ v.title }}

+

{{ v.disease }}

+
+ 收藏0建议 +

2分钟

+
+
+
+
+
@@ -32,29 +80,54 @@ export default { ind: 0, page: 1, count: 5, + active: 0, + con: [], + con1: [], + con2: [], }; }, methods: { + async getss() { + const resp = await fetchSeeAsk({ + params: { page: this.page, count: this.count }, + }); + // 是否存在你更多数据 + if (resp.data.result.length > 0) { + // 数据二次请求 + resp.data.result.forEach((v) => { + v.thumbnail = v.thumbnail.split(";"); + // console.log(v.thumbnail); + }); + } + this.con = resp.data.result; + console.log(resp); + console.log(141425); + }, async handleInd(i) { this.ind = i; + console.log(i); if (i === 0) { - const resp = await fetchSeeCirle({ - params: { page: this.page, count: this.count }, - }); - console.log(resp); + // console.log(resp); + + this.getss(); } else if (i === 1) { - const resp = await fetchSeeAsk({ - params: { page: this.page, count: this.count }, - }); - console.log(resp); - } else if (i === 2) { const resp = await fetchSeeVideo({ params: { page: this.page, count: this.count }, }); + this.con1 = resp.data.result; + console.log(resp); + } else if (i === 2) { + const resp = await fetchSeeCirle({ + params: { page: this.page, count: this.count }, + }); + this.con2 = resp.data.result; console.log(resp); } }, }, + created() { + this.getss(); + }, }; @@ -85,8 +158,164 @@ export default { } } } - .con{ + .con-list { + display: flex; + width: 100vw; + height: 100vh; + flex-direction: column; + align-items: center; + // background-color: pink; + .bot { + width: 100%; + height: 200px; + // background-color: #ccc; + flex-wrap: wrap; + margin-top: 23px; + .three { + height: 300px; + width: 100%; + display: flex; + align-items: center; + flex-direction: column; + // justify-content: space-between; + // background-color: green; + margin-top: 5px; + border-bottom: 2px solid #eee; + dt { + display: flex; + align-items: center; + justify-content: space-around; + height: 100px; + // background-color: green; + img { + width: 30%; + } + } + dd { + height: 65px; + width: 100%; + + // background-color: green; + display: flex; + align-items: center; + flex-direction: column; + p { + width: 100%; + font-weight: bold; + display: flex; + height: 30px; + align-items: center; + // background-color: red; + justify-content: space-between; + padding: 0 10px; + text-align: left; + } + div { + width: 100%; + display: flex; + align-items: center; + // background-color: red; + justify-content: space-between; + + p { + font-weight: normal; + } + span { + width: 50px; + // background-color: orange; + } + } + } + } + .one { + display: flex; + align-items: center; + width: 100%; + height: 100px; + margin: 5px; + border-bottom: 1px solid #eee; + // background-color: pink; + margin-top: 5px; + dt { + width: 35%; + // background-color: green; + height: 100px; + + img { + width: 100%; + height: 100%; + } + } + dd { + width: 65%; + height: 45px; + text-align: left; + display: flex; + height: 100px; + // background-color: green; + justify-content: space-between; + flex-direction: column; + .title { + margin-top: 5px; + height: 55px; + width: 100%; + font-weight: bolder; + } + .word { + margin-bottom: 5px; + display: flex; + align-items: center; + + justify-content: space-between; + .wordp { + margin: 5px; + } + .wordspan { + margin: 2px; + } + } + } + } + } + } + .con1 { + display: flex; + align-items: center; + flex-direction: column; + width: 100vw; + height: auto; + .con1-list { + width: 100%; + height: auto; + // background-color: pink; + display: flex; + align-items: center; + flex-direction: column; + .video { + width: 100%; + height: 300px; + } + } + } + .con2 { + width: 100vw; + height: auto; + // background-color: pink; + display: flex; + align-items: center; + flex-direction: column; + .con2-list { + width: 100%; + height: 100px; + display: flex; + align-items: start; + flex-direction: column; + justify-content: space-around; + background-color: #fff; + margin-top: 5px; + padding: 0 10px; + } } } \ No newline at end of file diff --git a/src/views/my/forgetPassword1/forgetPassword1.vue b/src/views/my/forgetPassword1/forgetPassword1.vue index d66262f..dd7092b 100644 --- a/src/views/my/forgetPassword1/forgetPassword1.vue +++ b/src/views/my/forgetPassword1/forgetPassword1.vue @@ -1,7 +1,5 @@ - \ No newline at end of file diff --git a/src/views/set/index/index.vue b/src/views/set/index/index.vue index fc0d7cb..d469ed6 100644 --- a/src/views/set/index/index.vue +++ b/src/views/set/index/index.vue @@ -3,13 +3,20 @@ - - + + + @@ -25,10 +32,25 @@ export default { img: localStorage.getItem("headPic"), }; }, + methods: { + button() { + localStorage.removeItem("userId"); + localStorage.removeItem("sessionId"); + this.$router.push("/my/myLogin"); + }, + }, }; \ No newline at end of file diff --git a/src/views/set/setNickname/setNickname.vue b/src/views/set/setNickname/setNickname.vue index a8204a4..1d0ff51 100644 --- a/src/views/set/setNickname/setNickname.vue +++ b/src/views/set/setNickname/setNickname.vue @@ -1,15 +1,66 @@ - \ No newline at end of file diff --git a/src/views/set/ss/ss.vue b/src/views/set/ss/ss.vue new file mode 100644 index 0000000..99a836a --- /dev/null +++ b/src/views/set/ss/ss.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/views/set/viewAuthenticationInformation/viewAuthenticationInformation.vue b/src/views/set/viewAuthenticationInformation/viewAuthenticationInformation.vue index 9fd8175..2e34ab0 100644 --- a/src/views/set/viewAuthenticationInformation/viewAuthenticationInformation.vue +++ b/src/views/set/viewAuthenticationInformation/viewAuthenticationInformation.vue @@ -1,15 +1,135 @@ - \ No newline at end of file diff --git a/src/views/vedio/vedio.vue b/src/views/vedio/vedio.vue index 6028041..36c9861 100644 --- a/src/views/vedio/vedio.vue +++ b/src/views/vedio/vedio.vue @@ -1,32 +1,66 @@ \ No newline at end of file