first commit
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card {
|
||||
margin: 10px 10px;
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''">
|
||||
<div class="list-card" @click="openContribution(o)" v-for="o in isNullTypeCodeData">
|
||||
<van-cell-group>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
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>
|
||||
<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>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-for="o in contributionTypeData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
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}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between">
|
||||
<van-col span="24">
|
||||
子项目数:
|
||||
<sapn style="color: red">{{o.sonNum}}</sapn>
|
||||
个
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
isNullTypeCodeData: [],
|
||||
contributionTypeData: [],
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.contributionTypeCode == null && data.sonNum == 0) {
|
||||
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
|
||||
} else {
|
||||
this.$toast('暂无项目');
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
async isNullTypeCodePageData() {
|
||||
const {data} = await $.post("/mobile/contribution/isNullTypeCodePageData")
|
||||
data.forEach(v => {
|
||||
v.sonNum = 0
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.isNullTypeCodeData = data
|
||||
},
|
||||
async pageData() {
|
||||
await this.isNullTypeCodePageData()
|
||||
const {data} = await $.get("/mobile/contribution/getContributionTypeData")
|
||||
data.forEach(v => {
|
||||
v.contributionTypeCode = v.typeCode
|
||||
v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles)
|
||||
})
|
||||
this.contributionTypeData = data
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--#
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bth {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
height: 45px;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.van-tag--large {
|
||||
height: 30px;
|
||||
width: 60px;
|
||||
font-size: 25px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
margin: 10px 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
</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-form @submit="onSubmit">
|
||||
|
||||
<van-cell-group>
|
||||
<van-row type="flex" gutter="20">
|
||||
<van-col span="8" v-for="key in moneyData" @click="dateClick(key)"
|
||||
style="text-align: center;border-radius: 20px;">
|
||||
<van-tag :plain="activeDate!=key" size="large" type="primary">
|
||||
<div style="position: absolute;left: 0;right: 0">{{key}}</div>
|
||||
</van-tag>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<div class="van-hairline--top">
|
||||
<van-field v-model="formData.money" label="捐赠金额" type="number" input-align="right"
|
||||
placeholder="请输入捐赠金额" @input="moneyInput">
|
||||
<template #button>
|
||||
元
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-field v-model="formData.username" label="真实姓名:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.loginname" label="真实工号:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.mobile" label="联系电话:" input-align="right"
|
||||
placeholder="请输入手机号或电话号">
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
<van-radio-group v-model="formData.payMode">
|
||||
<van-cell-group>
|
||||
<van-cell title="微信支付" clickable @click="formData.payMode = 'WeChat'"
|
||||
icon="/assets/mobile/svg/wx.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="WeChat"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="支付宝支付" clickable @click="formData.payMode = 'Alipay'"
|
||||
icon="/assets/mobile/svg/zfb.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="Alipay"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
|
||||
<van-cell-group>
|
||||
<van-field name="files" label="捐款凭证" required style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">捐款凭证</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.contributionFiles"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<div class="bth">
|
||||
<van-row style="display: flex;padding-left: 15px;" type="flex" justify="space-between">
|
||||
<van-col span="16" style="align-self:center;">合计:
|
||||
<sapn style="color: red">{{formData.money?formData.money:0}}</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="8" style="align-self:center;padding-right: 20px;">
|
||||
<van-button plain type="info" style="float: right;border-radius: 15px;"
|
||||
:color="themeColor">确认捐款
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activeDate: null,
|
||||
moneyData: {
|
||||
70: 70,
|
||||
700: 700,
|
||||
7000: 7000,
|
||||
1952: 1952,
|
||||
1975: 1975,
|
||||
1987: 1987,
|
||||
},
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dateClick(key) {
|
||||
this.activeDate = key
|
||||
this.formData.money = key
|
||||
|
||||
},
|
||||
moneyInput(val) {
|
||||
this.$set(this.formData, "money", val)
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.money) {
|
||||
this.$toast.fail('捐赠金额不能为空');
|
||||
return
|
||||
}
|
||||
if (!this.formData.contributionFiles) {
|
||||
this.$toast.fail('捐赠凭证不能为空');
|
||||
return
|
||||
}
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '请确认',
|
||||
message: '确认要为' + this.formData.contributionName + '捐款吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post("/mobile/contribution/doContributionApply", {contributionApply: JSON.stringify(this.formData)})
|
||||
if (data.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '捐赠成功,已收到您为“' + this.formData.contributionName + '”捐赠的善款',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
window.history.back()
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async init(id) {
|
||||
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
||||
this.formData = {
|
||||
contributionId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
payMode: "WeChat",
|
||||
money: null,
|
||||
contributionName: data.contributionName,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
this.init(id)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.backdrop {
|
||||
width: 100%;
|
||||
height: 170px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
margin-left: 10px;
|
||||
height: 70px;
|
||||
|
||||
}
|
||||
|
||||
.typeName .typeNameLabel {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.typeName .typeNameContent {
|
||||
font-size: 15px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
height: 130px;
|
||||
}
|
||||
</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 style=" background-color:#ffffff;">
|
||||
<van-image
|
||||
class="backdrop"
|
||||
fit="cover"
|
||||
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + typeData.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
<div class="typeName">
|
||||
<div class="typeNameLabel">{{typeData.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-multi-ellipsis--l2 typeNameContent">
|
||||
{{removeHTMLTag(typeData.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished">
|
||||
<div v-for="o in sonData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
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>
|
||||
<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>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sonData: [],
|
||||
typeData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
},
|
||||
async pageData(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/pageData", {typeCode: typeCode})
|
||||
data.forEach(v => {
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.sonData = data
|
||||
},
|
||||
async getTypeByCode(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/getTypeByCode", {typeCode: typeCode})
|
||||
this.typeData = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const typeCode = this.GetQueryString("typeCode")
|
||||
this.pageData(typeCode)
|
||||
this.getTypeByCode(typeCode)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user