Commit 51944cef authored by wangxuelai's avatar wangxuelai

''

parent a4943e47
......@@ -18,6 +18,6 @@
</head>
<body>
<div id="root"></div>
<script src="dist/main.js?1577688646861" charset="utf-8"></script>
<script src="dist/main.js?1577691544208" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -64,7 +64,7 @@ export default {
},
* goSchoolSystem({ payload }, { call, put, select }) {
const { school, sid, type } = payload;
LocalStorage.setItem('sid', sid || school.id);
LocalStorage.setItem('sid', school.school_teacher.school_id);
LocalStorage.setItem('role', school.school_teacher ? school.school_teacher.type : 5);
if (school.school_teacher) {
LocalStorage.setItem('rootMap', rootMap.rootMap);
......@@ -75,7 +75,7 @@ export default {
type: 'webapp/updateState',
payload: {
sid: school.id,
role: school.school_teacher ? school.school_teacher.type : '',
role: school.school_teacher ? school.school_teacher.type : 5,
},
});
yield call(commonAjax.schoolLoginTime, {
......@@ -86,7 +86,7 @@ export default {
yield put({
type: 'permissionget',
payload: {
sid: school.id,
sid: school.school_id,
},
});
} else {
......
......@@ -179,7 +179,6 @@ class SjdIndex extends React.Component {
localStorage.clear();
mainDom = redirectLogin;
} else {
console.log(role, rootMap, sid, 'dasdasdas');
if (!role || !rootMap || !sid) {
mainDom = redirectSchoolList;
}
......
......@@ -936,7 +936,7 @@ function btnPermission(menus, btnId) {
const role = LocalStorage.getItem('role');
if (role == 2) {
flag = true;
} if (role == 5) {
} else if (role == 5) {
flag = true;
} else if (menus.indexOf(btnId) == -1) {
flag = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment