Commit 38fe041b authored by sujie@126.com's avatar sujie@126.com

Merge branch 'wxl-develop' of git.server:wangxuelai/biz.qingxiao.com into wxl-develop

parents 1002a86e 06499332
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills -->
<!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="/dist/index.css?1566539046840" rel="stylesheet"><script src="/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="/dist/index.js?1566539046840" charset="utf-8"></script></body></html>
\ No newline at end of file
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<link href="/dist/index.css?1566552514086" rel="stylesheet">
<script src="/lib/vendor.dll.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="/dist/index.js?1566552514086" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -372,7 +372,7 @@ export default {
type: 'queryScheduleList',
payload: {
action: 'init',
status: 2,
// status: 2,
params: {
},
},
......
......@@ -30,7 +30,6 @@ export default {
departmentid: LocalStorage.getItem('departmentid') || 0,
numberToChinese: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一'],
showExpired: false,
dakarole: LocalStorage.getItem('dakarole') || 1,
screenIsBig: true,
breadcrumbList: [],
role: LocalStorage.getItem('role') || '',
......@@ -73,19 +72,18 @@ export default {
}
if (['/joinschooladd', '/schoollist', '/schooladd', '/usersetting'].indexOf(pathname) != -1 || pathname.indexOf('sjd') != -1) {
if (!userUserful) { // 检测已sjd开头的url或者headquarters开头的路由
Modal.warn({
title: '登录信息丢失,请重新登录',
onOk: () => {
dispatch(routerRedux.replace({
pathname: '/login',
}));
localStorage.clear();
},
});
// Modal.warn({
// title: '登录信息丢失,请重新登录',
// onOk: () => {
// },
// });
dispatch(routerRedux.replace({
pathname: '/login',
}));
localStorage.clear();
return;
}
}
console.log(role === null, 'role === null');
if (pathname.indexOf('sjd') != -1 && pathname.indexOf('headquarters') == -1) {
if (!role || !rootMap || !sid) {
dispatch(routerRedux.replace({
......@@ -663,9 +661,7 @@ export default {
},
* signout({ payload }, { put, select }) {
const { dispatch } = payload;
LocalStorage.removeItem('user');
LocalStorage.removeItem('dakarole');
LocalStorage.removeItem('teacher');
localStorage.clear();
const signouthide = message.loading('正在退出...');
yield delay(1000);
yield put(routerRedux.push({
......
......@@ -31,9 +31,7 @@ class EditClassModal extends React.Component {
if (nextProps.editClassInfo.title == this.state.title) {
return;
}
console.log(this.props.isEdit, 'this.props.isEdit');
if (this.props.isEdit == 1) {
console.log(this.state.title, 'this.state.title1');
this.setState({
title: this.props.editClassInfo.title,
});
......
......@@ -797,7 +797,7 @@ class teachersForm extends React.Component {
<div className={pageStyle.searchbox}>
<Row className={pageStyle.settingcontent}>
<Col xs={{ span: 12 }} sm={{ span: 5 }} lg={{ span: 5 }} xl={{ span: 3 }} xxl={{ span: 2 }} className={pageStyle.avatarbox}>
<img className={pageStyle.avatar} src={(teachersdetail.avatar && imagify(teachersdetail.avatar)) || ''} alt="1" />
<img className={pageStyle.avatar} src={(teachersdetail.avatar && imagify(teachersdetail.avatar)) || `${__IMGCDN__}defaultavatar.png`} alt={teachersdetail.nickname} />
</Col>
<Col span="12" >
<Descriptions>
......
......@@ -15,6 +15,7 @@ export function newLogin(params) {
return request({
url: `${api.newLogin.loginPost}`,
method: 'POST',
needAuth: false,
data,
});
}
......
......@@ -58,20 +58,10 @@ axios.interceptors.response.use(undefined, function axiosRetryInterceptor(err) {
export default function request(options) {
const user = LocalStorage.getItem('user');
const teacher = LocalStorage.getItem('teacher') || {};
const dakarole = LocalStorage.getItem('dakarole') || 1;
const needAuth = options.needAuth === undefined ? true : false;
if (dakarole == 2) {
options.url = options.url.replace(/\/member\//,'/teacher/');
}
if (needAuth) {
if (user && user.token && dakarole == 1) {
options.headers = {
Authorization: `bearer ${user.token}`
}
} else if (teacher && teacher.token && dakarole == 2) {
options.headers = {
Authorization: `bearer ${teacher.token}`
}
options.headers = {
Authorization: `bearer ${user.token}`
}
}
return axios(options)
......
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