对接班级管理列表
This commit is contained in:
@@ -174,7 +174,6 @@ export default {
|
||||
this.submit.loading = true;
|
||||
this.$router.push('/evaluate')
|
||||
console.log(this.$router)
|
||||
localStorage.setItem('token', 123)
|
||||
|
||||
if( rulesPhone(this.loginForm.phone) ){ // 判断是否存在手机号验证码
|
||||
if(this.loginForm.code){
|
||||
@@ -186,9 +185,23 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('loginIn', formData).then(res =>{
|
||||
this.$message.success('登录成功!')
|
||||
Session.set('token',res.token_type +' ' + res.access_token)
|
||||
// this.$router.push('/evaluate')
|
||||
// 设置用户信息 学校信息 班级信息
|
||||
let user = this.$store.state.user
|
||||
if(user.campusInfo ){
|
||||
if(user.campusInfo.length >= 1){ // 说明只有一个校区
|
||||
if(user.campusInfo[0].classInfo){
|
||||
this.$store.commit('setSchool', user.campusInfo[0] ); // 设置默认校区
|
||||
}
|
||||
}
|
||||
}else { // 未查到校区信息
|
||||
|
||||
}
|
||||
|
||||
this.oldSet()
|
||||
|
||||
|
||||
}).finally(err =>{
|
||||
this.submit.loading = false;
|
||||
this.sendText = '发送'
|
||||
|
||||
Reference in New Issue
Block a user