Files
2026-09-08 19:49:21 +08:00

150 lines
5.4 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<style>
.register-icon {
position: absolute;
bottom: 8px;
right: 16px;
z-index: 1;
}
.list-card > .van-cell-group {
position: relative;
}
.list-card .van-cell {
padding: 3px 16px;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="报名详情" left-arrow placeholder fixed
@click-left="history.back()"></van-nav-bar>
<div style="margin: 20px auto 0 auto">
<div v-for="o in tableData" class="list-card">
<van-cell-group inset>
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
@click="openActivity(o)"
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
<van-cell :border="false" title="项目名称">
<span class="van-ellipsis" style="font-size: 16px;"
:style="{color:themeColor}">
{{o.allName}}
</span>
</van-cell>
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
<span v-else>暂无</span>
</van-cell>
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
<span v-else>暂无</span>
</van-cell>
<van-cell :border="false" title="已报名人数">
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
<span v-else>0人</span>
</van-cell>
</van-cell-group>
</div>
</div>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
activityId: '',
o: {},
projectInfo: null
}
},
methods: {
async getActivityInfo() {
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
if (resp.code === 0) {
this.o = resp.data
this.$nextTick(() => {
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
})
}
},
async getSchoolActivityProjectInfoByMine() {
const resp = await $.get('/mobile/activity/myActivity/getSchoolActivityProjectInfoByMine', {activityId: this.activityId})
if (resp.code === 0) {
this.projectInfo = resp.data
}
},
async getHasRegEventProject() {
const resp = await $.get('/platform/activity/apply/pageData', this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
}
},
async openActivity(o) {
const {
applyType,
eventId,
activityId,
projectType,
userApply,
applyNum,
name,
activityGroupId,
restrictRegNumber
} = o
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '确定取消此次报名吗?',
})
if (confirm === 'confirm') {
const loading = this.$toast.loading({
message: '取消中...',
forbidClick: true,
overlay: true,
duration: 0
})
const resp = await $.get("/platform/activity/apply/doDeleteApply", {
userId: "${@shiro.getPrincipalProperty('id')}",
activityId: activityId,
eventId: eventId
})
loading.close()
if (resp.code === 0) {
this.$toast.success('取消成功')
this.getHasRegEventProject()
}
}
}
},
created() {
const id = GetQueryString("id")
if (id) {
this.$set(this.pageForm, 'isAudit', 'true')
this.$set(this.pageForm, 'activityId', id)
this.$set(this.pageForm, 'pageSize', 100)
this.activityId = id
this.getActivityInfo()
this.getHasRegEventProject()
}
}
})
</script>
<!--#
}
#-->