Commit 4bfe476d authored by 以墨为白's avatar 以墨为白 🎧

用户出现重复的时候优化

parent 4ba1e73e
......@@ -47,8 +47,8 @@
</tbody>
</table> -->
<el-table class="myTable" ref="multipleTable" :data="data_table" style="width: 100%" stripe
height="100%" @selection-change="handleSelectionChange">
<el-table class="myTable" ref="multipleTable" :data="data_table" style="width: 100%" stripe height="100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" :selectable="handleDisable"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="account" label="登录用户名" align="center"></el-table-column>
......@@ -672,7 +672,7 @@ export default {
return Promise.resolve();
}
}).then(res => {
post("api/rest/system/user/register", this.new_user)
return post("api/rest/system/user/register", this.new_user)
}).then(res => {
this.$message.success("新增成功!");
this.centerDialogVisible = false;
......@@ -685,6 +685,9 @@ export default {
this.$message.warning("数据验证失败");
} else {
this.$message.warning(err.message);
if (err.code == 9061) {
this.new_user.mail && removeUser(this.new_user.mail);//如果创建了邮箱这里删除一下
}
}
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment