Browse Source

【PC端】初心互助活动发布、随手记发布添加违规校验逻辑-王公峰-2020-08-05

master
wanggongfeng 5 years ago
parent
commit
acfed20858
  1. 29
      src/views/modules/heart/actinfo-add-or-update.vue
  2. 28
      src/views/modules/workRecord/dailyrecordinfoDetail.vue

29
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({

28
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)
}

Loading…
Cancel
Save