diff --git a/api/api.js b/api/api.js index 750f3a5..462b47e 100644 --- a/api/api.js +++ b/api/api.js @@ -94,9 +94,12 @@ const api = { getExchangeStaticUser(id){ return request('/exchange/stats/user/'+id,{}, 'get', false); }, - searchExchage(){ + searchExchage(data){ return request('/exchange/search', data, 'post',true,'application/json'); }, + searchExchageGood(data){ + return request('/exchange/list', data, 'post',true,'application/json'); + }, getExchangeDetail(id){ return request('/exchange/'+id,{}, 'get', false); }, @@ -122,10 +125,22 @@ const api = { return request('/exchange/comment/top/'+id, {}, 'delete',false); }, getExchangeComment(data){ - return request('/exchange/comment/page', data, 'post',false); + return request('/exchange/comment/page', data, 'post',false,'application/json'); }, getExchangeCommentUser(data){ - return request('/exchange/user/comment/page', data, 'post',false); + return request('/exchange/user/comment/page', data, 'post',false,'application/json'); + }, + addExchange(data){ + return request('/exchange', data, 'post',false,'application/json'); + }, + getDraftList(data){ + return request('/exchange/draft/search', data, 'post',false,'application/json'); + }, + getVideoCommentUser(data){ + return request('/clinical/video/user/comment/page', data, 'post',false,'application/json'); + }, + getArticleCommentUser(data){ + return request('/clinical/article/user/comment/page', data, 'post',false,'application/json'); }, getMyCollect(data){ return request('/user/collect/search',data, 'post',false,'application/json'); @@ -133,6 +148,13 @@ const api = { getMyRead(data){ return request('/user/case/read/search',data, 'post',false,'application/json'); }, + getOss(data){ + return request('/sign/oss',data, 'get', false); + }, + + ossUpload(url,data){ + return request(url,data,'post','multipart/form-data') + }, queryList(data) { const listCount = 24; return _queryList(data, listCount); diff --git a/components/backLogoNav/backLogoNav.vue b/components/backLogoNav/backLogoNav.vue new file mode 100644 index 0000000..0d96acf --- /dev/null +++ b/components/backLogoNav/backLogoNav.vue @@ -0,0 +1,106 @@ + + + + + \ No newline at end of file diff --git a/components/navBar/navBar.vue b/components/navBar/navBar.vue index 1a3e86d..cc22edd 100644 --- a/components/navBar/navBar.vue +++ b/components/navBar/navBar.vue @@ -42,7 +42,7 @@ const props=defineProps({ }, type:{ type:String, - default:'', + default:'home', }, navName:{ type:String, @@ -50,12 +50,13 @@ const props=defineProps({ } }) +const emit = defineEmits(['changeWord']) const placeholder = ref("输入疾病名称、标题、作者搜索"); watch(()=>props.type,(newVal)=>{ - if(newVal==='doctor'){ - placeholder.value='输入医生姓名' - }else if(newVal==='hospital'){ - placeholder.value='输入医院名称' + if(newVal==='home'){ + //placeholder.value='输入医生姓名' + }else if(newVal==='caseTalk'){ + //placeholder.value='输入医院名称' } },{immediate: true }) @@ -68,6 +69,15 @@ const goMy=()=>{ }) } const search=()=>{ + if(props.type=='home'){ + uni.navigateTo({ + url: `/pages/search/search?keyWord=${keyWord.value}`, + }); + }else if(props.type=='caseTalk'){ + uni.navigateTo({ + url: `/pages/specialList/specialList?keyWord=${keyWord.value}`, + }); + } // if (!keyWord.value) { // return uni.showToast({ // title: "请输入关键字", @@ -75,9 +85,7 @@ const search=()=>{ // }); // } - uni.navigateTo({ - url: `/pages/search/search?keyWord=${keyWord.value}`, - }); + } diff --git a/pages/caseTalk/caseTalk.vue b/pages/caseTalk/caseTalk.vue index b2eb959..09df72f 100644 --- a/pages/caseTalk/caseTalk.vue +++ b/pages/caseTalk/caseTalk.vue @@ -16,91 +16,126 @@ - - - - 精选病例 - - 查看更多 - + + + + 精选病例 + + 查看更多 + + + + + + + {{ item.exchange_title }} + - - - - {{ item.article_title }} + + + + 最新收录 + + 查看更多 + + - - - - - - 最新收录 - - 查看更多 - + + + {{ + item.exchange_title + }} + + + {{ item.user_name }}({{ item.hospital_name }}) - - - - {{ item.article_title }} - - - {{cell.doctor_name}}({{cell.hospital_name}}) + {{ item.exchange_content }} + + + + 加载失败 + - - 嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX + + + + - - - - 加载失败 - - - - - 加载失败 - - - - - 加载失败 - - + + + {{ cell.label_name }} + + + + + + {{ item.read_num }} - - + + + {{ item.collect_num }} - - 标签 + + + {{ item.comment_num }} + + + + + {{ formatdate(item.push_date) }} - - - - - {{ item.read_num }} - - - - {{item.collect_num }} - - - - {{item.comment_num }} - - - - - {{formatdate(item.push_date) }} - - + @@ -129,9 +164,16 @@ // }) // }; const goList=(type)=>{ - uni.navigateTo({ - url:'/pages/search/search?order='+type - }) + if(type=='read'){ + uni.navigateTo({ + url:'/pages/specialList/specialList?is_selected=1' + }) + }else{ + uni.navigateTo({ + url:'/pages/specialList/specialList' + }) + } + }; const getStatic=()=>{ api.getExchangeStatic().then(res=>{ @@ -139,24 +181,50 @@ 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') + const searchList = async () => { + let searchForm = { + page: 1, + page_size: 10 + }; + + api.searchExchage({ + ...searchForm + }) + .then((res) => { + new_articles.value=res.data.data.data; + }) + .catch((err) => { + + }); +}; +const goodList=()=>{ + api.searchExchageGood({ + is_selected:1, + limit:5 + }).then(res=>{ + most_read_articles.value=res.data.data + }) +} +const hotList=()=>{ + api.searchExchageHot({ + is_selected:0, + limit:5, + page:1, + page_size:5 + }).then(res=>{ + }) +} +onLoad(()=>{ getStatic(); - getData(); + goodList(); + searchList(); }) @@ -166,7 +234,14 @@ flex-direction: column; height: calc(100vh - 100rpx); } - + .mostread{ + .cell{ + padding: 22rpx 0rpx!important; + margin:0 30rpx; + display: flex; + + } + } .box { flex: 1; padding-bottom: 30rpx; @@ -224,6 +299,7 @@ padding: 0 28rpx; background: #ECFAF9; border-radius: 30rpx; + margin-right: 12rpx; font-size: 27rpx; color: #3CC7C0; display: flex; @@ -277,12 +353,10 @@ padding-top: 30rpx; .list { - margin: 8rpx 30rpx 0; - + margin: 8rpx 0rpx 0; .cell { - padding: 22rpx 0; - display: flex; - border-bottom: 2rpx solid #f3f4f6; + padding: 22rpx 30rpx; + border-bottom: 2rpx solid #f3f4f6; .circle { margin-top: 15rpx; diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 4f49bcd..322c1e1 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -43,7 +43,7 @@ - {{formatDay(info.updated_at)}} + {{ formatDay(info.updated_at) }} @@ -111,7 +111,7 @@ - + - 全部评论({{total}}) + 全部评论({{ total }}) {{ item.user_name }} - ... + ... {{ item.content }} - - - + + + {{ formatDate(item.created_at) }} @@ -181,30 +200,53 @@ {{ cell.user_name }} - ... + ... - - - + + + {{ formatDate(cell.created_at) }} - ——展开更多回复 - - - + - + - + + > + + + 发送 - {{is_top?'取消置顶':'置顶'}} + {{ + is_top ? "取消置顶" : "置顶" + }} 回复 删除 @@ -298,13 +352,34 @@ {{ mainCommentObj.user_name }} - ... + ... - {{ mainCommentObj.content}} - - - - {{formatDate(mainCommentObj.created_at) }} + {{ mainCommentObj.content }} + + + + {{ + formatDate(mainCommentObj.created_at) + }} @@ -312,7 +387,8 @@ + :key="cell.comment_id" + > {{ cell.user_name }} - ... + ... + + + {{ formatDate(cell.created_at) }} @@ -333,10 +431,9 @@ @@ -362,23 +459,21 @@ + - 取消 + 取消 确定 - - + + 提示 - - 是否删除该评论? - - + 是否删除该评论? + - 取消 + 取消 确定 @@ -387,7 +482,7 @@