148 lines
4.2 KiB
HTML
148 lines
4.2 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.bth {
|
|
bottom: 10px;
|
|
width: 90%;
|
|
position: fixed;
|
|
transform: translateX(-50%);
|
|
left: 50%;
|
|
}
|
|
|
|
.backdrop {
|
|
width: 100%;
|
|
height: 170px;
|
|
}
|
|
|
|
.typeName {
|
|
margin-left: 10px;
|
|
height: 70px;
|
|
|
|
}
|
|
|
|
.typeName .typeNameLabel {
|
|
font-size: 17px;
|
|
font-weight: bold;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.con-col {
|
|
text-align: center;
|
|
}
|
|
|
|
.con-introduce {
|
|
border-top-left-radius: 30px;
|
|
border-top-right-radius: 30px;
|
|
margin-top: 10px;
|
|
margin-bottom: 50px;
|
|
padding-bottom: 10px;
|
|
height: calc(100% - 250px);
|
|
background-color: #ffffff
|
|
}
|
|
|
|
|
|
</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>
|
|
<div>
|
|
<div style="background-color:#ffffff;">
|
|
<van-image
|
|
class="backdrop"
|
|
fit="cover"
|
|
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.contributionFiles[0].id"
|
|
></van-image>
|
|
<div class="typeName">
|
|
<div class="typeNameLabel">{{viewData.contributionName}}</div>
|
|
<van-row>
|
|
<van-col span="12" class="con-col">
|
|
<div>已筹</div>
|
|
<div style="color: red">{{viewData.totalMoney?viewData.totalMoney:0}}</div>
|
|
</van-col>
|
|
<van-col span="12" class="con-col">
|
|
<div>人次</div>
|
|
<div style="color: red">{{viewData.totalUser}}</div>
|
|
</van-col>
|
|
</van-row>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="con-introduce">
|
|
<van-cell-group style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
|
<van-cell style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
|
<template #title>
|
|
<span class="custom-title">项目介绍</span>
|
|
<span v-if="viewData.contributionMode==='sdc'" style="color: red">(捐款方式为水滴筹将直接跳转放到相应页面)</span>
|
|
</template>
|
|
</van-cell>
|
|
|
|
</van-cell-group>
|
|
<div v-html="viewData.contributionIntroduce"
|
|
style="margin: 15px;white-space: pre-wrap;word-break: break-word;"></div>
|
|
|
|
|
|
</div>
|
|
<div style="position: fixed;width: 100%;bottom: 0px;height: 60px">
|
|
<van-button type="info" class="bth" block round @click="doContribution"
|
|
v-if="viewData.isContributionEnable" :color="themeColor">我要捐款
|
|
</van-button>
|
|
<van-button type="info" class="bth" block round
|
|
v-if="!viewData.isContributionEnable">暂未开放
|
|
</van-button>
|
|
</div>
|
|
<!-- <van-row>
|
|
<van-col span="24">
|
|
|
|
</van-col>
|
|
|
|
</van-row>-->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
viewData: {}
|
|
}
|
|
},
|
|
methods: {
|
|
doContribution() {
|
|
if (this.viewData.contributionMode === 'sdc') {
|
|
window.location.href = this.viewData.contributionUrl
|
|
} else {
|
|
window.location.href = '/mobile/contribution/doContribution?id=' + this.viewData.id
|
|
}
|
|
},
|
|
async getContributionById(id) {
|
|
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
|
data.contributionFiles = JSON.parse(data.contributionFiles)
|
|
this.viewData = data
|
|
}
|
|
},
|
|
created() {
|
|
const id = this.GetQueryString("id")
|
|
this.getContributionById(id)
|
|
}
|
|
})
|
|
</script>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#-->
|