Commit ba64b633 authored by wangxuelai's avatar wangxuelai

''

parent be6cce9d
......@@ -22,7 +22,8 @@
"__IMGCDN__": true,
"qq": true,
"ENVIRONMENT": true,
"UE": true
"UE": true,
"_": true
},
"rules":{
"import/newline-after-import": 0,
......
......@@ -18,6 +18,6 @@
</head>
<body>
<div id="root"></div>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1576501188108" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1576506486966" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -4,13 +4,6 @@ import { routerRedux } from 'dva/router';
import { Menu, Icon, Layout } from 'antd';
import SjdMenuStyle from './SjdMenu.less';
import UserGuide from '../components/UserGuide';
import {
pageIn,
LocalStorage,
SessionStorage,
// isOnline,
translateType,
} from '../utils/index';
const { SubMenu } = Menu;
const { Sider } = Layout;
class SjdMenu extends React.Component {
......@@ -34,6 +27,9 @@ class SjdMenu extends React.Component {
if (guideShow) {
return;
}
dispatch({
type: 'webapp/pageInit',
}).then(() => {
dispatch({
type: 'webapp/menuselected',
payload: {
......@@ -41,25 +37,26 @@ class SjdMenu extends React.Component {
fatherId,
},
});
dispatch({
type: 'classmgt/updateState',
payload: {
classListQueryParams: {
school_id: 0,
page: 1,
perPage: 10,
title: '',
teacher_id: '',
course_id: '',
class_room_id: '',
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
my: '',
},
},
});
// dispatch({
// type: 'classmgt/updateState',
// payload: {
// classListQueryParams: {
// school_id: 0,
// page: 1,
// perPage: 10,
// title: '',
// teacher_id: '',
// course_id: '',
// class_room_id: '',
// graduation_status: 0,
// assign_class_status: 0,
// extra: 'course,class_room',
// student_id: '',
// my: '',
// },
// },
// });
}
goHome = () => {
const { dispatch } = this.props;
......
......@@ -386,10 +386,16 @@ export default {
yield put({
type: 'updateState',
payload: {
goodsList: [],
sid: 0,
goodslist: [],
editCourseModalShow: false,
allStudentList: [],
editScoreVisible: false,
editCouponModalShow: false,
editGoodsModalShow: false,
recordList: [],
recordListTotal: 0,
couponImg: '',
goodsBanner: [],
editCouponInfo: {
id: 0,
title: '',
......@@ -398,6 +404,62 @@ export default {
inventory: 0,
banner: [],
},
type1: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false, // 0 不是无限 -1 无限
},
type2: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type3: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type4: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type5: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type6: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type7: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type8: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
type9: {
single: 0,
daily_limit: 0,
checked: true,
unlimited: false,
},
ruleList: [],
goodSaveSubmiting: false,
},
});
},
......
......@@ -80,6 +80,7 @@ export default {
perPage: 20,
},
teacherclassTotal: 0,
teacherclasslist: [],
teacherClassListForSearch: [],
classroomList: [],
courseList: [],
......@@ -725,6 +726,7 @@ export default {
sid: 0,
teachersinfo: {},
teachersdetail: {},
teacherList: [],
extra: {},
studentSubmiting: false,
teacherId: 0,
......@@ -757,6 +759,7 @@ export default {
page: 1,
perPage: 10,
},
teacherclasslist: [],
copyTeachersScheduleListQueryParams: {
start_time: '',
end_time: '',
......@@ -800,6 +803,8 @@ export default {
callStudentTotal: 0,
callStudentList: [],
callDetailShow: false,
// 查看点名详情的接口
timeArr: [],
courseStaticParams: {
start_time: '',
end_time: '',
......
......@@ -1020,10 +1020,7 @@ export default {
}
}
}
yield put({
type: 'pageInit',
});
yield delay(50);
// yield delay(50);
menueSearch(webapp.menus);
if (!currentMenu.isFather) {
yield put(routerRedux.replace({
......@@ -1039,93 +1036,134 @@ export default {
}));
},
* pageInit({ payload }, { put, select }) {
const { locationPathname } = yield select(state => state.webapp);
if (locationPathname == '/sjd/indexstaic') {
yield put({
type: 'indexstaic/pageInit',
});
yield put({
type: 'coursechart/pageInit',
});
yield put({
type: 'callstudents/pageInit',
});
yield put({
type: 'classdetail/pageInit',
type: 'plancourse/pageInit',
});
} else if (locationPathname == '/sjd/student') {
yield put({
type: 'classmgt/pageInit',
type: 'students/pageInit',
});
} else if (pathToRegexp('/sjd/studentinfo/:id').exec(locationPathname)) {
yield put({
type: 'clockmgt/pageInit',
type: 'studentsinfo/pageInit',
});
} else if (locationPathname == '/sjd/course') {
yield put({
type: 'course/pageInit',
});
} else if (locationPathname == '/sjd/classmgt') {
yield put({
type: 'coursechart/pageInit',
type: 'classmgt/pageInit',
});
} else if (pathToRegexp('/sjd/classdetail/:classid').exec(locationPathname)) {
yield put({
type: 'headquarters/pageInit',
type: 'classdetail/pageInit',
});
yield put({
type: 'headquartersdetail/pageInit',
type: 'callstudents/pageInit',
});
yield put({
type: 'hqstatistical/pageInit',
type: 'plancourse/pageInit',
});
} else if (locationPathname == '/sjd/teacher') {
yield put({
type: 'indexstaic/pageInit',
type: 'teachers/pageInit',
});
} else if (pathToRegexp('/sjd/teacherinfo/:id').exec(locationPathname)) {
yield put({
type: 'institutions/pageInit',
type: 'teachersinfo/pageInit',
});
yield put({
type: 'joinschooladd/pageInit',
type: 'callstudents/pageInit',
});
} if (pathToRegexp('/sjd/record').exec(locationPathname)) {
yield put({
type: 'login/pageInit',
type: 'classrecord/pageInit',
});
yield put({
type: 'officialweb/pageInit',
type: 'callstudents/pageInit',
});
} else if (locationPathname == '/sjd/institutions') {
yield put({
type: 'plancourse/pageInit',
type: 'institutions/pageInit',
});
} else if (locationPathname == '/sjd/officialwebeditor') {
yield put({
type: 'studentclass/pageInit',
type: 'officialweb/pageInit',
});
} else if (locationPathname == '/sjd/integralmanage') {
yield put({
type: 'students/pageInit',
type: 'integral/pageInit',
});
} else if (locationPathname == '/sjd/datacenter') {
yield put({
type: 'studentsinfo/pageInit',
type: 'analyzecenter/pageInit',
});
} else if (locationPathname == '/sjd/singleclass') {
yield put({
type: 'teachers/pageInit',
type: 'onlineclasses/pageInit',
});
} else if (pathToRegexp('/sjd/singleclass/detail/:id').exec(locationPathname)) {
yield put({
type: 'teachersinfo/pageInit',
type: 'onlineclasses/pageInit',
});
} if (locationPathname == '/sjd/coursegather') {
yield put({
type: 'thememgt/pageInit',
type: 'coursegatherindex/pageInit',
});
} if (pathToRegexp('/sjd/gatherdetail/:id').exec(locationPathname)) {
yield put({
type: 'integral/pageInit',
type: 'coursegatherdetail/pageInit',
});
} if (locationPathname == '/sjd/coursemateria') {
yield put({
type: 'createtheme/pageInit',
type: 'coursemateria/pageInit',
});
} else if (pathToRegexp('/sjd/thememgt/:classid').exec(locationPathname)) {
yield put({
type: 'analyzecenter/pageInit',
type: 'thememgt/pageInit',
});
} else if (pathToRegexp('/sjd/clockmgt/:themetype/:classid/:themeid').exec(locationPathname)) {
yield put({
type: 'coursemateria/pageInit',
type: 'clockmgt/pageInit',
});
} else if (pathToRegexp('/sjd/studentclass/:id').exec(locationPathname)) {
yield put({
type: 'coursegatherindex/pageInit',
type: 'studentclass/pageInit',
});
} else if (pathToRegexp('/hdqrs/static').exec(locationPathname)) {
yield put({
type: 'coursegatherdetail/pageInit',
type: 'headquarters/pageInit',
});
} else if (pathToRegexp('/hdqrs/detail').exec(locationPathname)) {
yield put({
type: 'onlineclasses/pageInit',
type: 'headquartersdetail/pageInit',
});
} else if (pathToRegexp('/hdqrs/static').exec(locationPathname)) {
yield put({
type: 'classrecord/pageInit',
type: 'hqstatistical/pageInit',
});
}
// yield put({
// type: 'joinschooladd/pageInit',
// });
// yield put({
// type: 'login/pageInit',
// });
// yield put({
// type: 'createtheme/pageInit',
// });
},
* onPageEnter({ payload }, { put, call, select }) {
const { pathname } = payload;
......
......@@ -48,19 +48,15 @@ class ThemeEditor extends React.Component {
if (this.uEditor) {
this.uEditor.destroy();
}
if (this.timeout2) {
clearTimeout(this.timeout2);
this.timeout2 = '';
}
if (this.timeout1) {
clearTimeout(this.timeout1);
this.timeout1 = '';
}
clearTimeout(this.setTimeout3);
}
componentDidMount() { // 挂载
this.renderEditor();
}
renderEditor = () => {
const { sid, commentParams } = this.props;
const that = this;
this.timeout1 = setTimeout(() => {
if (UE && document.getElementById('editor_id')) {
that.uEditor = UE.getEditor('editor_id', {
autoHeightEnabled: false,
......@@ -136,7 +132,6 @@ class ThemeEditor extends React.Component {
});
that.timeout2 = setTimeout(() => {
if (document.getElementById('editor_id')) {
console.log('进来了');
const { sid, commentParams } = that.props;
if (commentParams.intro && commentParams.intro.length == 1) {
if (commentParams.intro[0].type == 'editor' && commentParams.intro[0].value != '') {
......@@ -154,8 +149,11 @@ class ThemeEditor extends React.Component {
});
}, 800);
// this.editor = ue;
} else {
that.setTimeout3 = setTimeout(() => {
that.renderEditor();
}, 200);
}
}, 800);
}
priviewImg = (img) => {
this.setState({
......
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