|
|
|
@ -47,7 +47,7 @@ |
|
|
|
|
<el-col :span="18"> |
|
|
|
|
<template v-if="docList.length===0"> |
|
|
|
|
<el-alert |
|
|
|
|
:title="tip" |
|
|
|
|
:title="$t('document.tip.doc_empty')" |
|
|
|
|
type="success" |
|
|
|
|
:closable="false" |
|
|
|
|
center> |
|
|
|
@ -82,15 +82,20 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="5" class="ml3"> |
|
|
|
|
<el-row> |
|
|
|
|
<h1 class="center">{{$t('today_recommend')}}</h1> |
|
|
|
|
<h1 class="center">{{$t('new_recommend')}}</h1> |
|
|
|
|
</el-row> |
|
|
|
|
<div class="recommend-list"> |
|
|
|
|
|
|
|
|
|
<el-row v-for="(item,index) in recommend_list" :key="index"> |
|
|
|
|
<h3 class="center doc-title">{{item.title}}</h3> |
|
|
|
|
<p class="doc-summary">{{item.summary}}</p> |
|
|
|
|
</el-row> |
|
|
|
|
<div class="recommend-list"v-if="recommend_list.length>0"> |
|
|
|
|
<el-row v-for="(item,index) in recommend_list" :key="index"> |
|
|
|
|
<h3 class="center doc-title"><a @click="read(item)">《{{item.title}}》</a></h3> |
|
|
|
|
<p class="doc-summary">{{item.summary}}</p> |
|
|
|
|
</el-row> |
|
|
|
|
</div> |
|
|
|
|
<el-alert v-else |
|
|
|
|
:title="$t('document.tip.recommend_empty')" |
|
|
|
|
type="success" |
|
|
|
|
:closable="false" |
|
|
|
|
center> |
|
|
|
|
</el-alert> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-pagination |
|
|
|
@ -123,7 +128,6 @@ |
|
|
|
|
activeNames: [], |
|
|
|
|
docList: [], |
|
|
|
|
recommend_list: [], |
|
|
|
|
tip: this.$t('document.tip.empty'), |
|
|
|
|
total:1 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -150,10 +154,17 @@ |
|
|
|
|
} |
|
|
|
|
loadingInstance.close() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
recommend(){ |
|
|
|
|
let that=this |
|
|
|
|
this.GLOBAL.fetchGet('/v1/api/paper/recommend',{},function(res) { |
|
|
|
|
that.recommend_list=res.data |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.query() |
|
|
|
|
this.recommend() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
@ -174,4 +185,8 @@ |
|
|
|
|
.recommend-list { |
|
|
|
|
overflow-y: scroll; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
a{ |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|