This commit is contained in:
zoujiandong 2025-06-09 08:38:59 +08:00
parent 6684bf1e29
commit db955ff4f3
15 changed files with 1565 additions and 550 deletions

View File

@ -19,22 +19,53 @@ const api = {
return request('/clinical/stats', data, 'get', true); return request('/clinical/stats', data, 'get', true);
}, },
getArticleDetail(id) { //获取详情 getArticleDetail(id) { //获取详情
return request('/clinical/article/'+id,{}, 'get', true); return request('/clinical/article/'+id,{}, 'get', false);
}, },
getVideoDetail(id) { //获取详情 getVideoDetail(id) { //获取详情
return request('/clinical/video/'+id,{}, 'get', true); return request('/clinical/video/'+id,{}, 'get', false);
}, },
collectArticle(id){ collectArticle(id){
return request('/api/clinical/article/collect/'+id, {}, 'post',false); return request('/clinical/article/collect/'+id, {}, 'post',false);
}, },
cancelCollectArticle(id){ cancelCollectArticle(id){
return request('/api/clinical/article/collect/'+id, {}, 'delete',false); return request('/clinical/article/collect/'+id, {}, 'delete',false);
}, },
collectVideo(id){ collectVideo(id){
return request('/api/clinical/video/collect/'+id, {}, 'post',false); return request('/clinical/video/collect/'+id, {}, 'post',false);
}, },
cancelCollectVideo(id){ 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){ searchArticle(data){
return request('/clinical/article/search', data, 'post',true,'application/json'); 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'); return request('/clinical/hospital/search', data, 'post',true,'application/json');
}, },
getStaticDoctor(id){ getStaticDoctor(id){
return request('/clinical/stats/doctor/'+id, data={}, 'post',false); return request('/clinical/stats/doctor/'+id,{}, 'get',false);
}, },
getStaticHospital(id){ 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) { queryList(data) {
const listCount = 24; const listCount = 24;
return _queryList(data, listCount); return _queryList(data, listCount);

View File

@ -34,7 +34,7 @@
</template> </template>
<script setup> <script setup>
import { ref, watch} from "vue"; import { ref, watch,defineEmits} from "vue";
import headImg from "@/static/headImg.png"; import headImg from "@/static/headImg.png";
import logoImg from "@/static/logo.png"; import logoImg from "@/static/logo.png";
const keyWord = ref(''); const keyWord = ref('');
@ -65,11 +65,13 @@ watch(()=>props.type,(newVal)=>{
watch(()=>props.searchWord,(newVal)=>{ watch(()=>props.searchWord,(newVal)=>{
keyWord.value=newVal keyWord.value=newVal
}) })
const emit = defineEmits(['changeWord'])
const goMy=()=>{ const goMy=()=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/my' url:'/pages/my/my'
}) })
} }
const goBack = () => { const goBack = () => {
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
@ -82,10 +84,10 @@ const search=()=>{
// icon:'none' // icon:'none'
// }); // });
// } // }
emit('changeWord',keyWord.value)
uni.navigateTo({ // uni.navigateTo({
url: `/pages/search/search?keyWord=${keyWord.value}`, // url: `/pages/search/search?keyWord=${keyWord.value}`,
}); // });
} }
</script> </script>

View File

@ -1,18 +1,18 @@
<template> <template>
<view class="upage"> <view class="upage">
<navBar></navBar> <navBar :navName="'肝胆相照病例交流园地'" :type="'caseTalk'"></navBar>
<view class="databox"> <view class="databox">
<view class="cell"> <view class="cell">
<view class="num">11</view> <view class="num">{{ numInfo.exchange_collect_num}}</view>
<view class="name">文章</view> <view class="name">病例数</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="num">22</view> <view class="num">{{ numInfo.exchange_num }}</view>
<view class="name">视频</view> <view class="name">互动数</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="num">333</view> <view class="num">{{ numInfo.exchange_read_num }}</view>
<view class="name">阅读</view> <view class="name">浏览</view>
</view> </view>
</view> </view>
<view class="bar"></view> <view class="bar"></view>
@ -20,33 +20,33 @@
<view class="special"> <view class="special">
<view class="titlebox"> <view class="titlebox">
<view class="title">精选病例</view> <view class="title">精选病例</view>
<view class="more" @click="goList"> <view class="more" @click="goList('read')">
<view class="morename">查看更多</view> <view class="morename">查看更多</view>
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon> <u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="cell"> <view class="cell" v-for="item in most_read_articles" :key="item.article_id">
<view class="circle"></view> <view class="circle"></view>
<view class="title">肝胆相照临床病例库肝胆相照临床病例库</view> <view class="title">{{ item.article_title }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="bar"></view> <view class="bar"></view>
<view class="record"> <view class="record">
<view class="titlebox"> <view class="titlebox">
<view class="title">精选病例</view> <view class="title">最新收录</view>
<view class="more" @click="goList"> <view class="more" @click="goList('mew')">
<view class="morename">查看更多</view> <view class="morename">查看更多</view>
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon> <u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="cell"> <view class="cell" v-for="item in new_articles" :key="item.article_id">
<view class="title">肝胆相照临床病例库肝胆相照临床病例库肝胆</view> <view class="title">{{ item.article_title }}</view>
<view class="doctor"> <view class="doctor" v-for="cell in item.autor">
<up--image :src="headImg" width="46rpx" height="46rpx" radius="50%"></up--image> <up--image :src="headImg" width="46rpx" height="46rpx" radius="50%"></up--image>
<view class="name">陈XX首都医科大学附属北京**医院</view> <view class="name">{{cell.doctor_name}}{{cell.hospital_name}}</view>
</view> </view>
<view class="content"> <view class="content">
嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX 嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX
@ -82,20 +82,20 @@
<view class="left"> <view class="left">
<view class="eyebox item"> <view class="eyebox item">
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon> <up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
<view class="num">11</view> <view class="num">{{ item.read_num }}</view>
</view> </view>
<view class="collect item"> <view class="collect item">
<up-icon name="heart" color="#4B5563" size="28rpx"></up-icon> <up-icon :name="item.is_collect?'heart-fill':'heart'" :color="item.is_collect?'red':'#4B5563'" size="28rpx"></up-icon>
<view class="num">22</view> <view class="num">{{item.collect_num }}</view>
</view> </view>
<view class="chat item"> <view class="chat item">
<up-icon name="chat" color="#4B5563" size="28rpx"></up-icon> <up-icon name="chat" color="#4B5563" size="28rpx"></up-icon>
<view class="num">22</view> <view class="num">{{item.comment_num }}</view>
</view> </view>
</view> </view>
<view class="time"> <view class="time">
<up-icon name="clock" color="#4B5563" size="28rpx"></up-icon> <up-icon name="clock" color="#4B5563" size="28rpx"></up-icon>
<view class="num">{{formatdate('2022-10-23') }}</view> <view class="num">{{formatdate(item.push_date) }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -112,13 +112,39 @@
import tabBar from "@/components/tabBar/tabBar.vue"; import tabBar from "@/components/tabBar/tabBar.vue";
import headImg from "@/static/headImg.png"; import headImg from "@/static/headImg.png";
import dayjs from "dayjs"; 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) => { const formatdate = (date) => {
return dayjs(date).format('YYYY-MM-DD') return dayjs(date).format('YYYY-MM-DD')
}; };
const goList = () => { // const goList = () => {
// uni.navigateTo({
// url: '/pages/specialList/specialList'
// })
// };
const goList=(type)=>{
uni.navigateTo({ uni.navigateTo({
url: '/pages/specialList/specialList' 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) => { const videoErrorCallback = (e) => {
uni.showModal({ uni.showModal({
@ -126,6 +152,12 @@
showCancel: false showCancel: false
}) })
}; };
onLoad(()=>{
console.log('onLoad')
getStatic();
getData();
})
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template> <template>
<navBar></navBar> <navBar :type="'home'"></navBar>
<view class="page"> <view class="page">
<view class="databox"> <view class="databox">
<view class="cell"> <view class="cell">
@ -151,8 +151,6 @@ const numInfo=reactive({})
const getData = async() => { const getData = async() => {
const {data}=await api.getHomeData(); const {data}=await api.getHomeData();
console.log(11111);
console.log(data);
if(data.code==200){ if(data.code==200){
most_read_articles.value=data.data.most_read_articles; most_read_articles.value=data.data.most_read_articles;
new_articles.value=data.data.new_articles; new_articles.value=data.data.new_articles;
@ -175,12 +173,12 @@ const goList=(type)=>{
}; };
const searchDoctor=()=>{ const searchDoctor=()=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/searchList/searchList?type=doctor' url:'/pages/searchList/searchList?type=doctor&name=医生&id='
}) })
} }
const goHospital=()=>{ const goHospital=()=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/searchList/searchList?type=hospital' url:'/pages/searchList/searchList?type=hospital&name=医院&id='
}) })
} }
onLoad(() => { onLoad(() => {

View File

@ -224,7 +224,13 @@ const getPhoneNumber = (e) => {
} else { } else {
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token); uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
}; };
console.log(2222222) uni.setStorageSync("userInfo",{
avatar:result.avatar,
user_id:result.user_id,
status:result.status,
user_name:result.user_name,
doctor_id:result.doctor_id,
});
goPage() goPage()
}).catch((err)=>{ }).catch((err)=>{
uni.showToast({ uni.showToast({
@ -258,6 +264,13 @@ const phoneLogin = () => {
} else { } else {
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token); uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
} }
uni.setStorageSync("userInfo",{
avatar:result.avatar,
user_id:result.user_id,
status:result.status,
user_name:result.user_name,
doctor_id:result.doctor_id,
});
goPage() goPage()
}); });
}); });

