|
@@ -117,6 +117,21 @@
|
|
dataType: "json",
|
|
dataType: "json",
|
|
success: (res) => {
|
|
success: (res) => {
|
|
if (res.code == 1) {
|
|
if (res.code == 1) {
|
|
|
|
+ const userInfo = res.data
|
|
|
|
+ if ((!Array.isArray(userInfo.user_org.length)) && userInfo.user_org.length == 0) {
|
|
|
|
+ alert('账号未绑定机构,您没有权限访问该应用')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // uo_type 2是学校 1是教育局
|
|
|
|
+ const uo_type = userInfo.user_org[userInfo.user_org.length - 1].uo_type
|
|
|
|
+ if (uo_type == '1' && tag.startsWith('xd')) {
|
|
|
|
+ alert('您是教育局用户,无法访问该应用')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (uo_type == '2' && tag.startsWith('jd')) {
|
|
|
|
+ alert('您是学校用户,无法访问该应用')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
localStorage.setItem('userInfo', JSON.stringify(res.data));
|
|
localStorage.setItem('userInfo', JSON.stringify(res.data));
|
|
location.href = '/app/mobile/' + (tag ? ('#/?tag=' + tag) : '');
|
|
location.href = '/app/mobile/' + (tag ? ('#/?tag=' + tag) : '');
|
|
} else {
|
|
} else {
|