|
@@ -8,6 +8,9 @@
|
|
|
<span style="color: #1890ff">推荐</span>
|
|
<span style="color: #1890ff">推荐</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <a-spin :spinning="spinning">
|
|
|
|
|
+ <a-empty v-if="recommendations.length <= 0" />
|
|
|
|
|
+ </a-spin>
|
|
|
<div
|
|
<div
|
|
|
v-for="(item, index) in recommendations"
|
|
v-for="(item, index) in recommendations"
|
|
|
:key="index"
|
|
:key="index"
|
|
@@ -20,8 +23,8 @@
|
|
|
:style="{
|
|
:style="{
|
|
|
backgroundSize: 'cover',
|
|
backgroundSize: 'cover',
|
|
|
backgroundPosition: 'center',
|
|
backgroundPosition: 'center',
|
|
|
- borderRadius:'4px',
|
|
|
|
|
- overflow:'hidden',
|
|
|
|
|
|
|
+ borderRadius: '4px',
|
|
|
|
|
+ overflow: 'hidden',
|
|
|
backgroundImage:
|
|
backgroundImage:
|
|
|
'url(' +
|
|
'url(' +
|
|
|
(item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
(item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
@@ -30,7 +33,7 @@
|
|
|
')'
|
|
')'
|
|
|
}"
|
|
}"
|
|
|
></div>
|
|
></div>
|
|
|
- <div style="display: flex; flex-direction: column; justify-content: space-between; margin-left: 10px;flex:1;">
|
|
|
|
|
|
|
+ <div style="display: flex; flex-direction: column; justify-content: space-between; margin-left: 10px; flex: 1">
|
|
|
<span style="font-weight: bold; margin-top: 5px" class="single-line">{{ item.fileName }}</span>
|
|
<span style="font-weight: bold; margin-top: 5px" class="single-line">{{ item.fileName }}</span>
|
|
|
<div style="display: flex; justify-content: space-between; align-items: space-between">
|
|
<div style="display: flex; justify-content: space-between; align-items: space-between">
|
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
@@ -63,30 +66,22 @@
|
|
|
current: 1,
|
|
current: 1,
|
|
|
size: 6
|
|
size: 6
|
|
|
})
|
|
})
|
|
|
- const recommendations = ref([
|
|
|
|
|
- // { id: '1', title: '资源名称', time: '05-22', look: '10000' },
|
|
|
|
|
- // { id: '2', title: '资源名称', time: '05-22', look: '10000' },
|
|
|
|
|
- // { id: '3', title: '资源名称', time: '05-22', look: '10000' },
|
|
|
|
|
- // { id: '4', title: '资源名称', time: '05-22', look: '10000' },
|
|
|
|
|
- // { id: '5', title: '资源名称', time: '05-22', look: '10000' },
|
|
|
|
|
- // { id: '6', title: '资源名称', time: '05-22', look: '10000' }
|
|
|
|
|
- ])
|
|
|
|
|
|
|
+ const recommendations = ref([])
|
|
|
|
|
+ const spinning = ref(false)
|
|
|
|
|
|
|
|
// 更多数据...
|
|
// 更多数据...
|
|
|
|
|
|
|
|
const getList = () => {
|
|
const getList = () => {
|
|
|
|
|
+ spinning.value = true
|
|
|
list(currentPage)
|
|
list(currentPage)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
recommendations.value = res.data.records
|
|
recommendations.value = res.data.records
|
|
|
currentPage.current = res.data.current
|
|
currentPage.current = res.data.current
|
|
|
- // "size": 20,
|
|
|
|
|
- // "current": 1,
|
|
|
|
|
- // "pages": 1
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
- console.log(err)
|
|
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ spinning.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|