|
@@ -404,10 +404,11 @@ const userAddEvent = () => {
|
|
|
|
|
|
let submit = {
|
|
|
// 账号
|
|
|
- "userName": "",
|
|
|
+ "userName": "test001",
|
|
|
+ // 0 表示教师,1表示学生
|
|
|
"userType": 0,
|
|
|
// 昵称
|
|
|
- "nickName": "",
|
|
|
+ "nickName": "测试账号",
|
|
|
// 用户分配到的班级数组,可以是多个
|
|
|
"classInfo": [
|
|
|
{
|
|
@@ -418,18 +419,30 @@ const userAddEvent = () => {
|
|
|
}
|
|
|
],
|
|
|
// 密码
|
|
|
- "password": "",
|
|
|
+ "password": "123456",
|
|
|
//确认密码
|
|
|
- "password2": ""
|
|
|
+ "password2": "123456"
|
|
|
};
|
|
|
|
|
|
- console.log(
|
|
|
- "userAdd", submit
|
|
|
- );
|
|
|
+ // console.log(
|
|
|
+ // "userAdd", submit
|
|
|
+ // );
|
|
|
+
|
|
|
+ userAdd(submit)
|
|
|
+ .then(response => {
|
|
|
+
|
|
|
+ let data = response?.data?.data;
|
|
|
+ console.log(
|
|
|
+ "userAddEvent response", response, data
|
|
|
+ );
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
|
|
|
-userAddEvent();
|
|
|
+// userAddEvent();
|
|
|
|
|
|
|
|
|
</script>
|