diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index 89ac9f20..ffbb55a4 100644 --- a/src/views/modules/heart/actinfo-add-or-update.vue +++ b/src/views/modules/heart/actinfo-add-or-update.vue @@ -352,7 +352,8 @@ export default { reward: '', isBanner: '1', actUserDefaultState: '1', - bannerUrl: '' + bannerUrl: '', + isConReview: false }, isSignupEndTime: { disabledDate (time) { @@ -405,7 +406,8 @@ export default { return time.getTime() < new Date(EndDateVal).getTime() } } - } + }, + isFirst: true } }, created () { @@ -563,6 +565,7 @@ export default { }, init () { this.visible = true + this.dataForm.isConReview = false this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (this.dataForm.id) { @@ -675,8 +678,26 @@ export default { } this.isAble = true this.$http[!this.dataForm.id ? 'post' : 'put']('/heart/actinfo/', this.dataForm).then(({ data: res }) => { - this.isAble = false - if (res.code !== 0) { + if (!this.isFirst && res.code === 533) { + // 不是第一次提交 并且 依然是违规内容 + this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { + confirmButtonText: '是', + cancelButtonText: '否', + type: 'warning' + }).then(() => { + this.dataForm.isConReview = true + // 选择“是”继续提交,调用提交方法本身 + this.dataFormSubmitHandle() + }).catch(() => { + this.isAble = false + }) + return false + } else if (res.code === 533) { + this.isFirst = false + this.isAble = false + return this.$message.error(res.msg) + } else if (res.code !== 0) { + this.isAble = false return this.$message.error(res.msg) } this.$message({ diff --git a/src/views/modules/workRecord/dailyrecordinfoDetail.vue b/src/views/modules/workRecord/dailyrecordinfoDetail.vue index f69a76e7..a09cf98d 100644 --- a/src/views/modules/workRecord/dailyrecordinfoDetail.vue +++ b/src/views/modules/workRecord/dailyrecordinfoDetail.vue @@ -120,7 +120,8 @@ export default { address: '', joinNum: '', content: '', - images: [] + images: [], + isConReview: false }, isAble: false, meetTypeArr: [], @@ -133,7 +134,8 @@ export default { loading: false, dialogImageUrl: '', dialogVisible: false, - options: [] + options: [], + isFirst: true } }, computed: { @@ -227,6 +229,7 @@ export default { }, init () { this.dataForm.id = this.$route.query.id + this.dataForm.isConReview = false this.visible = true this.$nextTick(() => { this.$refs['dataForm'].resetFields() @@ -333,9 +336,26 @@ export default { return false } this.isAble = true - console.log(this.dataForm) this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/dailyrecordinfo/', this.dataForm).then(({ data: res }) => { - if (res.code !== 0) { + if (!this.isFirst && res.code === 533) { + // 不是第一次提交 并且 依然是违规内容 + this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { + confirmButtonText: '是', + cancelButtonText: '否', + type: 'warning' + }).then(() => { + this.dataForm.isConReview = true + // 选择“是”继续提交,调用提交方法本身 + this.dataFormSubmitHandle() + }).catch(() => { + this.isAble = false + }) + return false + } else if (res.code === 533) { + this.isFirst = false + this.isAble = false + return this.$message.error(res.msg) + } else if (res.code !== 0) { this.isAble = false return this.$message.error(res.msg) }