提交 5a728f86 authored 作者: lihuihui's avatar lihuihui

修改状态

上级 ff000693
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
<!-- <div class="btn" @click="orderPays" style="font-size:30px;position: relative;z-index: 999;">支付</div> --> <!-- <div class="btn" @click="orderPays" style="font-size:30px;position: relative;z-index: 999;">支付</div> -->
<template v-if="data.type == 1"> <template v-if="data.type == 1">
<van-empty description="您还没有提交申请"/> <van-empty description="您还没有提交申请"/>
<div class="list-btn" @click="apply">申请三级认证</div>
</template> </template>
<template v-if="data.type == 2"> <template v-if="data.type == 2">
<van-empty description="数据已过期,请等待下次统一办理。"/> <van-empty v-if="data.list.length == 0" description="数据已过期,请等待下次统一办理。"/>
</template> </template>
<div class="list-btn" @click="apply" v-if="isTimeFlag">申请三级认证</div>
<h5-pay :productId="productId" ref="h5pay"></h5-pay> <h5-pay :productId="productId" ref="h5pay"></h5-pay>
</div> </div>
</template> </template>
...@@ -58,7 +58,8 @@ export default { ...@@ -58,7 +58,8 @@ export default {
data() { data() {
return { return {
productId: '6734697826573352960', productId: '6734697826573352960',
data: {} data: {},
isTimeFlag: false
} }
}, },
mounted() { mounted() {
...@@ -144,6 +145,7 @@ export default { ...@@ -144,6 +145,7 @@ export default {
getStatus() { getStatus() {
api.getAttestationStatus().then(response => { api.getAttestationStatus().then(response => {
this.data = response this.data = response
this.isTimeFlag = this.isTime(response.start_date, response.end_date)
}) })
}, },
backEdit() { backEdit() {
...@@ -153,6 +155,22 @@ export default { ...@@ -153,6 +155,22 @@ export default {
this.$router.push({ this.$router.push({
path: '/attestation/form' path: '/attestation/form'
}) })
},
isTime(sT, eT) {
const dateBegin = new Date(sT)
const dateEnd = new Date(eT)
const dateNow = new Date()
const beginDiff = dateNow.getTime() - dateBegin.getTime()
const beginDayDiff = Math.floor(beginDiff / (24 * 3600 * 1000))
const endDiff = dateEnd.getTime() - dateNow.getTime()
const endDayDiff = Math.floor(endDiff / (24 * 3600 * 1000))
if (endDayDiff < 0) {
return false
}
if (beginDayDiff < 0) {
return false
}
return true
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论