Commit ba64b633 authored by wangxuelai's avatar wangxuelai

''

parent be6cce9d
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
"__IMGCDN__": true, "__IMGCDN__": true,
"qq": true, "qq": true,
"ENVIRONMENT": true, "ENVIRONMENT": true,
"UE": true "UE": true,
"_": true
}, },
"rules":{ "rules":{
"import/newline-after-import": 0, "import/newline-after-import": 0,
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <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> </body>
</html> </html>
\ No newline at end of file
...@@ -4,13 +4,6 @@ import { routerRedux } from 'dva/router'; ...@@ -4,13 +4,6 @@ import { routerRedux } from 'dva/router';
import { Menu, Icon, Layout } from 'antd'; import { Menu, Icon, Layout } from 'antd';
import SjdMenuStyle from './SjdMenu.less'; import SjdMenuStyle from './SjdMenu.less';
import UserGuide from '../components/UserGuide'; import UserGuide from '../components/UserGuide';
import {
pageIn,
LocalStorage,
SessionStorage,
// isOnline,
translateType,
} from '../utils/index';
const { SubMenu } = Menu; const { SubMenu } = Menu;
const { Sider } = Layout; const { Sider } = Layout;
class SjdMenu extends React.Component { class SjdMenu extends React.Component {
...@@ -35,31 +28,35 @@ class SjdMenu extends React.Component { ...@@ -35,31 +28,35 @@ class SjdMenu extends React.Component {
return; return;
} }
dispatch({ dispatch({
type: 'webapp/menuselected', type: 'webapp/pageInit',
payload: { }).then(() => {
id, dispatch({
fatherId, type: 'webapp/menuselected',
}, payload: {
}); id,
dispatch({ fatherId,
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 = () => { goHome = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
......
...@@ -386,10 +386,16 @@ export default { ...@@ -386,10 +386,16 @@ export default {
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
goodsList: [],
sid: 0, sid: 0,
goodslist: [], allStudentList: [],
editCourseModalShow: false, editScoreVisible: false,
editCouponModalShow: false,
editGoodsModalShow: false, editGoodsModalShow: false,
recordList: [],
recordListTotal: 0,
couponImg: '',
goodsBanner: [],
editCouponInfo: { editCouponInfo: {
id: 0, id: 0,
title: '', title: '',
...@@ -398,6 +404,62 @@ export default { ...@@ -398,6 +404,62 @@ export default {
inventory: 0, inventory: 0,
banner: [], 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 { ...@@ -80,6 +80,7 @@ export default {
perPage: 20, perPage: 20,
}, },
teacherclassTotal: 0, teacherclassTotal: 0,
teacherclasslist: [],
teacherClassListForSearch: [], teacherClassListForSearch: [],
classroomList: [], classroomList: [],
courseList: [], courseList: [],
...@@ -725,6 +726,7 @@ export default { ...@@ -725,6 +726,7 @@ export default {
sid: 0, sid: 0,
teachersinfo: {}, teachersinfo: {},
teachersdetail: {}, teachersdetail: {},
teacherList: [],
extra: {}, extra: {},
studentSubmiting: false, studentSubmiting: false,
teacherId: 0, teacherId: 0,
...@@ -757,6 +759,7 @@ export default { ...@@ -757,6 +759,7 @@ export default {
page: 1, page: 1,
perPage: 10, perPage: 10,
}, },
teacherclasslist: [],
copyTeachersScheduleListQueryParams: { copyTeachersScheduleListQueryParams: {
start_time: '', start_time: '',
end_time: '', end_time: '',
...@@ -800,6 +803,8 @@ export default { ...@@ -800,6 +803,8 @@ export default {
callStudentTotal: 0, callStudentTotal: 0,
callStudentList: [], callStudentList: [],
callDetailShow: false, callDetailShow: false,
// 查看点名详情的接口
timeArr: [],
courseStaticParams: { courseStaticParams: {
start_time: '', start_time: '',
end_time: '', end_time: '',
......
...@@ -1020,10 +1020,7 @@ export default { ...@@ -1020,10 +1020,7 @@ export default {
} }
} }
} }
yield put({ // yield delay(50);
type: 'pageInit',
});
yield delay(50);
menueSearch(webapp.menus); menueSearch(webapp.menus);
if (!currentMenu.isFather) { if (!currentMenu.isFather) {
yield put(routerRedux.replace({ yield put(routerRedux.replace({
...@@ -1039,93 +1036,134 @@ export default { ...@@ -1039,93 +1036,134 @@ export default {
})); }));
}, },
* pageInit({ payload }, { put, select }) { * pageInit({ payload }, { put, select }) {
yield put({ const { locationPathname } = yield select(state => state.webapp);
type: 'callstudents/pageInit', if (locationPathname == '/sjd/indexstaic') {
}); yield put({
yield put({ type: 'indexstaic/pageInit',
type: 'classdetail/pageInit', });
}); yield put({
yield put({ type: 'coursechart/pageInit',
type: 'classmgt/pageInit', });
}); yield put({
yield put({ type: 'callstudents/pageInit',
type: 'clockmgt/pageInit', });
}); yield put({
yield put({ type: 'plancourse/pageInit',
type: 'course/pageInit', });
}); } else if (locationPathname == '/sjd/student') {
yield put({ yield put({
type: 'coursechart/pageInit', type: 'students/pageInit',
}); });
yield put({ } else if (pathToRegexp('/sjd/studentinfo/:id').exec(locationPathname)) {
type: 'headquarters/pageInit', yield put({
}); type: 'studentsinfo/pageInit',
yield put({ });
type: 'headquartersdetail/pageInit', } else if (locationPathname == '/sjd/course') {
}); yield put({
yield put({ type: 'course/pageInit',
type: 'hqstatistical/pageInit', });
}); } else if (locationPathname == '/sjd/classmgt') {
yield put({ yield put({
type: 'indexstaic/pageInit', type: 'classmgt/pageInit',
}); });
yield put({ } else if (pathToRegexp('/sjd/classdetail/:classid').exec(locationPathname)) {
type: 'institutions/pageInit', yield put({
}); type: 'classdetail/pageInit',
yield put({ });
type: 'joinschooladd/pageInit', yield put({
}); type: 'callstudents/pageInit',
yield put({ });
type: 'login/pageInit', yield put({
}); type: 'plancourse/pageInit',
yield put({ });
type: 'officialweb/pageInit', } else if (locationPathname == '/sjd/teacher') {
}); yield put({
yield put({ type: 'teachers/pageInit',
type: 'plancourse/pageInit', });
}); } else if (pathToRegexp('/sjd/teacherinfo/:id').exec(locationPathname)) {
yield put({ yield put({
type: 'studentclass/pageInit', type: 'teachersinfo/pageInit',
}); });
yield put({ yield put({
type: 'students/pageInit', type: 'callstudents/pageInit',
}); });
yield put({ } if (pathToRegexp('/sjd/record').exec(locationPathname)) {
type: 'studentsinfo/pageInit', yield put({
}); type: 'classrecord/pageInit',
yield put({ });
type: 'teachers/pageInit', yield put({
}); type: 'callstudents/pageInit',
yield put({ });
type: 'teachersinfo/pageInit', } else if (locationPathname == '/sjd/institutions') {
}); yield put({
yield put({ type: 'institutions/pageInit',
type: 'thememgt/pageInit', });
}); } else if (locationPathname == '/sjd/officialwebeditor') {
yield put({ yield put({
type: 'integral/pageInit', type: 'officialweb/pageInit',
}); });
yield put({ } else if (locationPathname == '/sjd/integralmanage') {
type: 'createtheme/pageInit', yield put({
}); type: 'integral/pageInit',
yield put({ });
type: 'analyzecenter/pageInit', } else if (locationPathname == '/sjd/datacenter') {
}); yield put({
yield put({ type: 'analyzecenter/pageInit',
type: 'coursemateria/pageInit', });
}); } else if (locationPathname == '/sjd/singleclass') {
yield put({ yield put({
type: 'coursegatherindex/pageInit', type: 'onlineclasses/pageInit',
}); });
yield put({ } else if (pathToRegexp('/sjd/singleclass/detail/:id').exec(locationPathname)) {
type: 'coursegatherdetail/pageInit', yield put({
}); type: 'onlineclasses/pageInit',
yield put({ });
type: 'onlineclasses/pageInit', } if (locationPathname == '/sjd/coursegather') {
}); yield put({
yield put({ type: 'coursegatherindex/pageInit',
type: 'classrecord/pageInit', });
}); } if (pathToRegexp('/sjd/gatherdetail/:id').exec(locationPathname)) {
yield put({
type: 'coursegatherdetail/pageInit',
});
} if (locationPathname == '/sjd/coursemateria') {
yield put({
type: 'coursemateria/pageInit',
});
} else if (pathToRegexp('/sjd/thememgt/:classid').exec(locationPathname)) {
yield put({
type: 'thememgt/pageInit',
});
} else if (pathToRegexp('/sjd/clockmgt/:themetype/:classid/:themeid').exec(locationPathname)) {
yield put({
type: 'clockmgt/pageInit',
});
} else if (pathToRegexp('/sjd/studentclass/:id').exec(locationPathname)) {
yield put({
type: 'studentclass/pageInit',
});
} else if (pathToRegexp('/hdqrs/static').exec(locationPathname)) {
yield put({
type: 'headquarters/pageInit',
});
} else if (pathToRegexp('/hdqrs/detail').exec(locationPathname)) {
yield put({
type: 'headquartersdetail/pageInit',
});
} else if (pathToRegexp('/hdqrs/static').exec(locationPathname)) {
yield put({
type: 'hqstatistical/pageInit',
});
}
// yield put({
// type: 'joinschooladd/pageInit',
// });
// yield put({
// type: 'login/pageInit',
// });
// yield put({
// type: 'createtheme/pageInit',
// });
}, },
* onPageEnter({ payload }, { put, call, select }) { * onPageEnter({ payload }, { put, call, select }) {
const { pathname } = payload; const { pathname } = payload;
......
...@@ -48,114 +48,112 @@ class ThemeEditor extends React.Component { ...@@ -48,114 +48,112 @@ class ThemeEditor extends React.Component {
if (this.uEditor) { if (this.uEditor) {
this.uEditor.destroy(); this.uEditor.destroy();
} }
if (this.timeout2) { clearTimeout(this.timeout2);
clearTimeout(this.timeout2); clearTimeout(this.setTimeout3);
this.timeout2 = '';
}
if (this.timeout1) {
clearTimeout(this.timeout1);
this.timeout1 = '';
}
} }
componentDidMount() { // 挂载 componentDidMount() { // 挂载
this.renderEditor();
}
renderEditor = () => {
const { sid, commentParams } = this.props; const { sid, commentParams } = this.props;
const that = this; const that = this;
this.timeout1 = setTimeout(() => { if (UE && document.getElementById('editor_id')) {
if (UE && document.getElementById('editor_id')) { that.uEditor = UE.getEditor('editor_id', {
that.uEditor = UE.getEditor('editor_id', { autoHeightEnabled: false,
autoHeightEnabled: false, zIndex: 10,
zIndex: 10, allowDivTransToP: false,
allowDivTransToP: false, // UEDITOR_HOME_URL: '../../js/ueeditor/',
// UEDITOR_HOME_URL: '../../js/ueeditor/', materiaImgUrl: api.courseMateria.index,
materiaImgUrl: api.courseMateria.index, materiaImgParams: {
materiaImgParams: { school_id: LocalStorage.getItem('sid') || 0,
school_id: LocalStorage.getItem('sid') || 0, type: 1,
type: 1, // page: 1
// page: 1 // perPage: 12
// perPage: 12 trans_status: 2,
trans_status: 2, },
}, elementPathEnabled: false,
elementPathEnabled: false, requestUser: LocalStorage.getItem('user') || {},
requestUser: LocalStorage.getItem('user') || {}, serverUrl: api.editorUpload,
serverUrl: api.editorUpload, imageFieldName: 'file',
imageFieldName: 'file', initialFrameHeight: 300,
initialFrameHeight: 300, removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',
removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign', toolbars: [
toolbars: [ [
[ 'source', // 源代码
'source', // 源代码 'undo', // 撤销
'undo', // 撤销 'redo', // 重做
'redo', // 重做 'fontsize', // 字号
'fontsize', // 字号 'forecolor', // 字体颜色
'forecolor', // 字体颜色 'bold', // 加粗
'bold', // 加粗 'italic', // 斜体
'italic', // 斜体 'underline', // 下划线
'underline', // 下划线 // 'strikethrough', // 删除线
// 'strikethrough', // 删除线 // 'subscript', // 下标
// 'subscript', // 下标 // 'superscript', // 上标
// 'superscript', // 上标 // 'blockquote', // 引用
// 'blockquote', // 引用 // 'pasteplain', // 纯文本粘贴模式
// 'pasteplain', // 纯文本粘贴模式 // 'horizontal', // 分隔线
// 'horizontal', // 分隔线 // 'removeformat', // 清除格式
// 'removeformat', // 清除格式 // 'unlink', // 取消链接
// 'unlink', // 取消链接 'inserttitle', // 插入标题
'inserttitle', // 插入标题 'simpleupload', // 单图上传
'simpleupload', // 单图上传 'insertimage', // 多图上传
'insertimage', // 多图上传 // 'link', // 超链接
// 'link', // 超链接 'emotion', // 表情
'emotion', // 表情 'spechars', // 特殊字符
'spechars', // 特殊字符 'searchreplace', // 查询替换
'searchreplace', // 查询替换 // 'map', // Baidu地图
// 'map', // Baidu地图 // 'insertvideo', // 视频
// 'insertvideo', // 视频 'justifyleft', // 居左对齐
'justifyleft', // 居左对齐 'justifyright', // 居右对齐
'justifyright', // 居右对齐 'justifycenter', // 居中对齐
'justifycenter', // 居中对齐 'justifyjustify', // 两端对齐
'justifyjustify', // 两端对齐 // 'fullscreen', // 全屏
// 'fullscreen', // 全屏 'imagecenter', // 居中
'imagecenter', // 居中 'edittip ', // 编辑提示
'edittip ', // 编辑提示 // 'customstyle', // 自定义标题
// 'customstyle', // 自定义标题 // 'background', // 背景
// 'background', // 背景 // 'scrawl', // 涂鸦
// 'scrawl', // 涂鸦 // 'music', // 音乐
// 'music', // 音乐 // 'inserttable', // 插入表格
// 'inserttable', // 插入表格 // 'drafts', // 从草稿箱加载
// 'drafts', // 从草稿箱加载 // 'charts', // 图表
// 'charts', // 图表 // 'fontfamily', // 字体
// 'fontfamily', // 字体 // 'insertcode', // 代码语言
// 'insertcode', // 代码语言 'insertorderedlist', // 有序列表
'insertorderedlist', // 有序列表 // 'insertunorderedlist', // 无序列表
// 'insertunorderedlist', // 无序列表 'lineheight', // 行间距
'lineheight', // 行间距 'rowspacingtop', // 段前距
'rowspacingtop', // 段前距 'rowspacingbottom', // 段后距
'rowspacingbottom', // 段后距 'backcolor', // 背景色
'backcolor', // 背景色 // 'preview', // 预览
// 'preview', // 预览
],
], ],
}); ],
that.timeout2 = setTimeout(() => { });
if (document.getElementById('editor_id')) { that.timeout2 = setTimeout(() => {
console.log('进来了'); if (document.getElementById('editor_id')) {
const { sid, commentParams } = that.props; const { sid, commentParams } = that.props;
if (commentParams.intro && commentParams.intro.length == 1) { if (commentParams.intro && commentParams.intro.length == 1) {
if (commentParams.intro[0].type == 'editor' && commentParams.intro[0].value != '') { if (commentParams.intro[0].type == 'editor' && commentParams.intro[0].value != '') {
that.uEditor.ready(() => { that.uEditor.ready(() => {
that.uEditor.setContent(commentParams.intro[0].value); that.uEditor.setContent(commentParams.intro[0].value);
}); });
}
} }
} }
that.uEditor.ready(() => { }
that.uEditor.setHeight(600); that.uEditor.ready(() => {
that.uEditor.addListener('contentChange', () => { that.uEditor.setHeight(600);
that.props.uEditorChange(this.uEditor.getContent()); that.uEditor.addListener('contentChange', () => {
}); that.props.uEditorChange(this.uEditor.getContent());
}); });
}, 800); });
// this.editor = ue; }, 800);
} // this.editor = ue;
}, 800); } else {
that.setTimeout3 = setTimeout(() => {
that.renderEditor();
}, 200);
}
} }
priviewImg = (img) => { priviewImg = (img) => {
this.setState({ 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