|
@@ -268,15 +268,18 @@ const handleLogin = async (params) => {
|
|
|
authUtil.removeLoginForm()
|
|
|
}
|
|
|
authUtil.setToken(res)
|
|
|
-
|
|
|
- if (!redirect.value) {
|
|
|
- redirect.value = '/'
|
|
|
- }
|
|
|
- // 判断是否为SSO登录
|
|
|
- if (redirect.value.indexOf('sso') !== -1) {
|
|
|
- window.location.href = window.location.href.replace('/login?redirect=', '')
|
|
|
- } else {
|
|
|
- push({ path: redirect.value || permissionStore.addRouters[0].path })
|
|
|
+ const userType = await LoginApi.getInfo()
|
|
|
+ console.log(userType,"我在这里")
|
|
|
+ if(userType.roles.indexOf("student") !== -1){
|
|
|
+ console.log("我是学生")
|
|
|
+ window.location.href = '/system/studentSelf/index'
|
|
|
+ }else{
|
|
|
+ console.log("我不是学生")
|
|
|
+ if (!redirect.value) {
|
|
|
+ redirect.value = '/'
|
|
|
+ }
|
|
|
+ window.location.href = '/system/Home/index'
|
|
|
+ // push({ path: redirect.value || permissionStore.addRouters[0].path })
|
|
|
}
|
|
|
} finally {
|
|
|
loginLoading.value = false
|