移动端返回
This commit is contained in:
@@ -44,15 +44,12 @@ layout("/mobile/platform.html"){
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card {
|
||||
margin: 10px 10px;
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
@@ -61,20 +58,11 @@ layout("/mobile/platform.html"){
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
</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()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<van-nav-bar title="慈善捐款项目" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''">
|
||||
@@ -84,24 +72,19 @@ layout("/mobile/platform.html"){
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.contributionName}}</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionIntroduce)}}
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">{{removeHTMLTag(o.contributionIntroduce)}}</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between"
|
||||
style="white-space: nowrap">
|
||||
<van-row type="flex" justify="space-between" style="white-space: nowrap">
|
||||
<van-col span="12">
|
||||
已筹:
|
||||
<sapn style="color: red">
|
||||
{{o.totalMoney?o.totalMoney:0}}
|
||||
</sapn>
|
||||
<sapn style="color: red">{{o.totalMoney?o.totalMoney:0}}</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
@@ -111,10 +94,8 @@ layout("/mobile/platform.html"){
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
@@ -125,18 +106,17 @@ layout("/mobile/platform.html"){
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionTypeFiles[0].id"
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.typeName}}
|
||||
<div class="r-title">
|
||||
{{o.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">{{removeHTMLTag(o.contributionTypeIntroduce)}}</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between">
|
||||
<van-col span="24">
|
||||
@@ -146,25 +126,25 @@ layout("/mobile/platform.html"){
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.length==0"
|
||||
class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.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 {
|
||||
@@ -175,30 +155,29 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
const time = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
this.$toast(data.contributionStartTime + "开始捐款")
|
||||
return
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
this.$toast("捐款在" + data.contributionEndTime + "结束")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (data.contributionTypeCode == null && data.sonNum == 0) {
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
window.location.href = "/mobile/contribution/view/contributionView?id=" + data.id
|
||||
} else if (data.sonNum > 0 && data.typeCode) {
|
||||
window.location.href = '/mobile/contribution/son/sonList?typeCode=' + data.typeCode
|
||||
window.location.href = "/mobile/contribution/son/sonList?typeCode=" + data.typeCode
|
||||
} else {
|
||||
this.$toast('暂无项目');
|
||||
this.$toast("暂无项目")
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
async isNullTypeCodePageData() {
|
||||
const {data} = await $.post("/mobile/contribution/isNullTypeCodePageData")
|
||||
data.forEach(v => {
|
||||
const { data } = await $.post("/mobile/contribution/isNullTypeCodePageData")
|
||||
data.forEach((v) => {
|
||||
v.sonNum = 0
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
@@ -206,8 +185,8 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async pageData() {
|
||||
await this.isNullTypeCodePageData()
|
||||
const {data} = await $.get("/mobile/contribution/getContributionTypeData")
|
||||
data.forEach(v => {
|
||||
const { data } = await $.get("/mobile/contribution/getContributionTypeData")
|
||||
data.forEach((v) => {
|
||||
v.contributionTypeCode = v.typeCode
|
||||
v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles)
|
||||
})
|
||||
@@ -221,7 +200,6 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user