View File

@ -4,36 +4,36 @@
<view class="con"> <view class="con">
<view class="infobox"> <view class="infobox">
<up--image <up--image
:src="headImg" :src="userInfo.avatar?userInfo.avatar:headImg"
width="154rpx" width="154rpx"
height="154rpx" height="154rpx"
radius="50%" radius="50%"
></up--image> ></up--image>
<view class="info"> <view class="info">
<view class="name"> <view class="name">
张三主任医师 {{userInfo.user_name}}{{userInfo.title}}
</view> </view>
<view class="hospital">首都医科大学附属北京**医院</view> <view class="hospital">{{ userInfo.hospital_name }}</view>
</view> </view>
</view> </view>
<view class="databox"> <view class="databox">
<view class="cell"> <view class="cell">
<view class="num">11</view> <view class="num">{{ numInfo.article_num }}</view>
<view class="name">文章</view> <view class="name">文章</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="num">22</view> <view class="num">{{ numInfo.video_num }}</view>
<view class="name">视频</view> <view class="name">视频</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="num">333</view> <view class="num">{{numInfo.video_read_num + numInfo.article_read_num }}</view>
<view class="name">阅读量</view> <view class="name">阅读量</view>
</view> </view>
</view> </view>
<view class="listbox"> <view class="listbox">
<view class="titlename">我的临床病例库</view> <view class="titlename">我的临床病例库</view>
<view class="cell" @click="goDoctor"> <view class="cell" @click="goDoctor(userInfo.doctor_id,userInfo.user_name)" v-if="numInfo.article_num>0">
<view class="left"> <view class="left">
<u-icon name="chat-fill" color="#000" size="28"></u-icon> <u-icon name="chat-fill" color="#000" size="28"></u-icon>
<view class="title">我的病例库</view> <view class="title">我的病例库</view>
@ -47,10 +47,10 @@
</view> </view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon> <u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view> </view>
<view class="cell" @click="goHospital"> <view class="cell" @click="goHospital(userInfo.hospital_id,userInfo.hospital_name)" v-if="hospitalInfo.video_read_num>0 || hospitalInfo.article_read_num>0">
<view class="left"> <view class="left">
<u-icon name="chat-fill" color="#000" size="28"></u-icon> <u-icon name="chat-fill" color="#000" size="28"></u-icon>
<view class="title">XXXX医院临床病例库</view> <view class="title">{{userInfo.hospital_name}}临床病例库</view>
</view> </view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon> <u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view> </view>
@ -88,19 +88,54 @@
<script setup> <script setup>
import dNav from "@/components/backNav/backNav.vue"; import dNav from "@/components/backNav/backNav.vue";
import headImg from "@/static/headImg.png"; import headImg from "@/static/headImg.png";
import { onLoad } from "@dcloudio/uni-app";
import api from "@/api/api";
import { ref,reactive} from "vue";
const userInfo=reactive({})
const numInfo=reactive({})
const hospitalInfo=reactive({})
const getInfo=()=>{
api.getUserInfo().then(res=>{
const result=res.data.data;
Object.assign(userInfo,result);
console.log(result)
if(userInfo.doctor_id){
getNum(userInfo.doctor_id)
}
if(userInfo.hospital_id){
getHospitalNum(userInfo.hospital_id)
};
})
}
const getNum=(id)=>{
api.getStaticDoctor(id).then(res=>{
const result=res.data.data;
Object.assign(numInfo,result);
})
}
const getHospitalNum=(id)=>{
api.getStaticHospital(id).then(res=>{
const result=res.data.data;
Object.assign(hospitalInfo,result);
})
}
onLoad(()=>{
getInfo()
})
const goCert = () => { const goCert = () => {
uni.navigateTo({ uni.navigateTo({
url: "/pages/certList/certList", url: "/pages/certList/certList",
}); });
}; };
const goDoctor=()=>{ const goDoctor=(id,name)=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/searchList/searchList?type=doctor' url:'/pages/searchList/searchList?type=doctor&id='+id+'&name='+name
}) })
} }
const goHospital=()=>{ const goHospital=(id,name)=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/searchList/searchList?type=hospital' url:'/pages/searchList/searchList?type=hospital&id='+id+'&name='+name
}) })
} }
const mySpecial=()=>{ const mySpecial=()=>{

View File

@ -9,45 +9,45 @@
@query="queryList" @query="queryList"
> >
<template #top> <template #top>
<navBarSearch :searchWord="keyWord" :navName="navName"></navBarSearch> <navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord"></navBarSearch>
<view class="filterbox"> <view class="filterbox">
<!-- <view class="type" @click="swicthType">{{!isArticle?'文章':'视频'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></view> --> <!-- <view class="type" @click="swicthType">{{!isArticle?'文章':'视频'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></view> -->
<up-dropdown class="u-dropdown" ref="uDropdownRef"> <up-dropdown class="u-dropdown" ref="uDropdownRef">
<up-dropdown-item <up-dropdown-item
v-model="order.push_date" v-model="type1"
title="收藏" :title="type1==0?'收藏':'浏览'"
@change="change" @change="changetype1"
:options="options" :options="options"
></up-dropdown-item> ></up-dropdown-item>
<up-dropdown-item <up-dropdown-item
v-model="order.read_num" v-model="type2"
title="文章病例库" :title="title2"
@change="change" @change="changetype2"
:options="options" :options="options1"
></up-dropdown-item> ></up-dropdown-item>
</up-dropdown> </up-dropdown>
</view> </view>
</template> </template>
<view class="item" v-for="(item, index) in dataList" :key="index" @click="isArticle?goDetail(item.article_id):goDetail(item.video_id)"> <view class="item" v-for="(item, index) in dataList" @click="goDetail()" :key="item.collect_id">
<view class="title ellipsis">{{isArticle?item.article_title:item.video_title }}</view> <view class="title ellipsis">{{item.data.title}}</view>
<view class="tagsbox"> <view class="tagsbox">
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view> <view class="tag" v-for="tag in item.data.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
</view> </view>
<view class="deal"> <view class="deal">
<view class="left"> <view class="left">
<view class="eyebox"> <view class="eyebox">
<up-icon name="eye" color="#6B7280" size="28rpx"></up-icon> <up-icon name="eye" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{item.read_num }}</view> <view class="num">{{item.data.read_num }}</view>
</view> </view>
<view class="collect"> <view class="collect">
<up-icon name="heart" color="#6B7280" size="28rpx"></up-icon> <up-icon name="heart" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{item.collect_num }}</view> <view class="num">{{item.data.collect_num }}</view>
</view> </view>
</view> </view>
<view class="time"> <view class="time">
<up-icon name="clock" color="#6B7280" size="28rpx"></up-icon> <up-icon name="clock" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{formatdate(item.push_date) }}</view> <view class="num">{{formatdate(item.data.push_date) }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -69,14 +69,11 @@ const dataList = ref([]);
const total = ref(0); const total = ref(0);
const value = ref(""); const value = ref("");
const keyWord = ref(""); const keyWord = ref("");
const page=ref(1);
const isArticle=ref(true); const isArticle=ref(true);
const hospital_id=ref(''); const navName=ref('肝胆相照临床病例库');
const hospital_name=ref(''); const type1=ref(0);
const doctor_id=ref(''); const type2=ref(1);
const doctor_name=ref(''); const title2=ref('文章病例库');
const numInfo=reactive({});
const navName=ref('肝胆相照临床病例库')
const options= ref([ const options= ref([
{ {
label: "收藏", label: "收藏",
@ -90,16 +87,16 @@ const options= ref([
const options1= ref([ const options1= ref([
{ {
label: "文章病例库", label: "文章病例库",
value: 0,
},
{
label: "视频病例库",
value: 1, value: 1,
}, },
{ {
label: "病例交流", label: "视频病例库",
value:2, value:2,
}, },
{
label: "病例交流",
value:3,
},
]); ]);
const order=reactive({ const order=reactive({
@ -111,30 +108,14 @@ onLoad((options) => {
if(options.keyWord){ if(options.keyWord){
keyWord.value = options.keyWord; keyWord.value = options.keyWord;
}; };
if(options.order=='new'){
order.push_date='asc'
};
if(options.order=='read'){
order.read_num='desc'
};
if(options.order=='video'){
isArticle.value=false;
}
if(options.doctor_id){
doctor_id.value=options.doctor_id;
doctor_name.value=options.doctor_name
navName.value= doctor_name.value+'临床病例库'
getStaticDoctor(doctor_id.value)
}
if(options.hospital_id){
hospital_id.value=options.hospital_id;
hospital_name.value=options.hospital_name;
navName.value= hospital_name.value+'临床病例库'
getStaticDoctor(hospital_id.value)
}
}); });
const change=(e)=>{ const changetype1=(e)=>{
type1.value=e;
paging.value.reload();
}
const changetype2=(e)=>{
type2.value=e;
title2.value=options1.value[e-1].label;
paging.value.reload(); paging.value.reload();
} }
const formatdate=(date)=>{ const formatdate=(date)=>{
@ -148,29 +129,16 @@ const goDetail=(id)=>{
url: `/pages/detail/detail?id=${id}&type=${type}` url: `/pages/detail/detail?id=${id}&type=${type}`
}) })
} }
const swicthType=()=>{ const changeWord=(val)=>{
isArticle.value=!isArticle.value; keyWord.value=val;
dataList.value=[];
order.read_num='';
order.push_date='';
paging.value.reload(); paging.value.reload();
} }
const searchArticle =(params) => { const searchCollect=(params) => {
let searchForm={ let searchForm={
keyword: keyWord.value, keyword: keyWord.value,
doctor_id:doctor_id.value, type:type2.value,
hospital_id:hospital_id.value
} }
if(!order.read_num){ api.getMyCollect({
delete order.read_num
}
if(!order.push_date){
delete order.push_date
}
if(order.read_num || order.push_date){
searchForm.order=order
}
api.searchArticle({
...searchForm, ...searchForm,
...params ...params
}).then((res)=>{ }).then((res)=>{
@ -181,20 +149,14 @@ const searchArticle =(params) => {
}) })
} }
const searchVideo = async(params) => { const searchRead = async(params) => {
let searchForm={ let searchForm={
keyword: keyWord.value, keyword: keyWord.value,
type:type2.value,
} }
if(!order.read_num){
delete order.read_num api.getMyRead({
} ...searchForm,
if(!order.push_date){
delete order.push_date
}
if(order.read_num || order.push_date){
searchForm.order=order
}
api.searchVideo({
...params ...params
}).then((res)=>{ }).then((res)=>{
paging.value.complete(res.data.data.data); paging.value.complete(res.data.data.data);
@ -203,27 +165,14 @@ const searchVideo = async(params) => {
paging.value.complete(false); paging.value.complete(false);
}) })
} }
const getStaticDoctor=(id)=>{
api.getStaticDoctor(id).then((res)=>{
let result=res.data.data;
Object.assign(numInfo,result);
})
}
const getStaticHospital=(id)=>{
api.getStaticHospital(id).then((res)=>{
let result=res.data.data;
Object.assign(numInfo,result);
})
}
const queryList = (pageNo, pageSize) => { const queryList = (pageNo, pageSize) => {
console.log(666666);
const params = { const params = {
page: pageNo, page: pageNo,
page_size: pageSize, page_size: pageSize,
}; };
isArticle.value?searchArticle(params):searchVideo(params) type1.value==1?searchRead(params):searchCollect(params)
}; };
</script> </script>

View File

@ -35,30 +35,39 @@
<view class="title ellipsis">{{ <view class="title ellipsis">{{
isArticle ? item.article_title : item.video_title isArticle ? item.article_title : item.video_title
}}</view> }}</view>
<view class="tagsbox">
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{
tag.doctor_name
}}</view>
</view>
<view class="deal"> <view class="deal">
<view class="left">
<view class="recored">
<up--image
:src="certImg"
width="39rpx"
height="39rpx"
></up--image>
收录证书
</view>
</view>
<view class="time"> <view class="time">
<up-icon name="clock" color="#6B7280" size="28rpx"></up-icon> <up-icon name="clock" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{ formatdate(item.push_date) }}</view> <view class="num">{{ formatdate(item.push_date) }}</view>
</view> </view>
<view class="dot">...</view>
</view>
<view class="casecontent">
<view class="author">段钟平(首都医科大学附属北京佑安医院教授</view>
<view class="content">肝胆相照临床病例库肝胆相照临床病例库肝胆相照临床病例库肝胆相照临床病例库</view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
</view> </view>
<!-- 底部操作 -->
<up-popup
:zIndex="10"
:overlayStyle="{ zIndex: 9 }"
:closeOnClickOverlay="false"
:show="showDeal"
:round="10"
mode="bottom"
@close="closeDeal"
@open="openDeal"
>
<view class="dealbox">
<view class="dealcell">收藏</view>
<view class="dealcell">删除</view>
<view class="bar"></view>
<view class="dealcell" @click="closeDeal">取消</view>
</view>
</up-popup>
</template> </template>
<script setup> <script setup>
@ -84,6 +93,13 @@ const doctor_id = ref("");
const doctor_name = ref(""); const doctor_name = ref("");
const numInfo = reactive({}); const numInfo = reactive({});
const navName = ref("肝胆相照临床病例库"); const navName = ref("肝胆相照临床病例库");
const showDeal = ref(true);
const closeDeal=()=>{
showDeal.value = false;
};
const openDeal=()=>{
showDeal.value = true;
};
const options = ref([ const options = ref([
{ {
label: "正序", label: "正序",
@ -237,6 +253,22 @@ const queryList = (pageNo, pageSize) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bar {
width: 100%;
background: #f9fafb;
height: 20rpx;
}
.dealbox {
.dealcell {
display: flex;
align-items: center;
justify-content: center;
height: 112rpx;
font-size: 32rpx;
color: rgba(0, 0, 0, 0.9);
border-bottom: 2rpx solid #efefef;
}
}
.tabcon { .tabcon {
margin: 0 20rpx; margin: 0 20rpx;
} }
@ -302,6 +334,22 @@ const queryList = (pageNo, pageSize) => {
flex: none; flex: none;
margin-left: 60rpx; margin-left: 60rpx;
} }
.casecontent{
margin-top: 16rpx;
padding:24rpx 30rpx;
border-radius: 16rpx;
border: 2rpx solid #E5E7EB;
.author{
font-size: 26rpx;
color: #666666;
}
.content{
margin-top: 10rpx;
font-size: 30rpx;
color: #333333;
line-height: 46rpx;
}
}
.deal { .deal {
margin-top: 20rpx; margin-top: 20rpx;
display: flex; display: flex;
@ -327,6 +375,9 @@ const queryList = (pageNo, pageSize) => {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.dot{
font-size: 34rpx;
}
.time { .time {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -115,6 +115,17 @@
</view> </view>
</view> </view>
<view class="toolbox"> <view class="toolbox">
<view class="cell">
<u-upload
:fileList="imgList"
@afterRead="afterRead"
@delete="deletePic"
name="imgupload"
multiple
:maxCount="1"
width="32rpx"
height="32rpx"
>
<view class="cell"> <view class="cell">
<up--image <up--image
:src="photoImg" :src="photoImg"
@ -124,6 +135,20 @@
></up--image> ></up--image>
<view class="name">添加图片</view> <view class="name">添加图片</view>
</view> </view>
</u-upload>
</view>
<view class="cell">
<u-upload
:fileList="videoList"
@afterRead="afterRead"
accept="video"
name="videoupload"
multiple
maxDuration="3600"
:maxCount="1"
width="32rpx"
height="32rpx"
>
<view class="cell"> <view class="cell">
<up--image <up--image
:src="videoImg" :src="videoImg"
@ -133,6 +158,8 @@
></up--image> ></up--image>
<view class="name">添加视频</view> <view class="name">添加视频</view>
</view> </view>
</u-upload>
</view>
<view class="cell"> <view class="cell">
<up--image <up--image
:src="addImg" :src="addImg"
@ -143,6 +170,51 @@
<view class="name">添加小标题</view> <view class="name">添加小标题</view>
</view> </view>
</view> </view>
<view class="imgbox">
<view class="imgunit">
<up--image
src="https://cdn.uviewui.com/uview/album/1.jpg"
radius="6"
width="150rpx"
height="150rpx"
@click="previewImg"
></up--image>
<view class="close">
<up-icon name="close-circle" color="#666" size="18"></up-icon>
</view>
</view>
</view>
<view class="imgbox">
<view class="close">
<up-icon name="close-circle" color="red" size="30"></up-icon>
</view>
<video
class="myVideo"
src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
@error="videoErrorCallback"
controls
></video>
</view>
<view class="textcell" v-if="showMinTitle">
<view class="titlebox">
<view class="title">小标题</view>
<up-icon name="trash" color="#3CC7C0" size="24" @click="delTitle"></up-icon>
</view>
<view class="iptbox">
<up--textarea
maxlength="-1"
autoHeight
v-model="form.title"
placeholder="请输入小标题"
></up--textarea>
</view>
</view>
<!-- <view class="imgbox">
<view class="imgcell">
<up--image src="https://cdn.uviewui.com/uview/album/1.jpg" mode="widthFix"></up--image>
</view>
</view> -->
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
@ -161,9 +233,6 @@
<view class="right">发布</view> <view class="right">发布</view>
</view> </view>
<up-popup <up-popup
:round="10" :round="10"
:show="showVote" :show="showVote"
@ -214,7 +283,6 @@
></up-input> ></up-input>
</view> </view>
<view class="add"> <view class="add">
<up-icon name="plus" color="#4B5563" size="18"></up-icon> <up-icon name="plus" color="#4B5563" size="18"></up-icon>
<view class="desc">添加选项</view> <view class="desc">添加选项</view>
@ -227,15 +295,15 @@
<view class="plus">+</view> <view class="plus">+</view>
</view> </view>
</view> </view>
<view class="tips">友情提醒为保证投票结果准确性帖子发布后投票无法修改</view> <view class="tips"
>友情提醒为保证投票结果准确性帖子发布后投票无法修改</view
>
</view> </view>
<view class="confirm">确认</view> <view class="confirm">确认</view>
<view class="del">删除投票</view> <view class="del">删除投票</view>
</view> </view>
</up-popup> </up-popup>
<up-popup <up-popup
:round="10" :round="10"
zIndex="999999" zIndex="999999"
@ -245,28 +313,37 @@
@open="openDraft" @open="openDraft"
> >
<view class="draftpop"> <view class="draftpop">
<view class="titlebox">草稿箱 <view class="titlebox"
<view class="close" @click="closeDraft"><up-icon name="close" color="#4B5563" size="20"></up-icon></view> >草稿箱
<view class="close" @click="closeDraft"
><up-icon name="close" color="#4B5563" size="20"></up-icon
></view>
</view> </view>
<view class="draftlist"> <view class="draftlist">
<view class="cell"> <view class="cell">
<view class="title">2025: 肝硬化门静脉高压症食管胃底静脉曲张破裂出血诊治专家共识</view> <view class="title"
>2025:
肝硬化门静脉高压症食管胃底静脉曲张破裂出血诊治专家共识</view
>
<view class="smalltitle">版2025 APASL临床实践指南</view> <view class="smalltitle">版2025 APASL临床实践指南</view>
<view class="deal"> <view class="deal">
<view class="time">编辑于03-11</view> <view class="time">编辑于03-11</view>
<view class="right"> <view class="right">
<view class="del"><up-icon name="trash" color="#4B5563" size="16"></up-icon>删除</view> <view class="del"
<view class="edit"><up-icon name="edit-pen" color="#fff" size="17"></up-icon>编辑</view> ><up-icon name="trash" color="#4B5563" size="16"></up-icon
>删除</view
>
<view class="edit"
><up-icon name="edit-pen" color="#fff" size="17"></up-icon
>编辑</view
>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</up-popup> </up-popup>
</div> </div>
</template> </template>
<script setup> <script setup>
@ -283,6 +360,7 @@ const value = ref("");
const showVote = ref(false); const showVote = ref(false);
const showDraft = ref(true); const showDraft = ref(true);
const showMinTitle = ref(false);
const closeVote = () => { const closeVote = () => {
showVote.value = false; showVote.value = false;
}; };
@ -292,15 +370,48 @@ const openVote = () => {
const closeDraft = () => { const closeDraft = () => {
showDraft.value = false; showDraft.value = false;
}; };
const delTitle = () => {
showMinTitle.value = false;
};
const openDraft = () => { const openDraft = () => {
showDraft.value = true; showDraft.value = true;
}; };
const afterRead=(file) => {
}
const previewImg = () => {
uni.previewImage({
current: "https://example.com/image1.jpg",
urls: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
});
};
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.myVideo {
width: 100%;
border-radius: 15rpx;
}
.imgbox {
margin: 0 30rpx 30rpx;
position: relative;
.close {
position: absolute;
top: 0rpx;
right: 0;
z-index: 9999;
}
.imgunit {
width: 150rpx;
height: 150rpx;
position: relative;
.close {
position: absolute;
top: 0rpx;
right: 0;
}
}
}
.draftpop { .draftpop {
.titlebox { .titlebox {
text-align: center; text-align: center;
padding: 30rpx; padding: 30rpx;
@ -318,7 +429,7 @@ const openDraft = () => {
overflow-y: scroll; overflow-y: scroll;
.cell { .cell {
padding-bottom: 34rpx; padding-bottom: 34rpx;
border-bottom:2rpx solid #E5E7EB; border-bottom: 2rpx solid #e5e7eb;
.title { .title {
margin: 15rpx 30rpx 0; margin: 15rpx 30rpx 0;
font-size: 36rpx; font-size: 36rpx;
@ -338,7 +449,7 @@ const openDraft = () => {
align-items: center; align-items: center;
.time { .time {
font-size: 26rpx; font-size: 26rpx;
color: #9CA3AF; color: #9ca3af;
} }
.right { .right {
display: flex; display: flex;
@ -347,12 +458,12 @@ const openDraft = () => {
.del { .del {
width: 138rpx; width: 138rpx;
height: 62rpx; height: 62rpx;
background: #F3F4F6; background: #f3f4f6;
display: flex; display: flex;
border-radius: 20rpx; border-radius: 20rpx;
align-items: center; align-items: center;
font-size: 27rpx; font-size: 27rpx;
color: #4B5563; color: #4b5563;
justify-content: center; justify-content: center;
} }
.edit { .edit {
@ -363,8 +474,8 @@ const openDraft = () => {
width: 192rpx; width: 192rpx;
height: 62rpx; height: 62rpx;
font-size: 27rpx; font-size: 27rpx;
color: #FFFFFF; color: #ffffff;
background: #3CC7C0; background: #3cc7c0;
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
@ -394,7 +505,7 @@ const openDraft = () => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #F5F5F5; background: #f5f5f5;
border-radius: 50%; border-radius: 50%;
font-size: 50rpx; font-size: 50rpx;
} }
@ -405,7 +516,7 @@ const openDraft = () => {
justify-content: center; justify-content: center;
width: 62rpx; width: 62rpx;
height: 62rpx; height: 62rpx;
background: #F5F5F5; background: #f5f5f5;
border-radius: 50%; border-radius: 50%;
} }
} }
@ -415,7 +526,7 @@ const openDraft = () => {
margin-bottom: 23rpx; margin-bottom: 23rpx;
:deep(.u-input) { :deep(.u-input) {
background: #F5F5F5; background: #f5f5f5;
} }
:deep(.u-input--radius) { :deep(.u-input--radius) {
border-radius: 15rpx; border-radius: 15rpx;
@ -425,19 +536,18 @@ const openDraft = () => {
} }
} }
.first { .first {
margin-bottom: 47rpx; margin-bottom: 47rpx;
} }
.votepop { .votepop {
.confirm { .confirm {
margin: 39rpx 30rpx 0; margin: 39rpx 30rpx 0;
height: 92rpx; height: 92rpx;
background: #3CC7C0; background: #3cc7c0;
border-radius: 15rpx; border-radius: 15rpx;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 31rpx; font-size: 31rpx;
color: #FFFFFF; color: #ffffff;
justify-content: center; justify-content: center;
} }
.del { .del {
@ -454,7 +564,7 @@ const openDraft = () => {
.tips { .tips {
margin-top: 30rpx; margin-top: 30rpx;
font-size: 27rpx; font-size: 27rpx;
color: #9CA3AF; color: #9ca3af;
line-height: 38rpx; line-height: 38rpx;
padding: 0 30rpx; padding: 0 30rpx;
} }
@ -464,10 +574,10 @@ const openDraft = () => {
align-items: center; align-items: center;
height: 92rpx; height: 92rpx;
justify-content: center; justify-content: center;
background: #F5F5F5; background: #f5f5f5;
border-radius: 15rpx; border-radius: 15rpx;
font-size: 31rpx; font-size: 31rpx;
color: #4B5563; color: #4b5563;
.desc { .desc {
margin-left: 10rpx; margin-left: 10rpx;
} }
@ -626,6 +736,11 @@ const openDraft = () => {
.textcell { .textcell {
padding: 0 30rpx; padding: 0 30rpx;
margin-top: 25rpx; margin-top: 25rpx;
.titlebox {
display: flex;
align-items: center;
justify-content: space-between;
}
} }
.row { .row {

View File

@ -9,7 +9,7 @@
@query="queryList" @query="queryList"
> >
<template #top> <template #top>
<navBar :searchWord="keyWord" :navName="navName"></navBar> <navBarSearch :searchWord="keyWord" :navName="navName"></navBarSearch>
<view class="databox" v-if="hospital_id || doctor_id"> <view class="databox" v-if="hospital_id || doctor_id">
<view class="cell"> <view class="cell">
<view class="num">{{ numInfo.article_collect_num }}</view> <view class="num">{{ numInfo.article_collect_num }}</view>
@ -76,7 +76,7 @@
<script setup> <script setup>
import { ref, reactive } from "vue"; import { ref, reactive } from "vue";
import navBar from "@/components/navBar/navBar.vue"; import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging"; import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api"; import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";

View File

@ -9,7 +9,7 @@
@query="queryList" @query="queryList"
> >
<template #top> <template #top>
<navBarSearch :searchWord="keyWord" :navName="navName" :type="type"></navBarSearch> <navBarSearch :searchWord="keyWord" :navName="navName" :type="type" @changeWord="changeWord"></navBarSearch>
<!-- <view class="databox"> <!-- <view class="databox">
<view class="cell"> <view class="cell">
<view class="num">22</view> <view class="num">22</view>
@ -109,8 +109,14 @@ const order=reactive({
onLoad((options) => { onLoad((options) => {
if(options.type=='hospital'){ if(options.type=='hospital'){
type.value ='hospital'; type.value ='hospital';
navName.value='医院临床病例库' }
}; keyWord.value=options.name;
if(options.name){
navName.value=options.name+'临床病例库'
}
if((options.name='医生' || options.name=='医院') && !options.id){
keyWord.value='';
}
if(options.order=='new'){ if(options.order=='new'){
order.push_date='asc' order.push_date='asc'
}; };
@ -180,7 +186,7 @@ const searchVideo = async(params) => {
const searchHospital = async(params) => { const searchHospital = async(params) => {
let searchForm={ let searchForm={
keyword: keyWord.value, hospital_name: keyWord.value,
} }
if(!order.read_num){ if(!order.read_num){
delete order.read_num delete order.read_num
@ -192,6 +198,7 @@ const searchHospital = async(params) => {
searchForm.order=order searchForm.order=order
} }
api.searchHospital({ api.searchHospital({
...searchForm,
...params ...params
}).then((res)=>{ }).then((res)=>{
paging.value.complete(res.data.data.data); paging.value.complete(res.data.data.data);
@ -202,7 +209,7 @@ const searchHospital = async(params) => {
} }
const searchDoctor = async(params) => { const searchDoctor = async(params) => {
let searchForm={ let searchForm={
keyword: keyWord.value, doctor_name: keyWord.value,
} }
if(!order.read_num){ if(!order.read_num){
delete order.read_num delete order.read_num
@ -214,6 +221,7 @@ const searchDoctor = async(params) => {
searchForm.order=order searchForm.order=order
} }
api.searchDoctor({ api.searchDoctor({
...searchForm,
...params ...params
}).then((res)=>{ }).then((res)=>{
paging.value.complete(res.data.data.data); paging.value.complete(res.data.data.data);
@ -234,6 +242,18 @@ const goDetail=(id)=>{
url: `/pages/detail/detail?id=${id}&type=${type.value}`, url: `/pages/detail/detail?id=${id}&type=${type.value}`,
}); });
} }
const changeWord=(value)=>{
console.log(value);
if(value){
navName.value=value+'临床病例库';
keyWord.value=value;
dataList.value=[];
order.read_num='';
order.push_date='';
paging.value.reload();
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/collectOn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

BIN
static/comment_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB