This commit is contained in:
2025-12-31 10:14:34 +08:00
@@ -403,10 +403,12 @@ layout("/layouts/platform_h5.html"){
methods: { methods: {
init() { init() {
if (this.id) { if(!this.id) return
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => { this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id})
.then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.viewData = res.data this.viewData = res.data
this.checkScope(this.viewData.groupId)
//总人数限制 //总人数限制
if (this.viewData.userNumberLimit === 1) { if (this.viewData.userNumberLimit === 1) {
} else if (this.viewData.userNumberLimit === 2) { } else if (this.viewData.userNumberLimit === 2) {
@@ -425,7 +427,6 @@ layout("/layouts/platform_h5.html"){
} }
} }
}) })
}
}, },
//查询报名人员 //查询报名人员
listTeamUser() { listTeamUser() {
@@ -764,14 +765,13 @@ layout("/layouts/platform_h5.html"){
//移除队友 //移除队友
removeTeamUser(index) { removeTeamUser(index) {
this.teamUsers.splice(index, 1) this.teamUsers.splice(index, 1)
} },
},
created() { checkScope(groupId) {
this.$axios.post('/platform/activity/basic/scope/getScopeUser', {activityGroupId: Number(GetQueryString("groupId"))}).then(res => { this.$axios.post('/platform/activity/basic/scope/getScopeUser', {
if (res.code === 0) { activityGroupId: Number(groupId)
if (res.data > 0) { }).then(res => {
this.init() if (res.data === 0) {
} else {
this.$dialog.alert({ this.$dialog.alert({
title: '标题', title: '标题',
message: '您没有权限参加此活动', message: '您没有权限参加此活动',
@@ -780,10 +780,11 @@ layout("/layouts/platform_h5.html"){
this.$pjaxReplace("/platform/home") this.$pjaxReplace("/platform/home")
}); });
} }
} })
}) },
},
created() {
this.init()
} }
}) })
</script> </script>