diff --git a/api/api.js b/api/api.js
index fead6d9..750f3a5 100644
--- a/api/api.js
+++ b/api/api.js
@@ -19,22 +19,53 @@ const api = {
return request('/clinical/stats', data, 'get', true);
},
getArticleDetail(id) { //获取详情
- return request('/clinical/article/'+id,{}, 'get', true);
+ return request('/clinical/article/'+id,{}, 'get', false);
},
getVideoDetail(id) { //获取详情
- return request('/clinical/video/'+id,{}, 'get', true);
+ return request('/clinical/video/'+id,{}, 'get', false);
},
collectArticle(id){
- return request('/api/clinical/article/collect/'+id, {}, 'post',false);
+ return request('/clinical/article/collect/'+id, {}, 'post',false);
},
cancelCollectArticle(id){
- return request('/api/clinical/article/collect/'+id, {}, 'delete',false);
+ return request('/clinical/article/collect/'+id, {}, 'delete',false);
},
collectVideo(id){
- return request('/api/clinical/video/collect/'+id, {}, 'post',false);
+ return request('/clinical/video/collect/'+id, {}, 'post',false);
},
cancelCollectVideo(id){
- return request('/api/clinical/video/collect/'+id,{}, 'delete',false);
+ return request('/clinical/video/collect/'+id,{}, 'delete',false);
+ },
+ addVideoComment(id,data){
+ return request('/clinical/video/comment/'+id,data, 'post',false,'application/json');
+ },
+ delVideoComment(id){
+ return request('/clinical/video/comment/'+id, {}, 'delete',false);
+ },
+ topVideoComment(id){
+ return request('/clinical/video/comment/top/'+id, {}, 'put',false);
+ },
+
+ cancelTopVideoComment(id){
+ return request('/clinical/video/comment/top/'+id, {}, 'delete',false);
+ },
+ addArticleComment(id,data){
+ return request('/clinical/article/comment/'+id, data, 'post',false,'application/json');
+ },
+ delArticleComment(id){
+ return request('/clinical/article/comment/'+id, {}, 'delete',false);
+ },
+ topArticleComment(id){
+ return request('/clinical/article/comment/top/'+id, {}, 'put',false);
+ },
+ cancelTopArticleComment(id){
+ return request('/clinical/article/comment/top/'+id, {}, 'delete',false);
+ },
+ getArticleComment(data){
+ return request('/clinical/article/comment/page',data, 'post', false,'application/json');
+ },
+ getVideoComment(data){
+ return request('/clinical/video/comment/page',data, 'post', false,'application/json');
},
searchArticle(data){
return request('/clinical/article/search', data, 'post',true,'application/json');
@@ -49,12 +80,59 @@ const api = {
return request('/clinical/hospital/search', data, 'post',true,'application/json');
},
getStaticDoctor(id){
- return request('/clinical/stats/doctor/'+id, data={}, 'post',false);
+ return request('/clinical/stats/doctor/'+id,{}, 'get',false);
},
getStaticHospital(id){
- return request('/clinical/stats/hospital/'+id, data={}, 'post',false);
+ return request('/clinical/stats/hospital/'+id, {}, 'get',false);
+ },
+ getUserInfo(){
+ return request('/user',{}, 'get', false);
+ },
+ getExchangeStatic(){
+ return request('/exchange/stats',{}, 'get', false);
+ },
+ getExchangeStaticUser(id){
+ return request('/exchange/stats/user/'+id,{}, 'get', false);
+ },
+ searchExchage(){
+ return request('/exchange/search', data, 'post',true,'application/json');
+ },
+ getExchangeDetail(id){
+ return request('/exchange/'+id,{}, 'get', false);
+ },
+ getExchangeVote(id){
+ return request('/exchange/vote/'+id,{}, 'get', false);
+ },
+ exchangeCollect(id){
+ return request('/exchange/collect/'+id, {}, 'post',false);
+ },
+ cancelExchangeCollect(id){
+ return request('/exchange/collect/'+id, {}, 'delete',false);
+ },
+ addExchangeComment(id,data){
+ return request('/exchange/comment/'+id, data, 'post',false);
+ },
+ delExchangeComment(id){
+ return request('/exchange/comment/'+id, {}, 'delete',false);
+ },
+ topExchangeComment(id){
+ return request('/exchange/comment/top/'+id, {}, 'put',false);
+ },
+ cancleTopExchangeComment(id){
+ return request('/exchange/comment/top/'+id, {}, 'delete',false);
+ },
+ getExchangeComment(data){
+ return request('/exchange/comment/page', data, 'post',false);
+ },
+ getExchangeCommentUser(data){
+ return request('/exchange/user/comment/page', data, 'post',false);
+ },
+ getMyCollect(data){
+ return request('/user/collect/search',data, 'post',false,'application/json');
+ },
+ getMyRead(data){
+ return request('/user/case/read/search',data, 'post',false,'application/json');
},
-
queryList(data) {
const listCount = 24;
return _queryList(data, listCount);
diff --git a/components/navBarSearch/navBarSearch.vue b/components/navBarSearch/navBarSearch.vue
index d7fb874..d97d046 100644
--- a/components/navBarSearch/navBarSearch.vue
+++ b/components/navBarSearch/navBarSearch.vue
@@ -34,7 +34,7 @@
diff --git a/pages/caseTalk/caseTalk.vue b/pages/caseTalk/caseTalk.vue
index c4c57c9..b2eb959 100644
--- a/pages/caseTalk/caseTalk.vue
+++ b/pages/caseTalk/caseTalk.vue
@@ -1,18 +1,18 @@
-
+
- 11
- 文章
+ {{ numInfo.exchange_collect_num}}
+ 病例数
- 22
- 视频
+ {{ numInfo.exchange_num }}
+ 互动数
- 333
- 阅读量
+ {{ numInfo.exchange_read_num }}
+ 浏览量
@@ -20,33 +20,33 @@
精选病例
-
+
查看更多
-
+
- 肝胆相照临床病例库肝胆相照临床病例库
+ {{ item.article_title }}
- 精选病例
-
+ 最新收录
+
查看更多
-
- 肝胆相照临床病例库肝胆相照临床病例库肝胆
-
+
+ {{ item.article_title }}
+
- 陈XX(首都医科大学附属北京**医院)
+ {{cell.doctor_name}}({{cell.hospital_name}})
嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX
@@ -82,20 +82,20 @@
- 11
+ {{ item.read_num }}
-
- 22
+
+ {{item.collect_num }}
- 22
+ {{item.comment_num }}
- {{formatdate('2022-10-23') }}
+ {{formatdate(item.push_date) }}
@@ -112,20 +112,52 @@
import tabBar from "@/components/tabBar/tabBar.vue";
import headImg from "@/static/headImg.png";
import dayjs from "dayjs";
+ import api from "@/api/api";
+ import { reactive,ref } from 'vue';
+ import { onLoad } from "@dcloudio/uni-app";
+ const numInfo=reactive({})
+ const most_read_articles=ref([]);
+ const new_articles=ref([]);
+
+
const formatdate = (date) => {
return dayjs(date).format('YYYY-MM-DD')
};
- const goList = () => {
- uni.navigateTo({
- url: '/pages/specialList/specialList'
- })
- };
+ // const goList = () => {
+ // uni.navigateTo({
+ // url: '/pages/specialList/specialList'
+ // })
+ // };
+ const goList=(type)=>{
+ uni.navigateTo({
+ url:'/pages/search/search?order='+type
+ })
+};
+ const getStatic=()=>{
+ api.getExchangeStatic().then(res=>{
+ let result=res.data.data;
+ Object.assign(numInfo,result);
+ })
+ }
+ const getData = async() => {
+ const {data}=await api.getHomeData();
+ if(data.code==200){
+ most_read_articles.value=data.data.most_read_articles;
+ new_articles.value=data.data.new_articles;
+ }
+ };
const videoErrorCallback = (e) => {
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
};
+
+ onLoad(()=>{
+ console.log('onLoad')
+ getStatic();
+ getData();
+ })