6.9
This commit is contained in:
+58
-26
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<view class="upage">
|
||||
<navBar></navBar>
|
||||
<navBar :navName="'肝胆相照病例交流园地'" :type="'caseTalk'"></navBar>
|
||||
<view class="databox">
|
||||
<view class="cell">
|
||||
<view class="num">11</view>
|
||||
<view class="name">文章</view>
|
||||
<view class="num">{{ numInfo.exchange_collect_num}}</view>
|
||||
<view class="name">病例数</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<view class="num">22</view>
|
||||
<view class="name">视频</view>
|
||||
<view class="num">{{ numInfo.exchange_num }}</view>
|
||||
<view class="name">互动数</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<view class="num">333</view>
|
||||
<view class="name">阅读量</view>
|
||||
<view class="num">{{ numInfo.exchange_read_num }}</view>
|
||||
<view class="name">浏览量</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar"></view>
|
||||
@@ -20,33 +20,33 @@
|
||||
<view class="special">
|
||||
<view class="titlebox">
|
||||
<view class="title">精选病例</view>
|
||||
<view class="more" @click="goList">
|
||||
<view class="more" @click="goList('read')">
|
||||
<view class="morename">查看更多</view>
|
||||
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<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="title">肝胆相照临床病例库肝胆相照临床病例库</view>
|
||||
<view class="title">{{ item.article_title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar"></view>
|
||||
<view class="record">
|
||||
<view class="titlebox">
|
||||
<view class="title">精选病例</view>
|
||||
<view class="more" @click="goList">
|
||||
<view class="title">最新收录</view>
|
||||
<view class="more" @click="goList('mew')">
|
||||
<view class="morename">查看更多</view>
|
||||
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="cell">
|
||||
<view class="title">肝胆相照临床病例库肝胆相照临床病例库肝胆</view>
|
||||
<view class="doctor">
|
||||
<view class="cell" v-for="item in new_articles" :key="item.article_id">
|
||||
<view class="title">{{ item.article_title }}</view>
|
||||
<view class="doctor" v-for="cell in item.autor">
|
||||
<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 class="content">
|
||||
嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX
|
||||
@@ -82,20 +82,20 @@
|
||||
<view class="left">
|
||||
<view class="eyebox item">
|
||||
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
|
||||
<view class="num">11</view>
|
||||
<view class="num">{{ item.read_num }}</view>
|
||||
</view>
|
||||
<view class="collect item">
|
||||
<up-icon name="heart" color="#4B5563" size="28rpx"></up-icon>
|
||||
<view class="num">22</view>
|
||||
<up-icon :name="item.is_collect?'heart-fill':'heart'" :color="item.is_collect?'red':'#4B5563'" size="28rpx"></up-icon>
|
||||
<view class="num">{{item.collect_num }}</view>
|
||||
</view>
|
||||
<view class="chat item">
|
||||
<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 class="time">
|
||||
<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>
|
||||
@@ -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();
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
||||
Reference in New Issue
Block a user