Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
ba64b633
Commit
ba64b633
authored
Dec 17, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
be6cce9d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
326 additions
and
225 deletions
+326
-225
.eslintrc
.eslintrc
+2
-1
index.html
index.html
+1
-1
SjdMenu.js
src/components/SjdMenu.js
+27
-30
integral.js
src/models/integral.js
+64
-2
teachersinfo.js
src/models/teachersinfo.js
+5
-0
webapp.js
src/models/webapp.js
+129
-91
ThemeEditor.js
src/pages/onlineclasses/ThemeEditor.js
+98
-100
No files found.
.eslintrc
View file @
ba64b633
...
...
@@ -22,7 +22,8 @@
"__IMGCDN__": true,
"qq": true,
"ENVIRONMENT": true,
"UE": true
"UE": true,
"_": true
},
"rules":{
"import/newline-after-import": 0,
...
...
index.html
View file @
ba64b633
...
...
@@ -18,6 +18,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?157650
1188108
"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?157650
6486966
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/SjdMenu.js
View file @
ba64b633
...
...
@@ -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
{
...
...
@@ -35,31 +28,35 @@ class SjdMenu extends React.Component {
return
;
}
dispatch
({
type
:
'webapp/menuselected'
,
payload
:
{
id
,
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
:
''
,
type
:
'webapp/pageInit'
,
}).
then
(()
=>
{
dispatch
({
type
:
'webapp/menuselected'
,
payload
:
{
id
,
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: '',
// },
// },
// });
}
goHome
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
...
...
src/models/integral.js
View file @
ba64b633
...
...
@@ -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
,
},
});
},
...
...
src/models/teachersinfo.js
View file @
ba64b633
...
...
@@ -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
:
''
,
...
...
src/models/webapp.js
View file @
ba64b633
...
...
@@ -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
})
{
yield
put
({
type
:
'callstudents/pageInit'
,
});
yield
put
({
type
:
'classdetail/pageInit'
,
});
yield
put
({
type
:
'classmgt/pageInit'
,
});
yield
put
({
type
:
'clockmgt/pageInit'
,
});
yield
put
({
type
:
'course/pageInit'
,
});
yield
put
({
type
:
'coursechart/pageInit'
,
});
yield
put
({
type
:
'headquarters/pageInit'
,
});
yield
put
({
type
:
'headquartersdetail/pageInit'
,
});
yield
put
({
type
:
'hqstatistical/pageInit'
,
});
yield
put
({
type
:
'indexstaic/pageInit'
,
});
yield
put
({
type
:
'institutions/pageInit'
,
});
yield
put
({
type
:
'joinschooladd/pageInit'
,
});
yield
put
({
type
:
'login/pageInit'
,
});
yield
put
({
type
:
'officialweb/pageInit'
,
});
yield
put
({
type
:
'plancourse/pageInit'
,
});
yield
put
({
type
:
'studentclass/pageInit'
,
});
yield
put
({
type
:
'students/pageInit'
,
});
yield
put
({
type
:
'studentsinfo/pageInit'
,
});
yield
put
({
type
:
'teachers/pageInit'
,
});
yield
put
({
type
:
'teachersinfo/pageInit'
,
});
yield
put
({
type
:
'thememgt/pageInit'
,
});
yield
put
({
type
:
'integral/pageInit'
,
});
yield
put
({
type
:
'createtheme/pageInit'
,
});
yield
put
({
type
:
'analyzecenter/pageInit'
,
});
yield
put
({
type
:
'coursemateria/pageInit'
,
});
yield
put
({
type
:
'coursegatherindex/pageInit'
,
});
yield
put
({
type
:
'coursegatherdetail/pageInit'
,
});
yield
put
({
type
:
'onlineclasses/pageInit'
,
});
yield
put
({
type
:
'classrecord/pageInit'
,
});
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
:
'plancourse/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/student'
)
{
yield
put
({
type
:
'students/pageInit'
,
});
}
else
if
(
pathToRegexp
(
'/sjd/studentinfo/:id'
).
exec
(
locationPathname
))
{
yield
put
({
type
:
'studentsinfo/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/course'
)
{
yield
put
({
type
:
'course/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/classmgt'
)
{
yield
put
({
type
:
'classmgt/pageInit'
,
});
}
else
if
(
pathToRegexp
(
'/sjd/classdetail/:classid'
).
exec
(
locationPathname
))
{
yield
put
({
type
:
'classdetail/pageInit'
,
});
yield
put
({
type
:
'callstudents/pageInit'
,
});
yield
put
({
type
:
'plancourse/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/teacher'
)
{
yield
put
({
type
:
'teachers/pageInit'
,
});
}
else
if
(
pathToRegexp
(
'/sjd/teacherinfo/:id'
).
exec
(
locationPathname
))
{
yield
put
({
type
:
'teachersinfo/pageInit'
,
});
yield
put
({
type
:
'callstudents/pageInit'
,
});
}
if
(
pathToRegexp
(
'/sjd/record'
).
exec
(
locationPathname
))
{
yield
put
({
type
:
'classrecord/pageInit'
,
});
yield
put
({
type
:
'callstudents/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/institutions'
)
{
yield
put
({
type
:
'institutions/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/officialwebeditor'
)
{
yield
put
({
type
:
'officialweb/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/integralmanage'
)
{
yield
put
({
type
:
'integral/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/datacenter'
)
{
yield
put
({
type
:
'analyzecenter/pageInit'
,
});
}
else
if
(
locationPathname
==
'/sjd/singleclass'
)
{
yield
put
({
type
:
'onlineclasses/pageInit'
,
});
}
else
if
(
pathToRegexp
(
'/sjd/singleclass/detail/:id'
).
exec
(
locationPathname
))
{
yield
put
({
type
:
'onlineclasses/pageInit'
,
});
}
if
(
locationPathname
==
'/sjd/coursegather'
)
{
yield
put
({
type
:
'coursegatherindex/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
})
{
const
{
pathname
}
=
payload
;
...
...
src/pages/onlineclasses/ThemeEditor.js
View file @
ba64b633
...
...
@@ -48,114 +48,112 @@ 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
.
timeout2
);
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
,
zIndex
:
10
,
allowDivTransToP
:
false
,
// UEDITOR_HOME_URL: '../../js/ueeditor/',
materiaImgUrl
:
api
.
courseMateria
.
index
,
materiaImgParams
:
{
school_id
:
LocalStorage
.
getItem
(
'sid'
)
||
0
,
type
:
1
,
// page: 1
// perPage: 12
trans_status
:
2
,
},
elementPathEnabled
:
false
,
requestUser
:
LocalStorage
.
getItem
(
'user'
)
||
{},
serverUrl
:
api
.
editorUpload
,
imageFieldName
:
'file'
,
initialFrameHeight
:
300
,
removeFormatAttributes
:
'class,style,lang,width,height,align,hspace,valign'
,
toolbars
:
[
[
'source'
,
// 源代码
'undo'
,
// 撤销
'redo'
,
// 重做
'fontsize'
,
// 字号
'forecolor'
,
// 字体颜色
'bold'
,
// 加粗
'italic'
,
// 斜体
'underline'
,
// 下划线
// 'strikethrough', // 删除线
// 'subscript', // 下标
// 'superscript', // 上标
// 'blockquote', // 引用
// 'pasteplain', // 纯文本粘贴模式
// 'horizontal', // 分隔线
// 'removeformat', // 清除格式
// 'unlink', // 取消链接
'inserttitle'
,
// 插入标题
'simpleupload'
,
// 单图上传
'insertimage'
,
// 多图上传
// 'link', // 超链接
'emotion'
,
// 表情
'spechars'
,
// 特殊字符
'searchreplace'
,
// 查询替换
// 'map', // Baidu地图
// 'insertvideo', // 视频
'justifyleft'
,
// 居左对齐
'justifyright'
,
// 居右对齐
'justifycenter'
,
// 居中对齐
'justifyjustify'
,
// 两端对齐
// 'fullscreen', // 全屏
'imagecenter'
,
// 居中
'edittip '
,
// 编辑提示
// 'customstyle', // 自定义标题
// 'background', // 背景
// 'scrawl', // 涂鸦
// 'music', // 音乐
// 'inserttable', // 插入表格
// 'drafts', // 从草稿箱加载
// 'charts', // 图表
// 'fontfamily', // 字体
// 'insertcode', // 代码语言
'insertorderedlist'
,
// 有序列表
// 'insertunorderedlist', // 无序列表
'lineheight'
,
// 行间距
'rowspacingtop'
,
// 段前距
'rowspacingbottom'
,
// 段后距
'backcolor'
,
// 背景色
// 'preview', // 预览
],
if
(
UE
&&
document
.
getElementById
(
'editor_id'
))
{
that
.
uEditor
=
UE
.
getEditor
(
'editor_id'
,
{
autoHeightEnabled
:
false
,
zIndex
:
10
,
allowDivTransToP
:
false
,
// UEDITOR_HOME_URL: '../../js/ueeditor/',
materiaImgUrl
:
api
.
courseMateria
.
index
,
materiaImgParams
:
{
school_id
:
LocalStorage
.
getItem
(
'sid'
)
||
0
,
type
:
1
,
// page: 1
// perPage: 12
trans_status
:
2
,
},
elementPathEnabled
:
false
,
requestUser
:
LocalStorage
.
getItem
(
'user'
)
||
{},
serverUrl
:
api
.
editorUpload
,
imageFieldName
:
'file'
,
initialFrameHeight
:
300
,
removeFormatAttributes
:
'class,style,lang,width,height,align,hspace,valign'
,
toolbars
:
[
[
'source'
,
// 源代码
'undo'
,
// 撤销
'redo'
,
// 重做
'fontsize'
,
// 字号
'forecolor'
,
// 字体颜色
'bold'
,
// 加粗
'italic'
,
// 斜体
'underline'
,
// 下划线
// 'strikethrough', // 删除线
// 'subscript', // 下标
// 'superscript', // 上标
// 'blockquote', // 引用
// 'pasteplain', // 纯文本粘贴模式
// 'horizontal', // 分隔线
// 'removeformat', // 清除格式
// 'unlink', // 取消链接
'inserttitle'
,
// 插入标题
'simpleupload'
,
// 单图上传
'insertimage'
,
// 多图上传
// 'link', // 超链接
'emotion'
,
// 表情
'spechars'
,
// 特殊字符
'searchreplace'
,
// 查询替换
// 'map', // Baidu地图
// 'insertvideo', // 视频
'justifyleft'
,
// 居左对齐
'justifyright'
,
// 居右对齐
'justifycenter'
,
// 居中对齐
'justifyjustify'
,
// 两端对齐
// 'fullscreen', // 全屏
'imagecenter'
,
// 居中
'edittip '
,
// 编辑提示
// 'customstyle', // 自定义标题
// 'background', // 背景
// 'scrawl', // 涂鸦
// 'music', // 音乐
// 'inserttable', // 插入表格
// 'drafts', // 从草稿箱加载
// 'charts', // 图表
// 'fontfamily', // 字体
// 'insertcode', // 代码语言
'insertorderedlist'
,
// 有序列表
// 'insertunorderedlist', // 无序列表
'lineheight'
,
// 行间距
'rowspacingtop'
,
// 段前距
'rowspacingbottom'
,
// 段后距
'backcolor'
,
// 背景色
// 'preview', // 预览
],
});
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
!=
''
)
{
that
.
uEditor
.
ready
(()
=>
{
that
.
uEditor
.
setContent
(
commentParams
.
intro
[
0
].
value
);
});
}
],
});
that
.
timeout2
=
setTimeout
(()
=>
{
if
(
document
.
getElementById
(
'editor_id'
))
{
const
{
sid
,
commentParams
}
=
that
.
props
;
if
(
commentParams
.
intro
&&
commentParams
.
intro
.
length
==
1
)
{
if
(
commentParams
.
intro
[
0
].
type
==
'editor'
&&
commentParams
.
intro
[
0
].
value
!=
''
)
{
that
.
uEditor
.
ready
(()
=>
{
that
.
uEditor
.
setContent
(
commentParams
.
intro
[
0
].
value
);
});
}
}
that
.
uEditor
.
ready
(()
=>
{
that
.
uEditor
.
setHeight
(
600
);
that
.
uEditor
.
addListener
(
'contentChange'
,
()
=>
{
that
.
props
.
uEditorChange
(
this
.
uEditor
.
getContent
());
}
);
}
that
.
uEditor
.
ready
(()
=>
{
that
.
uEditor
.
setHeight
(
600
);
that
.
uEditor
.
addListener
(
'contentChange'
,
()
=>
{
that
.
props
.
uEditorChange
(
this
.
uEditor
.
getContent
()
);
});
},
800
);
// this.editor = ue;
}
},
800
);
});
},
800
);
// this.editor = ue;
}
else
{
that
.
setTimeout3
=
setTimeout
(()
=>
{
that
.
renderEditor
();
},
200
);
}
}
priviewImg
=
(
img
)
=>
{
this
.
setState
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment