diff --git a/src/main/java/com/budwk/app/zhgh/activity/sports/service/ActivitySportsApplyUserService.java b/src/main/java/com/budwk/app/zhgh/activity/sports/service/ActivitySportsApplyUserService.java index 5d307287..694d2e1a 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/sports/service/ActivitySportsApplyUserService.java +++ b/src/main/java/com/budwk/app/zhgh/activity/sports/service/ActivitySportsApplyUserService.java @@ -15,7 +15,7 @@ public interface ActivitySportsApplyUserService extends BaseService activityData(Integer year, Integer isActivity,Integer applyStatus); + Pagination activityData(Integer year, Integer isActivity,Integer applyStatus); List getEvents(String activityId); diff --git a/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsApplyUserServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsApplyUserServiceImpl.java index 3195ca81..0a9a8203 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsApplyUserServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsApplyUserServiceImpl.java @@ -121,7 +121,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl activityData(Integer year, Integer isActivity, Integer applyStatus) { + public Pagination activityData(Integer year, Integer isActivity, Integer applyStatus) { Sql sql = Sqls.create(""" SELECT @@ -186,8 +186,8 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", id)); BigDecimal money = BigDecimal.valueOf(0.00); - String subjectMoneyId = null; + String subjectMoneyId = ""; for (HealthCheckupProjectSubjectMoney subject : list) { // 是否满足条件 Cnd cnd = Cnd.where("id", "=", SecurityUtil.getUserId()); @@ -221,7 +225,7 @@ public class H5HealthCheckupController { } } - return Result.success().addData(Map.of("money", money,"subjectMoneyId",subjectMoneyId)); + return Result.success().addData(Map.of("money", money, "subjectMoneyId", subjectMoneyId)); } diff --git a/src/main/resources/views/platform/zhgh/activity/sports/applyUser/index.html b/src/main/resources/views/platform/zhgh/activity/sports/applyUser/index.html index 6bfd5f5c..2793bc2a 100644 --- a/src/main/resources/views/platform/zhgh/activity/sports/applyUser/index.html +++ b/src/main/resources/views/platform/zhgh/activity/sports/applyUser/index.html @@ -461,7 +461,7 @@ layout("/layouts/platform.html"){ async activityInfoData() { const resp = await this.$axios.post(loc() + "/activityData", this.pageForm) if (resp.code === 0) { - this.activityList = resp.data + this.activityList = resp.data.list } else { this.notifyWarning(resp.msg) } diff --git a/src/main/resources/views/platform/zhgh/activity/sports/applyUser/indexList.html b/src/main/resources/views/platform/zhgh/activity/sports/applyUser/indexList.html index 49de0e2b..df77fddd 100644 --- a/src/main/resources/views/platform/zhgh/activity/sports/applyUser/indexList.html +++ b/src/main/resources/views/platform/zhgh/activity/sports/applyUser/indexList.html @@ -197,7 +197,7 @@ layout("/layouts/platform.html"){ async activityInfoData() { const resp = await this.$axios.post(loc() + "/activityData", this.pageForm) if (resp.code === 0) { - this.activityList = resp.data + this.activityList = resp.data.list } else { this.notifyWarning(resp.msg) } diff --git a/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html b/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html index f68e1036..9f41a728 100644 --- a/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html +++ b/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html @@ -52,58 +52,30 @@ layout("/layouts/platform_h5.html"){ - - - -
-
- + + + + @@ -153,30 +125,8 @@ layout("/layouts/platform_h5.html"){ "mobile-culture-apply-user": MOBILE_CULTURE_APPLY_USER }, methods: { - pageData() { - this.loading = true - const loading = createListLoading() - const pageForm = { - ...this.pageForm, - isEnrolled: this.pageForm.isEnrolledText === 1 - } - this.$axios - .post("/platform/activity/culture/applyUser/pageData", pageForm) - .then((res) => { - if (res.code === 0) { - this.tableData = this.tableData.concat(res.data.list) - this.pageForm.totalCount = res.data.totalCount - if (this.tableData.length >= res.data.totalCount) { - this.finished = true - } - this.pageForm.pageNumber++ - } - }) - .finally(() => { - loading.close() - this.loading = false - this.refreshing = false - }) + onReady() { + this.doSearch() }, openDetail(row) { @@ -266,15 +216,14 @@ layout("/layouts/platform_h5.html"){ .catch(() => {}) }, doSearch() { - this.tableKey = new Date().getTime() - this.pageForm.pageNumber = 1 - this.pageForm.totalCount = 0 - this.tableData = [] - this.pageData() + this.$nextTick(() => { + this.pageForm.pageNumber = 1 + this.pageForm.totalCount = 0 + this.$refs.tableListRef.doSearch() + }) } }, created() { - this.pageData() } }) diff --git a/src/main/resources/views/platform/zhghh5/activity/sports/applyUser.html b/src/main/resources/views/platform/zhghh5/activity/sports/applyUser.html index c886bbf6..20a7564f 100644 --- a/src/main/resources/views/platform/zhghh5/activity/sports/applyUser.html +++ b/src/main/resources/views/platform/zhghh5/activity/sports/applyUser.html @@ -11,66 +11,38 @@ layout("/layouts/platform_h5.html"){ - - + - -
- -
-
- - 未开始报名 - - 报名中 - - - 报名结束 - - - 活动进行中 - - 活动结束 - - - - - - - - - - + + + + { - this.tableData = res.data - - this.finished = true - this.loading = false + doSearch() { + this.$nextTick(() => { + this.pageForm.pageNumber = 1 + this.pageForm.totalCount = 0 + this.$refs.tableListRef.doSearch() }) - } + }, + onReady() { + this.doSearch() + }, }, created() { - this.pageData() } }) diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm.js b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm.js index 44490afc..f04247ee 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm.js +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm.js @@ -10,7 +10,7 @@ let H5_PROJECT_MANAGE_FROM = { name="idCard" readonly required - placeholder="请选择身份证号" + placeholder="请联系校工会补充身份证号" v-model="formData.idCard" :rules="[{ required: true, message: '请输入身份证号' }]"> @@ -258,7 +258,7 @@ let H5_PROJECT_MANAGE_FROM = { }, async selectInfo(row) { //this.formData.projectId = row.projectId; - const resp = await $.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId}); + const resp = await this.$axios.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId}); if (resp.data !== null) { this.formData = resp.data; /* const o = this.campusList.find(o => o.id === this.formData.campus) @@ -278,12 +278,6 @@ let H5_PROJECT_MANAGE_FROM = { // 执行提交 async doSubmit() { - const loading = this.$toast.loading({ - message: "报名中...", - forbidClick: true, - overlay: true, - duration: 0 - }) const formData = clone(this.formData); formData.projectId = this.row.projectId; /* if (formData.isFamily === '否') { @@ -292,17 +286,13 @@ let H5_PROJECT_MANAGE_FROM = { // 过滤空的家属信息 formData.companionList = formData.companionList.filter(item => item.userName && item.userName.trim() !== ''); }*/ - - const resp = await $.post('/platform/healthCheckup/h5/doSubmit', { + const resp = await this.$axios.post('/platform/healthCheckup/h5/doSubmit', { userSelection: JSON.stringify(formData), }); - loading.clear() if (resp.code === 0) { this.visible = false; this.$toast.success(resp.msg) this.$emit('submit_success'); - } else { - this.$toast.fail(resp.msg) } }, @@ -350,12 +340,11 @@ let H5_PROJECT_MANAGE_FROM = { // 查询体检套餐 async findSubject(id) { try { - const resp = await $.post('/platform/healthCheckup/project/mange/findOne', { + const resp = await this.$axios.post('/platform/healthCheckup/project/mange/findOne', { id: id }); this.project = resp.data || {}; } catch (error) { - console.error('获取体检套餐失败:', error); vant.Toast('获取体检套餐失败'); } }, @@ -363,7 +352,7 @@ let H5_PROJECT_MANAGE_FROM = { // 获取院区 async getCampus() { try { - const resp = await $.post('/platform/healthCheckup/h5/getCampus'); + const resp = await this.$axios.post('/platform/healthCheckup/h5/getCampus'); this.campusList = resp.data || []; } catch (error) { vant.Toast('获取院区失败');