注册问题修改0315

main
xy 3 weeks ago
parent 1c4eccee74
commit 50aa26a040
  1. 42
      src/layout/loginPage.vue

@ -83,7 +83,7 @@
</div>
<div class="right">
<el-cascader placeholder="请选择所属班级" :props="props" style="width: 142%; height: 0.2344rem"
v-model="formModel.clssid" />
v-model="formModel.clssid" @change="handleChange" />
</div>
</div>
</el-form-item>
@ -301,7 +301,10 @@ const props = {
},
}
const handleChange = (e: any) => {
console.log(e);
formModel.value.clssid = e
}
//
@ -377,12 +380,10 @@ const register = async () => {
username: formModel.value.username,
realname: formModel.value.name,
workno: formModel.value.studentNumb,
depid: deepValues.value.splice(0, 2).join(',')
depid: deepValues.value.slice(0, 2).join(',')
};
try {
const res: any = await sturegister(data)
if (res.code === 200) {
ElMessage.success(`注册成功`)
isRegister.value = false
formModel.value = {
username: "",
password: "",
@ -393,13 +394,26 @@ const register = async () => {
mobile: '',
captcha: "",
}
ElMessage.success(`注册成功`)
isRegister.value = false
} catch (error) {
console.log(error);
getcodeinfo()
} else {
ElMessage.warning(res.message)
getcodeinfo()
}
console.log(res)
// getcodeinfo()
// console.log(11111);
// ElMessage.warning(res.message)
// console.log(res)
};
const codeUrl = ref("");
const getcodeinfo = async () => {
@ -474,10 +488,12 @@ const toLogin=()=>{
background-position: center;
background-size: 50% auto;
}
.captcha {
width: 100%;
height: 100%;
position: relative;
.code {
width: 100%;
height: 100%;
@ -489,11 +505,13 @@ const toLogin=()=>{
// background-color: pink;
display: flex;
align-items: center;
img {
width: 100%;
height: 100%;
}
}}
}
}
}
.hexagon-button {
@ -510,6 +528,7 @@ const toLogin=()=>{
background-color: #0e2e5e;
font-size: 18px;
}
// .el-form-item__label {
// color: #0e2e5e;
// }
@ -519,6 +538,7 @@ const toLogin=()=>{
.el-input {
width: 300px;
}
:deep(.el-form-item__error) {
left: 110px;
}

Loading…
Cancel
Save