Files
2026-09-08 19:49:21 +08:00

110 lines
3.6 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<style>
.list-card {
position: relative;
margin: 10px;
background-color: #fff;
border-radius: 6px;
box-shadow: 0 8px 12px #ebedf0;
width: auto;
}
.list-card > .content {
padding: 16px 10px;
display: flex;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="惠民服务" left-arrow placeholder fixed
@click-left="history.back()"></van-nav-bar>
<van-search
v-model="pageForm.projectName"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入项目名称查询"
></van-search>
<template>
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0"
v-model="mLoading"
@load="pageData">
<template v-for="o in tableData">
<div class="list-card" style="background-color: #FFFFFF;border-radius: 6px;">
<van-card @click="showGoods(o)" class="content">
<template #thumb>
<img :src="CREATE_PREVIEW_URL(o.cover)"
@click="preview(o.cover,o.cover)"
class="van-image__img">
</template>
<template #title>
<div class="van-ellipsis"
style="font-size: 15px;font-weight: bold;line-height: 30px;">
{{o.projectName}}
</div>
</template>
<template #desc>
<div>
<template>
<div>
年度:{{o.year}}
</div>
<div style="flex: 1.5">
创建时间:
{{moment(o.createTime).format('YYYY/MM/DD HH:mm')}}
</div>
</template>
</div>
</template>
</van-card>
</div>
</template>
</van-list>
</template>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
pageForm:{},
}
},
methods: {
async pageData() {
this.mLoading = true
const resp = await $.post('/mobile/benefiting/pageData', this.pageForm)
if (resp.code === 0) {
this.tableData = this.tableData.concat(resp.data.list)
if (this.tableData.length === resp.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.mLoading = false
},
async showGoods(o){
window.location.href='/mobile/benefiting/goods?projectId=' + o.id
}
},
created(){
this.pageData();
},
});
</script>
<!--#
}
#-->