From b9df80e2df6c3d030b831d6d1ba445f98aa7718d Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 28 Jun 2022 14:10:09 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/match/add/index.vue | 2 +- src/pages/match/manage/matchDetail.vue | 2 +- src/pages/match/manage/notice.vue | 23 ++++++++++++++++++----- src/setting.js | 4 ++-- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue index 4b958ad..9ec13a2 100644 --- a/src/pages/match/add/index.vue +++ b/src/pages/match/add/index.vue @@ -439,7 +439,7 @@ export default { let signUpStartTime = new Date(form.signUpStartTime).getTime(); let signUpEndTime = new Date(form.signUpEndTime).getTime(); let playStartTime = new Date(form.playStartTime).getTime(); - if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); + // if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间"); if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间"); if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情"); diff --git a/src/pages/match/manage/matchDetail.vue b/src/pages/match/manage/matchDetail.vue index 8ba69ac..de41a32 100644 --- a/src/pages/match/manage/matchDetail.vue +++ b/src/pages/match/manage/matchDetail.vue @@ -463,7 +463,7 @@ export default { let signUpStartTime = new Date(form.signUpStartTime).getTime(); let signUpEndTime = new Date(form.signUpEndTime).getTime(); let playStartTime = new Date(form.playStartTime).getTime(); - if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); + // if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间"); if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间"); if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情"); diff --git a/src/pages/match/manage/notice.vue b/src/pages/match/manage/notice.vue index 1e57b99..ec4bcfd 100644 --- a/src/pages/match/manage/notice.vue +++ b/src/pages/match/manage/notice.vue @@ -102,11 +102,24 @@ export default { }); }, switchOff(val, row, index) { - this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`) - .then(res => { - }) - .catch(err => { - }); + if (val) { + this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {}) + } else if (!row.status) { + this.$confirm('是否发布该公告?', '提示', { + type: 'success' + }).then(() => { + this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { + this.$post(this.api.amendmentAnnouncement, { + id: row.id, + status: 1 + }).then(res => { + this.getData() + }).catch(err => {}) + }).catch(err => {}) + }).catch(() => { + row.isOpen = 1 + }) + } }, add() { this.$router.push(`/match/noticeDetail?contestId=${this.id}`) diff --git a/src/setting.js b/src/setting.js index db40fcb..9889aa3 100644 --- a/src/setting.js +++ b/src/setting.js @@ -27,8 +27,8 @@ if (isHh) { host = "http://120.78.198.231/"; } else if (isPro) { // 职站生产 - bankPath = `http://www.huorantech.cn/banksystem` - jumpPath = `http://www.huorantech.cn/judgmentPoint/` + bankPath = `https://www.huorantech.cn/banksystem` + jumpPath = `https://www.huorantech.cn/judgmentPoint/` } else if (isDev) { jumpPath = "http://192.168.31.125:8087/"; bankPath = `http://192.168.31.125:8093`