diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index 622aafe..b71e98b 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -209,22 +209,41 @@ export default { cadreFlag: this.dataForm.cadreFlag, remark: this.dataForm.remark } - this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/user/audit/', postData).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - // 审核通过之后触发发短信 - // this.registerResult(this.dataForm.id) - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.visible = false - this.$emit('refreshDataList') + if (postData.state === '3') { + this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/user/auditPass/', postData).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) } - }) - }).catch(() => { }) + // 审核通过之后触发发短信 + // this.registerResult(this.dataForm.id) + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => { }) + } else { + this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/user/audit/', postData).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + // 审核通过之后触发发短信 + // this.registerResult(this.dataForm.id) + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => { }) + } }) }, 1000, { 'leading': true, 'trailing': false }), registerResult (userId) {