Commit ffeaa2a4 authored by wangxuelai's avatar wangxuelai

''

parent 2488c41f
......@@ -39,6 +39,8 @@ class UserGuide extends React.Component {
}));
break;
case 2:
document.body.style.maxHeight = '100vh';
document.body.style.overflowY = 'hidden';
if (document.getElementById('course_addcourse')) {
document.getElementById('course_addcourse').style.position = '';
document.getElementById('course_addcourse').style.zIndex = '';
......@@ -227,6 +229,8 @@ class UserGuide extends React.Component {
// });
break;
case 12:
document.body.style.maxHeight = 'initial';
document.body.style.overflowY = 'initial';
dispatch({
type: 'userguide/updateState',
payload: {
......
......@@ -133,6 +133,10 @@ export default {
pathname: '/sjd/indexstaic',
}));
yield delay(200);
const { screenIsBig } = yield select(state => state.webapp);
if (!screenIsBig) {
return;
}
yield put({
type: 'userguide/updateState',
payload: {
......
......@@ -26,6 +26,10 @@ export default {
effects: {
* getposition({ payload }, { call, put, select }) {
const { page, doms } = payload;
const { screenIsBig } = yield select(state => state.webapp);
if (!screenIsBig) {
return;
}
switch (page) {
case 'course':
doms.addCourseBtn.style.position = 'relative';
......
......@@ -33,21 +33,23 @@ class ClassMgtForm extends React.Component {
}
componentWillReceiveProps() {
const { guideStep, dispatch } = this.props;
const addClassBtn = document.getElementById('class_addClass');
const firstClassBtn = document.getElementById('class_0');
if (addClassBtn && firstClassBtn && guideStep == 4) {
dispatch({
type: 'userguide/getposition',
payload: {
page: 'class',
doms: {
addClassBtn,
menuBtn: document.getElementById('menu_3'),
firstClassBtn,
setTimeout(() => {
const addClassBtn = document.getElementById('class_addClass');
const firstClassBtn = document.getElementById('class_0');
if (addClassBtn && firstClassBtn && guideStep == 4) {
dispatch({
type: 'userguide/getposition',
payload: {
page: 'class',
doms: {
addClassBtn,
menuBtn: document.getElementById('menu_3'),
firstClassBtn,
},
},
},
});
}
});
}
}, 500);
}
componentWillUnmount() { // 卸载
}
......
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