This commit is contained in:
joylink_cuiweidong 2022-06-23 16:25:16 +08:00
commit ce67bb0a13

View File

@ -41,6 +41,8 @@
<script>
import { registerUser } from '@/api/management/user';
import { ProjectCode } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
import md5 from 'js-md5';
export default {
name: 'Register',
@ -129,7 +131,8 @@ export default {
submitForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
const data = { email: this.form.email, nickname: this.form.nickname, password: md5(this.form.password) };
const project = getSessionStorage('project');
const data = { email: this.form.email, nickname: this.form.nickname, password: md5(this.form.password), source: ProjectCode[project] || '' };
registerUser(data).then(resp => {
this.$message.success('账号注册成功!' );
this.doClose();