|
@@ -115,9 +115,16 @@ const onSubmit = (formEl: InstanceType<typeof ElForm> | undefined) => {
|
|
|
const userType = res.data.data.userType;
|
|
|
getCurrentUser().then((res) => {
|
|
|
userInfo.dataFill(Object.assign({ userType: userType }, res.data.data));
|
|
|
- // if (userType == 0) router.push({ path: '/train' });
|
|
|
- if (userType == 0) router.push({ path: '/studentMain' });
|
|
|
- else if (userType == 1) router.push({ path: '/TaskMng' });
|
|
|
+
|
|
|
+ // // 老师,老接口的类型
|
|
|
+ // if (userType == 0) router.push({ path: '/studentMain' });
|
|
|
+ // // 学生,老接口的类型
|
|
|
+ // else if (userType == 1) router.push({ path: '/TaskMng' });
|
|
|
+
|
|
|
+ // 老师
|
|
|
+ if (userType == 0) router.push({ path: '/TaskMng' });
|
|
|
+ // 学生
|
|
|
+ else if (userType == 1) router.push({ path: '/studentMain' });
|
|
|
else {
|
|
|
ElNotification({
|
|
|
message: '无效用户',
|