|
|
@ -14,7 +14,7 @@ |
|
|
|
<span>{{ actDetail.address }}</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<div class="policy-content" v-dompurify-html="actDetail.content"></div> |
|
|
|
<div class="policy-content" v-dompurify-html="content"></div> |
|
|
|
<a-button disabled style="margin: 50px 25px" v-if="actDetail.releaseTime && Date.parse(actDetail.releaseTime) < Date.parse(nowData)"> |
|
|
|
报名已结束 |
|
|
|
</a-button> |
|
|
@ -30,12 +30,16 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { detail } from 'config/api'; |
|
|
|
import Enroll from './components/Enroll.vue'; |
|
|
|
export default { |
|
|
|
name: 'ActDetails', |
|
|
|
components: { Enroll }, |
|
|
|
data() { |
|
|
|
return { nowData: '' }; |
|
|
|
return { |
|
|
|
nowData: '', |
|
|
|
content: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: mapState('home', ['actDetail']), |
|
|
|
created() { |
|
|
@ -55,8 +59,27 @@ export default { |
|
|
|
':' + |
|
|
|
aData.getSeconds(); |
|
|
|
console.log(this.nowData); //2019-8-20 |
|
|
|
this.getDetail() |
|
|
|
console.log(this.actDetail) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取活动公告列表 |
|
|
|
async getDetail() { |
|
|
|
try { |
|
|
|
console.log(this.actDetail.activityId) |
|
|
|
const params = {param: {activityId: this.actDetail.activityId,},}; |
|
|
|
const res = await detail(params); |
|
|
|
const { data, msg, code } = res.data; |
|
|
|
if (code === 200) { |
|
|
|
// const { actDetail } = this.actDetail |
|
|
|
this.content = data.content |
|
|
|
// this.actDetail= {...actDetail} |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: {}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|