|
@@ -54,16 +54,36 @@ onMounted(() => {
|
|
|
let userid = localStorage.getItem('userid')
|
|
let userid = localStorage.getItem('userid')
|
|
|
let username = localStorage.getItem('username')
|
|
let username = localStorage.getItem('username')
|
|
|
if(isBjt == 1){
|
|
if(isBjt == 1){
|
|
|
|
|
+ if (data.currentRole == "edupersonnel" || data.currentRole == "areaAdministrator" || data.currentRole == "userAdministrator" || data.currentRole == "securityAuditor" || data.currentRole == "schoolAdministrator" || data.currentRole == "schoolSecurityAuditor" || data.currentRole == "teacher") {
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ top.U.alert("您不是权限用户,请联系管理员授权!");
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ loginOut()
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if(r.data.data.userName != username){
|
|
|
|
|
+ top.U.alert("与绑定用户的姓名不符,请重新登录!");
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ loginOut()
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if(r.data.data.userName != username){
|
|
if(r.data.data.userName != username){
|
|
|
top.U.alert("与绑定用户的姓名不符,请重新登录!");
|
|
top.U.alert("与绑定用户的姓名不符,请重新登录!");
|
|
|
- linkLogin()
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ loginOut()
|
|
|
|
|
+ }, 1000);
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
checkEduid(r.data.data.eduId).then(res3 => {
|
|
checkEduid(r.data.data.eduId).then(res3 => {
|
|
|
console.log(res3);
|
|
console.log(res3);
|
|
|
if(res3 && res3.data && res3.data.length && res3.data[0].length){
|
|
if(res3 && res3.data && res3.data.length && res3.data[0].length){
|
|
|
top.U.alert("该用户已绑定其他账号,请重新登录!");
|
|
top.U.alert("该用户已绑定其他账号,请重新登录!");
|
|
|
- linkLogin()
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ loginOut()
|
|
|
|
|
+ }, 1000);
|
|
|
return
|
|
return
|
|
|
}else {
|
|
}else {
|
|
|
localStorage.removeItem('isBjt')
|
|
localStorage.removeItem('isBjt')
|
|
@@ -110,6 +130,13 @@ const linkLogin = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+const loginOut = () => {
|
|
|
|
|
+ axios.post('//cloud.cocorobo.cn/api/logout').then(res => {
|
|
|
|
|
+ linkLogin()
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 同步登录信息
|
|
// 同步登录信息
|
|
|
const userInfo = (data) => {
|
|
const userInfo = (data) => {
|
|
|
// eduId - 教育ID
|
|
// eduId - 教育ID
|