|
|
|
@ -4,9 +4,13 @@
|
|
|
|
|
<MyInput v-model="queryParams.name" @clickSearch="handleSearch" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<ul class="book-main" :style="{ height: tableHeigth + 'px' }">
|
|
|
|
|
<li v-for="item in certificatesList" :key="item.id">
|
|
|
|
|
<div class="integral-num">50</div>
|
|
|
|
|
<ul class="book-main" :style="listStyle">
|
|
|
|
|
<li
|
|
|
|
|
v-for="(item, index) in certificatesList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:style="{ marginBottom: isLastRow(index) ? '0px' : '' }"
|
|
|
|
|
>
|
|
|
|
|
<div class="integral-num">积分:50</div>
|
|
|
|
|
<el-image
|
|
|
|
|
style="width: 100%; height: 87%"
|
|
|
|
|
:src="baseUrl + item.cover"
|
|
|
|
@ -25,7 +29,6 @@
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<pagination
|
|
|
|
|
layout="total, prev, pager, next, jumper"
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
@ -40,9 +43,12 @@ import { listCertificates } from "@/api/volunteer/gxhzs/gxhzsgl/index.js";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
listStyle: {
|
|
|
|
|
height: 0,
|
|
|
|
|
overflowY: "auto",
|
|
|
|
|
},
|
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
|
certificatesList: [],
|
|
|
|
|
tableHeigth: 0,
|
|
|
|
|
loading: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 0,
|
|
|
|
@ -58,12 +64,21 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
// //给表格一个固定值
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.tableHeigth =
|
|
|
|
|
this.$refs.main.offsetHeight - 40 - this.$refs.search.offsetHeight - 42;
|
|
|
|
|
this.listStyle.height =
|
|
|
|
|
this.$refs.main.offsetHeight -
|
|
|
|
|
40 -
|
|
|
|
|
this.$refs.search.offsetHeight -
|
|
|
|
|
42 +
|
|
|
|
|
"px";
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
isLastRow(index) {
|
|
|
|
|
const rowCount = Math.ceil(this.certificatesList.length / 5);
|
|
|
|
|
const row = Math.floor(index / 5);
|
|
|
|
|
return row === rowCount - 1;
|
|
|
|
|
},
|
|
|
|
|
/**兑换 */
|
|
|
|
|
conversion(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|