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