移动端返回
This commit is contained in:
@@ -18,45 +18,31 @@ layout("/mobile/platform.html"){
|
||||
</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>
|
||||
<van-nav-bar title="惠民服务" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></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">
|
||||
<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;">
|
||||
<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">
|
||||
<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>
|
||||
<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>
|
||||
<div>年度:{{o.year}}</div>
|
||||
<div style="flex: 1.5">创建时间: {{moment(o.createTime).format('YYYY/MM/DD HH:mm')}}</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -65,26 +51,21 @@ layout("/mobile/platform.html"){
|
||||
</template>
|
||||
</van-list>
|
||||
</template>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm:{},
|
||||
pageForm: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/benefiting/pageData', this.pageForm)
|
||||
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) {
|
||||
@@ -95,14 +76,14 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
async showGoods(o){
|
||||
window.location.href='/mobile/benefiting/goods?projectId=' + o.id
|
||||
async showGoods(o) {
|
||||
window.location.href = "/mobile/benefiting/goods?projectId=" + o.id
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user