Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
董佳音
/
networkSchool
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
董佳音
2017-10-12 14:07:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
67c189a5b759f1ee3fc4b6540d5a4d5475184a9e
67c189a5
1 parent
352f288d
修改用户翻页,预约模块管理,用户个人中心课程管理倒计时显示
显示空白字符变更
内嵌
并排对比
正在显示
10 个修改的文件
包含
727 行增加
和
362 行删除
dist/stylesheets/style.css
etc/umd.template.html
src/ape/AboutClassApe.js
src/ape/CreateUserApe.js
src/ape/LoginOrRegister.js
src/ape/ManagementHomePageApe.js
src/ape/MyCenterApe.js
src/ape/MyCoursesApe.js
src/main.js
src/proxy/ClassDataProxy.js
dist/stylesheets/style.css
查看文件 @
67c189a
...
...
@@ -800,12 +800,12 @@ body{
border
:
none
;
outline
:
none
;
padding-left
:
10px
;
width
:
16
5
px
;
width
:
16
0
px
;
}
.liveInfoRightInputBtn
{
width
:
18px
;
height
:
18px
;
margin
:
5px
0
5px
5px
;
cursor
:
pointer
;
}
.liveInfoCenter
{
...
...
@@ -899,6 +899,7 @@ body{
}
.classHandlePort1
{
margin
:
0
12px
;
cursor
:
default
;
}
.classHandlerPageMsg
{
font-size
:
12px
;
...
...
@@ -1803,7 +1804,7 @@ body{
.courseMinuteList
{
float
:
left
;
margin-top
:
8px
;
height
:
400px
;
height
:
auto
;
}
.courseMinuteListTimeTit
{
height
:
60px
;
...
...
etc/umd.template.html
查看文件 @
67c189a
...
...
@@ -581,30 +581,31 @@
</div>
<div
class=
"classManagementRightContent"
id=
"courseContent3"
>
</div>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox3"
>
<div
id=
"classHandlerPageBox3"
>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox3_0"
>
<table
width=
"100%"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tbody>
<tr>
<td
height=
"60"
colspan=
"11"
class=
"tr_bottom"
style=
""
>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg3
"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg3_0
"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<ul
class=
"classHandlerPageInfoBox"
>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage3
"
>
首页
</span>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage3_0
"
>
首页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage3
"
>
上一页
</span>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage3_0
"
>
上一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage3
"
>
下一页
</span>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage3_0
"
>
下一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage3
"
>
尾页
</span>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage3_0
"
>
尾页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<input
id=
"classHandlerPageInfoInput3
"
class=
"classHandlerPageInfoInput"
type=
"text"
>
<input
id=
"classHandlerPageInfoInput3_0
"
class=
"classHandlerPageInfoInput"
type=
"text"
>
</li>
<li
class=
"classHandlerPageInfo classHandlerPageInfoCheck"
>
<span
id=
"classHandlerSpecificPage3
"
>
GO
</span>
<span
id=
"classHandlerSpecificPage3_0
"
>
GO
</span>
</li>
</ul>
</td>
...
...
@@ -612,6 +613,69 @@
</tbody>
</table>
</div>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox3_1"
>
<table
width=
"100%"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tbody>
<tr>
<td
height=
"60"
colspan=
"11"
class=
"tr_bottom"
style=
""
>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg3_1"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<ul
class=
"classHandlerPageInfoBox"
>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage3_1"
>
首页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage3_1"
>
上一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage3_1"
>
下一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage3_1"
>
尾页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<input
id=
"classHandlerPageInfoInput3_1"
class=
"classHandlerPageInfoInput"
type=
"text"
>
</li>
<li
class=
"classHandlerPageInfo classHandlerPageInfoCheck"
>
<span
id=
"classHandlerSpecificPage3_1"
>
GO
</span>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox3_2"
>
<table
width=
"100%"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tbody>
<tr>
<td
height=
"60"
colspan=
"11"
class=
"tr_bottom"
style=
""
>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg3_2"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<ul
class=
"classHandlerPageInfoBox"
>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage3_2"
>
首页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage3_2"
>
上一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage3_2"
>
下一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage3_2"
>
尾页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<input
id=
"classHandlerPageInfoInput3_2"
class=
"classHandlerPageInfoInput"
type=
"text"
>
</li>
<li
class=
"classHandlerPageInfo classHandlerPageInfoCheck"
>
<span
id=
"classHandlerSpecificPage3_2"
>
GO
</span>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"classManagementRight"
id=
"classManagementRight4"
>
<div
class=
"classManagementRightTitle"
id=
"classManagementRightTitle4"
>
...
...
@@ -626,30 +690,31 @@
</div>
<div
class=
"classManagementRightContent classManagementRightContent0"
id=
"courseContent4"
>
</div>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox4"
>
<div
id=
"classHandlerPageBox4"
>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox4_0"
>
<table
width=
"100%"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tbody>
<tr>
<td
height=
"60"
colspan=
"11"
class=
"tr_bottom"
style=
""
>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg4
"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg4_0
"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<ul
class=
"classHandlerPageInfoBox"
>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage4
"
>
首页
</span>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage4_0
"
>
首页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage4
"
>
上一页
</span>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage4_0
"
>
上一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage4
"
>
下一页
</span>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage4_0
"
>
下一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage4
"
>
尾页
</span>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage4_0
"
>
尾页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<input
id=
"classHandlerPageInfoInput4
"
class=
"classHandlerPageInfoInput"
type=
"text"
>
<input
id=
"classHandlerPageInfoInput4_0
"
class=
"classHandlerPageInfoInput"
type=
"text"
>
</li>
<li
class=
"classHandlerPageInfo classHandlerPageInfoCheck"
>
<span
id=
"classHandlerSpecificPage4
"
>
GO
</span>
<span
id=
"classHandlerSpecificPage4_0
"
>
GO
</span>
</li>
</ul>
</td>
...
...
@@ -657,6 +722,38 @@
</tbody>
</table>
</div>
<div
class=
"classHandlerPageBox"
id=
"classHandlerPageBox4_1"
>
<table
width=
"100%"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tbody>
<tr>
<td
height=
"60"
colspan=
"11"
class=
"tr_bottom"
style=
""
>
<span
class=
"classHandlerPageMsg"
id=
"classHandlerPageMsg4_1"
style=
"line-height: 38px; padding-left: 20px; float: left"
>
第1页/共2页,有16个记录
</span>
<ul
class=
"classHandlerPageInfoBox"
>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerHomePage"
id=
"classHandlerHomePage4_1"
>
首页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerUpPage"
id=
"classHandlerUpPage4_1"
>
上一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerDownPage"
id=
"classHandlerDownPage4_1"
>
下一页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<span
class=
"classHandlerEndPage"
id=
"classHandlerEndPage4_1"
>
尾页
</span>
</li>
<li
class=
"classHandlerPageInfo"
>
<input
id=
"classHandlerPageInfoInput4_1"
class=
"classHandlerPageInfoInput"
type=
"text"
>
</li>
<li
class=
"classHandlerPageInfo classHandlerPageInfoCheck"
>
<span
id=
"classHandlerSpecificPage4_1"
>
GO
</span>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"classManagementRight"
id=
"classManagementRight5"
>
<div
class=
"classManagementRightTitle"
id=
"classManagementRightTitle5"
>
...
...
@@ -1953,8 +2050,8 @@
</div>
<div
class=
""
>
<select
class=
"createUserRole"
name=
"createUserRole"
id=
"createUserRole"
>
<option
value=
"0"
>
老师
</option>
<option
value=
"1"
>
监课
</option>
<option
value=
"1"
>
老师
</option>
<option
value=
"2"
>
监课
</option>
</select>
</div>
<div
class=
"removeHandlerBtn"
>
...
...
src/ape/AboutClassApe.js
查看文件 @
67c189a
...
...
@@ -36,11 +36,11 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor=
<
td
width
=
"8%"
class
=
"tr_main"
>
{
_age
}
<
/td
>
<
td
width
=
"8%"
class
=
"tr_main"
>
{
_course
}
<
/td
>
<
td
width
=
"10%"
class
=
"tr_main tr_mainRight"
align
=
"center"
>
<
a
class
=
"classHandlePort"
href
=
"###"
>&
nbsp
;
<
/a
>
<
a
id
=
"{_removeInd}"
class
=
"classHandlePort"
href
=
"###"
>
删除
<
/a
>
<
a
class
=
"classHandlePort"
href
=
"###"
>&
nbsp
;
<
/a
>
<
a
id
=
"{_stay}"
class
=
"classHandlePort"
data
=
"{_aboutMsg}"
href
=
"###"
>
待回访
<
/a
>
<
a
class
=
"classHandlePort"
href
=
"###"
>&
nbsp
;
<
/a
>
<
a
class
=
"classHandlePort"
href
=
"javascript:void(0)"
>&
nbsp
;
<
/a
>
<
a
id
=
"{_removeInd}"
class
=
"classHandlePort"
href
=
"javascript:void(0)"
>
删除
<
/a
>
<
a
class
=
"classHandlePort"
href
=
"javascript:void(0)"
>&
nbsp
;
<
/a
>
<
a
id
=
"{_stay}"
class
=
"classHandlePort"
data
=
"{_aboutMsg}"
href
=
"javascript:void(0)"
>
待回访
<
/a
>
<
a
class
=
"classHandlePort"
href
=
"javascript:void(0)"
>&
nbsp
;
<
/a
>
<
/td
>
<
/tr
>
`
;
...
...
@@ -49,13 +49,13 @@ const adminListEnd = `</tbody></table>`;
const
adminListTit1
=
`
<
table
width
=
"100%"
align
=
"center"
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
id
=
"t_box"
class
=
"t_box"
>
<
tbody
>
<
tr
align
=
"center"
height
=
"44"
class
=
"tr_center"
bgcolor
=
"#fff"
bordercolor
=
"#e6e6e6"
>
<
th
width
=
"
6
%"
class
=
"tr_center"
>
<
th
width
=
"
7
%"
class
=
"tr_center"
>
姓名
<
/th
>
<
th
width
=
"7%"
class
=
"tr_center"
>
电话
<
/th
>
<
th
width
=
"
8
%"
class
=
"tr_center"
>
<
th
width
=
"
6
%"
class
=
"tr_center"
>
年龄
<
/th
>
<
th
width
=
"7%"
class
=
"tr_center"
>
...
...
@@ -69,22 +69,20 @@ const adminListTit1 = `<table width="100%" align="center" cellpadding="0" cellsp
//管理首页
const
adminList1
=
`
<
tr
align
=
"center"
bgcolor
=
"#FFFFFF"
height
=
"44"
bordercolor
=
"#e6e6e6"
>
<
td
width
=
"7%"
class
=
"tr_main tr_mainLeft"
>
{
_userName
}
<
/td
>
<
td
width
=
"8%"
class
=
"tr_main"
>
{
_phone
}
<
/td
>
<
td
width
=
"8%"
class
=
"tr_main"
>
{
_age
}
<
/td
>
<
td
width
=
"8%"
class
=
"tr_main"
>
{
_course
}
<
/td
>
<
td
width
=
"10%"
class
=
"tr_main tr_mainRight"
align
=
"center"
>
<
a
class
=
"classHandlePort1"
href
=
"###"
>&
nbsp
;
&
nbsp
;
<
/a
>
<
a
id
=
"{_removeInd}"
class
=
"classHandlePort"
href
=
"###"
>
删除
<
/a
>
<
a
class
=
"classHandlePort1"
href
=
"###"
>&
nbsp
;
&
nbsp
;
<
/a
>
<
td
width
=
"7%"
class
=
"tr_main"
>
{
_phone
}
<
/td
>
<
td
width
=
"6%"
class
=
"tr_main"
>
{
_age
}
<
/td
>
<
td
width
=
"7%"
class
=
"tr_main"
>
{
_course
}
<
/td
>
<
td
width
=
"9%"
class
=
"tr_main tr_mainRight"
align
=
"center"
>
<
a
class
=
"classHandlePort1"
href
=
"javascript:void(0)"
>&
nbsp
;
&
nbsp
;
<
/a
>
<
a
id
=
"{_removeInd}"
class
=
"classHandlePort"
href
=
"javascript:void(0)"
>
删除
<
/a
>
<
a
class
=
"classHandlePort1"
href
=
"javascript:void(0)"
>&
nbsp
;
&
nbsp
;
<
/a
>
<
/td
>
<
/tr
>
`
;
class
AboutClassApe
extends
Ape
{
constructor
()
{
super
();
this
.
classDateList
=
{};
//创建课堂信息
this
.
isLocalStorage
();
this
.
pageNo
=
0
;
this
.
pageNo
=
1
;
this
.
presentInd
=
1
;
this
.
addEvent
();
this
.
init
();
...
...
@@ -93,115 +91,234 @@ class AboutClassApe extends Ape {
init
()
{
$
(
'#aboutClassList4 li'
).
on
(
'click'
,
this
.
_userClassListHandler
.
bind
(
this
));
//用户列表
$
(
'#classHandlerHomePage4'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage4'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage4'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage4'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage4'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#classHandlerHomePage4_0'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage4_0'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage4_0'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage4_0'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage4_0'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#classHandlerHomePage4_1'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage4_1'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage4_1'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage4_1'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage4_1'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
}
addEvent
()
{
}
isLocalStorage
(){
}
//首页
_homePageHandler
(){
this
.
presentInd
=
1
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
0
:
this
.
_manageCourse
(
this
.
presentInd
);
break
;
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
//上页
_upPageHandler
(){
if
(
this
.
presentInd
>
1
){
if
(
this
.
presentInd
>
1
){
this
.
presentInd
--
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
0
:
this
.
_manageCourse
(
this
.
presentInd
);
break
;
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
}
//下页
_downPageHandler
(){
if
(
this
.
presentInd
<
this
.
pageNo
){
this
.
presentInd
++
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
0
:
this
.
_manageCourse
(
this
.
presentInd
);
break
;
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
}
//尾页
_endPageHandler
(){
this
.
presentInd
=
this
.
pageNo
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
0
:
this
.
_manageCourse
(
this
.
presentInd
);
break
;
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
//指定页
_assignPageHandler
(){
let
inputVal
=
$
(
'#classHandlerPageInfoInput4'
).
val
();
if
(
parseInt
(
inputVal
)
<=
this
.
pageNo
||
parseInt
(
inputVal
)
>=
1
){
this
.
userAdminHandler
(
parseInt
(
inputVal
));
let
val
;
let
ind
=
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
);
let
card
=
$
(
'#aboutClassList4 .liveInfoLeftLiCheck'
).
index
();
let
inputVal
=
$
(
'#classHandlerPageInfoInput4_'
+
card
).
val
();
if
(
parseInt
(
inputVal
)
>
this
.
pageNo
){
val
=
this
.
pageNo
;
}
else
if
(
parseInt
(
inputVal
)
<
1
){
val
=
1
;
}
else
{
val
=
parseInt
(
inputVal
)
}
switch
(
parseInt
(
ind
)){
case
0
:
this
.
_manageCourse
(
val
);
break
;
case
1
:
this
.
_manageTeacher
(
val
);
break
;
default
:
return
;
}
$
(
'#classHandlerPageInfoInput4_'
+
card
).
val
(
''
)
}
// 约课界面
userAdminHandler
(
ind
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/queryStudentMeeting/markettest'
;
let
that
=
this
;
aboutClass
(){
let
ind
=
$
(
'#aboutClassList4 .liveInfoLeftLiCheck'
).
attr
(
'data'
);
let
card
=
$
(
'#aboutClassList4 .liveInfoLeftLiCheck'
).
index
();
$
(
'#classHandlerPageBox4'
).
attr
(
'data'
,
ind
)
let
status
=
parseInt
(
ind
);
$
(
'#classHandlerPageBox4_'
+
card
).
show
().
siblings
().
hide
();
this
.
presentInd
=
1
;
switch
(
status
){
case
0
:
//课程 列表
this
.
_manageCourse
(
1
);
break
;
case
1
:
//老师 列表
this
.
_manageTeacher
(
1
);
break
;
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
timeout
:
5000
,
data
:{
siteId
:
ClassDataProxy
.
siteId
,
userType
:
ClassDataProxy
.
USER_TYPE_8
},
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
7
,
'page'
:
ind
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
//获取课堂数据
if
(
_data
&&
_data
.
code
==
200
){
let
ind
=
$
(
'#aboutClassList4'
).
find
(
'.liveInfoLeftLiCheck'
).
attr
(
'data'
);
if
(
ind
==
0
){
//显示课程界面
that
.
_gainUserClassData
(
_data
.
returnData
.
data
);
}
else
{
//显示老师界面
// that._gainUserClassData1(_data.returnData.data);
default
:
return
;
}
}
},
error
:
function
(
error
){
//alert('直播数据获取失败')
that
.
_gainUserClassDataErr
();
loger
.
log
(
error
,
'约课数据获取失败'
)
//课程 列表
_manageCourse
(
ind
){
let
that
=
this
;
this
.
publicAjax
(
8
,
ind
,
function
(
_data
){
if
(
_data
){
that
.
_coursePage
(
_data
.
returnData
.
data
);
that
.
_userCourse
(
_data
.
returnData
.
data
);
}
})
}
//老师 列表
_manageTeacher
(
ind
){
let
that
=
this
;
this
.
publicAjax
(
8
,
ind
,
function
(
_data
){
if
(
_data
){
that
.
_teacherPage
(
_data
.
returnData
.
data
);
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
}
})
}
_gainUserClassData
(
_data
){
let
_dataList
=
_data
.
users
;
_userCourse
(
_data
){
let
courseContent
=
$
(
'#courseContent4'
);
courseContent
.
empty
();
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
this
.
pageNo
=
pagenum
;
loger
.
log
(
'预约显示页码'
,
_data
)
$
(
'#classHandlerPageMsg4'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
_data
){
courseContent
.
append
(
adminListTit
);
if
(
_dataList
){
if
(
count
<=
7
){
$
(
'#classHandlerPageBox4'
).
hide
();
}
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
_dataList
=
_data
.
studentMeeting
;
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
item
=
_dataList
[
i
];
if
(
item
){
let
_adminList
=
this
.
_format
(
adminList
,{
_userName
:
_dataList
[
i
].
loginName
,
_phone
:
_dataList
[
i
].
userMobile
,
_userName
:
item
.
user_name
,
_phone
:
item
.
user_mobile
,
_age
:
'女'
,
_totalNmu
:
'2'
,
_course
:
item
.
meeting_name
,
_removeInd
:
'classDoc'
+
i
,
_stay
:
'classMedia'
+
i
,
_aboutMsg
:
item
.
id
})
courseContent
.
append
(
_adminList
);
}
courseContent
.
append
(
adminListEnd
);
}
}
else
{
this
.
_gainUserClassDataErr
();
}
}
_teacherCourse
(
_data
){
let
courseContent
=
$
(
'#courseContent4'
);
courseContent
.
empty
();
if
(
_data
){
let
_dataList
=
_data
.
studentMeeting
;
courseContent
.
append
(
adminListTit1
);
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
item
=
_dataList
[
i
];
if
(
item
){
let
_adminList
=
this
.
_format
(
adminList1
,{
_userName
:
item
.
user_name
,
_phone
:
item
.
user_mobile
,
_age
:
'女'
,
_totalNmu
:
'2'
,
_course
:
'《少儿英语》'
,
_course
:
item
.
teacherName
,
_removeInd
:
'classDoc'
+
i
,
_stay
:
'classMedia'
+
i
,
_aboutMsg
:
_dataList
[
i
]
.
id
_aboutMsg
:
item
.
id
})
courseContent
.
append
(
_adminList
);
}
courseContent
.
append
(
adminListEnd
);
}
}
else
{
this
.
_gainUserClassDataErr
();
}
}
_coursePage
(
_data
){
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
this
.
pageNo
=
pagenum
;
$
(
'#classHandlerPageMsg4_0'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
4
){
$
(
'#classHandlerPageBox4_0'
).
hide
();
}
}
}
_teacherPage
(
_data
){
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNo
=
pagenum
;
$
(
'#classHandlerPageMsg4_1'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
4
){
$
(
'#classHandlerPageBox4_1'
).
hide
();
}
}
}
_gainUserClassDataErr
(){
let
courseContent
=
$
(
'#courseContent4'
);
...
...
@@ -215,43 +332,46 @@ class AboutClassApe extends Ape {
courseContent
.
append
(
_adminList
);
courseContent
.
append
(
adminListEnd
);
}
/*_gainUserClassData1(_data){
let _dataList = _data.users;
let courseContent = $('#courseContent4');
courseContent.empty();
let count = _data.count;
let page = _data.page;
let pageno = _data.pageno;
this.pageNo = pageno;
$('#classHandlerPageMsg4').html('第'+page+'页/共'+pageno+'页,有'+count+'个记录');
courseContent.append(adminListTit1);
if(_dataList){
if(count <= 7){
$('#classHandlerPageBox4').hide();
publicAjax
(
num
,
ind
,
callback
){
if
(
ClassDataProxy
.
id
==
''
){
return
;
}
for(let i = 0;i<_dataList.length;i++){
let _adminList = this._format(adminList1,{
_userName : _dataList[i].loginName,
_phone : _dataList[i].userMobile,
_age : '女',
_totalNmu : '2',
_course : _dataList[i].userName,
_removeInd : 'classDoc'+i,
_stay : 'classMedia'+i,
_aboutMsg : _dataList[i].id
})
courseContent.append(_adminList);
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/getStudentMeetingBySite/'
+
ClassDataProxy
.
siteId
;
let
that
=
this
;
$
.
ajax
({
type
:
"GET"
,
url
:
_url
,
timeout
:
5000
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
num
,
page
:
ind
,
id
:
ClassDataProxy
.
id
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
// loger.log('预约信息斯柯达开始',_data)
//获取我的课程数据
if
(
_data
&&
_data
.
code
==
200
){
if
(
callback
){
callback
(
_data
);
}
courseContent.append(adminListEnd);
}
else
{
if
(
callback
){
callback
(
null
);
}
}
},
error
:
function
(
error
){
//alert('直播数据获取失败')
if
(
callback
){
callback
(
null
);
}
loger
.
log
(
error
,
'直播数据获取失败'
)
}
})
}
}*/
_switchover
(
evt
){
$
(
evt
.
currentTarget
).
addClass
(
'liveInfoLeftLiCheck'
).
siblings
().
removeClass
(
'liveInfoLeftLiCheck'
);
}
_userClassListHandler
(
evt
){
this
.
_switchover
(
evt
);
this
.
userAdminHandler
(
1
);
this
.
aboutClass
(
);
}
//工具类
_format
(
str
,
obj
)
{
...
...
src/ape/CreateUserApe.js
查看文件 @
67c189a
...
...
@@ -56,7 +56,6 @@ class CreateUserApe extends Ape {
}
init
()
{
$
(
'#userClassList3 li'
).
on
(
'click'
,
this
.
_userClassListHandler
.
bind
(
this
));
//用户列表
//用户管理
...
...
@@ -66,11 +65,23 @@ class CreateUserApe extends Ape {
$
(
'#createUserA'
).
on
(
'click'
,
this
.
_closeUserClassHandler
.
bind
(
this
));
//关闭创建课堂
$
(
'#createUserCancel'
).
on
(
'click'
,
this
.
_closeUserClassHandler
.
bind
(
this
));
//关闭创建课堂
$
(
'#classHandlerHomePage3'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage3'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage3'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage3'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage3'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#classHandlerHomePage3_0'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage3_0'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage3_0'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage3_0'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage3_0'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#classHandlerHomePage3_1'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage3_1'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage3_1'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage3_1'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage3_1'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#classHandlerHomePage3_2'
).
on
(
'click'
,
this
.
_homePageHandler
.
bind
(
this
));
//首页
$
(
'#classHandlerUpPage3_2'
).
on
(
'click'
,
this
.
_upPageHandler
.
bind
(
this
));
//上页
$
(
'#classHandlerDownPage3_2'
).
on
(
'click'
,
this
.
_downPageHandler
.
bind
(
this
));
//下页
$
(
'#classHandlerEndPage3_2'
).
on
(
'click'
,
this
.
_endPageHandler
.
bind
(
this
));
//尾页
$
(
'#classHandlerSpecificPage3_2'
).
on
(
'click'
,
this
.
_assignPageHandler
.
bind
(
this
));
//指定页
$
(
'#courseContent3'
).
on
(
'click'
,
'.deleteClass'
,
this
.
_deleteClass
.
bind
(
this
));
//删除课堂
...
...
@@ -85,42 +96,286 @@ class CreateUserApe extends Ape {
}
_userClassListHandler
(
evt
){
this
.
_switchover
(
evt
);
this
.
userAdminHandler
(
1
);
this
.
manageUserList
(
);
}
//首页
_homePageHandler
(){
this
.
presentInd
=
1
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
case
8
:
this
.
_manageStudent
(
this
.
presentInd
);
break
;
case
2
:
this
.
_manageSupervise
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
//上页
_upPageHandler
(){
if
(
this
.
presentInd
>
1
){
if
(
this
.
presentInd
>
1
){
this
.
presentInd
--
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
case
8
:
this
.
_manageStudent
(
this
.
presentInd
);
break
;
case
2
:
this
.
_manageSupervise
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
}
//下页
_downPageHandler
(){
if
(
this
.
presentInd
<
this
.
pageNo
){
this
.
presentInd
++
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
case
8
:
this
.
_manageStudent
(
this
.
presentInd
);
break
;
case
2
:
this
.
_manageSupervise
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
}
//尾页
_endPageHandler
(){
this
.
presentInd
=
this
.
pageNo
;
this
.
userAdminHandler
(
this
.
presentInd
);
let
ind
=
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
);
switch
(
parseInt
(
ind
)){
case
1
:
this
.
_manageTeacher
(
this
.
presentInd
);
break
;
case
8
:
this
.
_manageStudent
(
this
.
presentInd
);
break
;
case
2
:
this
.
_manageSupervise
(
this
.
presentInd
);
break
;
default
:
return
;
}
}
//指定页
_assignPageHandler
(){
let
inputVal
=
$
(
'#classHandlerPageInfoInput3'
).
val
();
if
(
parseInt
(
inputVal
)
<=
this
.
pageNo
||
parseInt
(
inputVal
)
>=
1
){
this
.
userAdminHandler
(
parseInt
(
inputVal
));
let
val
;
let
ind
=
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
);
let
card
=
$
(
'#userClassList3 .liveInfoLeftLiCheck'
).
index
();
let
inputVal
=
$
(
'#classHandlerPageInfoInput3_'
+
card
).
val
();
if
(
parseInt
(
inputVal
)
>
this
.
pageNo
){
val
=
this
.
pageNo
;
}
else
if
(
parseInt
(
inputVal
)
<
1
){
val
=
1
;
}
else
{
val
=
parseInt
(
inputVal
)
}
switch
(
parseInt
(
ind
)){
case
1
:
this
.
_manageTeacher
(
val
);
break
;
case
8
:
this
.
_manageStudent
(
val
);
break
;
case
2
:
this
.
_manageSupervise
(
val
);
break
;
default
:
return
;
}
$
(
'#classHandlerPageInfoInput3_'
+
card
).
val
(
''
)
}
//公用ajax请求
publicAjax
(
data
,
num
,
ind
,
callback
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/users/getUser'
;
let
that
=
this
;
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
timeout
:
5000
,
data
:
data
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
num
,
page
:
ind
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
if
(
_data
&&
_data
.
code
==
200
){
if
(
callback
){
callback
(
_data
);
}
}
else
{
if
(
callback
){
callback
(
null
);
}
}
},
error
:
function
(
error
){
if
(
callback
){
callback
(
null
);
}
loger
.
log
(
error
,
'管理员用户获取失败'
)
}
})
}
//用户管理 列表
manageUserList
(){
let
ind
=
$
(
'#userClassList3 .liveInfoLeftLiCheck'
).
attr
(
'data'
);
let
card
=
$
(
'#userClassList3 .liveInfoLeftLiCheck'
).
index
();
$
(
'#classHandlerPageBox3'
).
attr
(
'data'
,
ind
)
let
status
=
parseInt
(
ind
);
$
(
'#classHandlerPageBox3_'
+
card
).
show
().
siblings
().
hide
();
this
.
presentInd
=
1
;
switch
(
status
){
case
1
:
//老师 列表
this
.
_manageTeacher
(
1
);
break
;
case
8
:
//学生 列表
this
.
_manageStudent
(
1
);
break
;
case
2
:
//兼课 列表
this
.
_manageSupervise
(
1
);
break
;
default
:
return
;
}
}
//老师 列表
_manageTeacher
(
ind
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
userType
:
1
};
let
that
=
this
;
this
.
publicAjax
(
data
,
7
,
ind
,
function
(
_data
){
if
(
_data
){
that
.
_teacherPage
(
_data
.
returnData
.
data
);
that
.
_userCourse
(
_data
.
returnData
.
data
);
}
})
}
//学生 列表
_manageStudent
(
ind
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
userType
:
8
};
let
that
=
this
;
this
.
publicAjax
(
data
,
7
,
ind
,
function
(
_data
){
if
(
_data
){
that
.
_studentPage
(
_data
.
returnData
.
data
);
that
.
_userCourse
(
_data
.
returnData
.
data
);
}
})
}
//兼课 列表
_manageSupervise
(
ind
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
userType
:
2
};
let
that
=
this
;
this
.
publicAjax
(
data
,
7
,
ind
,
function
(
_data
){
if
(
_data
){
that
.
_supervisePage
(
_data
.
returnData
.
data
);
that
.
_userCourse
(
_data
.
returnData
.
data
);
}
})
}
_userCourse
(
_data
){
let
_dataList
=
_data
.
users
;
let
courseContent
=
$
(
'#courseContent3'
);
courseContent
.
empty
();
courseContent
.
append
(
adminListTit
);
if
(
_dataList
.
length
>
0
){
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
_adminList
=
this
.
_format
(
adminList
,{
_loginName
:
_dataList
[
i
].
loginName
,
_userName
:
_dataList
[
i
].
userName
,
_course
:
'暂无'
,
_totalNmu
:
'2'
,
_latest
:
'1'
,
_removeInd
:
'classDoc'
+
i
,
_joinInd
:
'classMedia'
+
i
,
_aboutMsg
:
_dataList
[
i
].
id
})
courseContent
.
append
(
_adminList
);
}
courseContent
.
append
(
adminListEnd
);
}
else
{
this
.
_gainUserClassDataErr
();
}
}
_gainUserClassDataErr
(){
let
courseContent
=
$
(
'#courseContent3'
);
courseContent
.
empty
();
courseContent
.
append
(
adminListTit
);
let
_adminList
=
'<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6">'
+
'<td class="tr_main tr_mainNone">'
+
'该课堂暂无课程数据~'
+
'</td>>'
+
'</tr>'
courseContent
.
append
(
_adminList
);
courseContent
.
append
(
adminListEnd
);
}
_teacherPage
(
_data
){
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNo
=
pagenum
;
console
.
log
(
'sssssssss'
,
count
)
$
(
'#classHandlerPageMsg3_0'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
7
){
$
(
'#classHandlerPageBox3_0'
).
hide
();
}
}
}
_studentPage
(
_data
){
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNo
=
pagenum
;
console
.
log
(
'sssssssss'
,
count
)
$
(
'#classHandlerPageMsg3_1'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
7
){
$
(
'#classHandlerPageBox3_1'
).
hide
();
}
}
}
_supervisePage
(
_data
){
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNo
=
pagenum
;
console
.
log
(
'sssssssss'
,
count
)
$
(
'#classHandlerPageMsg3_2'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
7
){
$
(
'#classHandlerPageBox3_2'
).
hide
();
}
}
}
//用户管理 创建用户界面
userAdminHandler
(
ind
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/users/getUser'
;
let
that
=
this
;
let
data
=
$
(
'#userClassList3'
).
find
(
'.liveInfoLeftLiCheck'
).
attr
(
'data'
);
...
...
@@ -230,6 +485,8 @@ class CreateUserApe extends Ape {
let
identity
=
document
.
getElementById
(
"createUserIdentity"
);
//身份证号
let
mail
=
document
.
getElementById
(
"createUserMail"
);
//邮箱
let
createUserRole
=
$
(
'#createUserRole'
).
val
();
let
createUserNote
=
$
(
'#createUserNote'
).
val
();
//备注信息
let
createUserAbortTime
=
$
(
'#createUserAbortTime'
).
html
();
//有效期
...
...
@@ -240,7 +497,7 @@ class CreateUserApe extends Ape {
"companyName"
:
null
,
//公司名字
"userName"
:
createUserRealName
.
value
,
//用户名
"userRole"
:
3
,
// 用户角色 0超级管理员,1管理员,2监课,3老师,4学生
"userType"
:
1
,
"userType"
:
parseInt
(
createUserRole
)
,
"userEmail"
:
mail
.
value
,
// 用户邮箱
"userMobile"
:
parseInt
(
phone
.
value
),
// 用户手机号
"content"
:
createUserNote
,
// 用户简介
...
...
@@ -264,7 +521,7 @@ class CreateUserApe extends Ape {
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
//修改信息输入框
ErrorApe
.
showWarnError
(
'注册成功'
);
$
(
'#createUserBox'
).
hide
();
that
.
userAdminHandl
er
(
1
);
that
.
_manageTeach
er
(
1
);
}
else
{
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
//修改信息输入框
ErrorApe
.
showWarnError
(
_data
.
returnData
.
data
.
msg
);
...
...
src/ape/LoginOrRegister.js
查看文件 @
67c189a
...
...
@@ -264,7 +264,8 @@ class LoginOrRegister extends Ape {
"userMobile"
:
parseInt
(
phone
.
value
),
// 用户手机号
"content"
:
"2017-09-01"
,
// 用户简介
"groupId"
:
1
,
//用户组id
"IDcard"
:
123123
"IDcard"
:
123123
,
"siteId"
:
ClassDataProxy
.
siteId
}
let
that
=
this
;
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/users/addUser'
;
...
...
src/ape/ManagementHomePageApe.js
查看文件 @
67c189a
...
...
@@ -19,36 +19,36 @@ const adminListTit = `<table width="100%" align="center" cellpadding="0" cellspa
<
th
width
=
"8%"
class
=
"tr_center"
>
课堂号
<
/th
>
<
th
width
=
"
7
%"
class
=
"tr_center"
>
<
th
width
=
"
8
%"
class
=
"tr_center"
>
老师
<
/th
>
<
th
width
=
"
6
%"
class
=
"tr_center"
>
<
th
width
=
"
7
%"
class
=
"tr_center"
>
课堂状态
<
/th
>
<
th
width
=
"20%"
class
=
"tr_center"
>
课堂时间
<
/th
>
<
th
width
=
"
6
%"
class
=
"tr_center"
>
<
th
width
=
"
5
%"
class
=
"tr_center"
>
在线人数
<
/th
>
<
th
width
=
"
23
%"
class
=
"tr_center"
>
<
th
width
=
"
19
%"
class
=
"tr_center"
>
操作
<
/th
>
<
/tr
>
`
;
//管理首页
const
adminList
=
`
<
tr
align
=
"center"
bgcolor
=
"#FFFFFF"
height
=
"44"
bordercolor
=
"#e6e6e6"
>
<
td
width
=
"
7
%"
class
=
"tr_main tr_mainLeft"
>
{
_meetingName
}
<
/td
>
<
td
width
=
"
8
%"
class
=
"tr_main tr_mainLeft"
>
{
_meetingName
}
<
/td
>
<
td
width
=
"7%"
class
=
"tr_main"
>
{
_esenglish
}
<
/td
>
<
td
width
=
"
7
%"
class
=
"tr_main"
>
{
_userName
}
<
/td
>
<
td
width
=
"
8
%"
class
=
"tr_main"
>
{
_userName
}
<
/td
>
<
td
width
=
"6%"
class
=
"tr_main"
>
{
_stateInfo
}
<
/td
>
<
td
width
=
"18%"
class
=
"tr_main"
>
{
_time
}
<
/td
>
<
td
width
=
"6%"
class
=
"tr_main"
>
{
_onlineLen
}
<
/td
>
<
td
width
=
"21%"
class
=
"tr_main tr_mainRight"
align
=
"center"
data
=
"{_esenglish}"
>
<
a
id
=
"{_DocInd}"
class
=
"classHandlePort"
href
=
"###"
>
课件
<
/a
>
<
a
id
=
"{_updateInd}"
class
=
"classHandlePort"
href
=
"###"
>
修改
<
/a
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort deleteClass"
href
=
"#"
>
删除
<
/a
>
<
a
data
=
"{_joinInd}"
class
=
"classHandlePort joinClass"
href
=
"#"
>
加入课堂
<
/a
>
<
td
width
=
"5%"
class
=
"tr_main"
>
{
_onlineLen
}
<
/td
>
<
td
width
=
"19%"
class
=
"tr_main tr_mainRight"
align
=
"center"
data
=
"{_esenglish}"
>
<
a
id
=
"{_DocInd}"
class
=
"classHandlePort"
href
=
"javascript:void(0);"
>
课件
<
/a
>
<
a
id
=
"{_updateInd}"
class
=
"classHandlePort"
href
=
"javascript:void(0);"
>
修改
<
/a
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort deleteClass"
href
=
"javascript:void(0);"
>
删除
<
/a
>
<
a
data
=
"{_joinInd}"
class
=
"classHandlePort joinClass"
href
=
"javascript:void(0);"
>
加入课堂
<
/a
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort updatacover"
value
=
"{_value}"
href
=
"javascript:void(0);"
>
上传封面
<
/a
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort generalize"
value
=
"{_value}"
href
=
"javascript:void(0);"
>
推广
<
/a
>
...
...
@@ -99,6 +99,8 @@ class ManagementHomePageApe extends Ape {
$
(
'#updataPhotoInput'
).
on
(
'change'
,
this
.
_updataPhotoBtnHandler
.
bind
(
this
));
//上传课堂封面
$
(
'#updataPhotoBtn'
).
on
(
'click'
,
this
.
_submitBtnHandler
.
bind
(
this
));
//上传课堂封面 上传按钮
$
(
'#liveInfoRightInputBtn0'
).
on
(
'click'
,
this
.
searchClass
.
bind
(
this
));
//搜索
}
addEvent
()
{
...
...
@@ -273,8 +275,8 @@ class ManagementHomePageApe extends Ape {
this
.
_adminInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
that
.
_adminLivePage
(
_data
.
returnData
.
data
);
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -330,8 +332,8 @@ class ManagementHomePageApe extends Ape {
this
.
_adminInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
that
.
_adminNotPage
(
_data
.
returnData
.
data
);
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -356,8 +358,8 @@ class ManagementHomePageApe extends Ape {
this
.
_adminInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
that
.
_adminOverPage
(
_data
.
returnData
.
data
);
that
.
_adminLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -375,68 +377,6 @@ class ManagementHomePageApe extends Ape {
}
}
}
//点击翻页
detailPage
(
ind
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/meeting/getMeeting'
;
let
that
=
this
;
let
status
=
$
(
'#liveInfoList0'
).
find
(
'.liveInfoLeftLiCheck'
).
attr
(
'data'
);
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
data
:{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
status
},
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
page
:
ind
,
pageno
:
2
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
if
(
_data
&&
_data
.
code
==
200
){
that
.
_gainClassData
(
_data
.
returnData
.
data
);
}
},
error
:
function
(
error
){
that
.
_gainUserClassDataErr
();
console
.
log
(
error
,
'管理员首页'
)
}
})
}
_gainClassData
(
_data
){
let
courseContent
=
$
(
'#courseContent0'
);
courseContent
.
empty
();
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNo
=
pagenum
;
$
(
'#classHandlerPageMsg0_0'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
courseContent
.
append
(
adminListTit
);
if
(
_dataList
){
//
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
_adminList
=
this
.
_format
(
adminList
,{
_meetingName
:
_dataList
[
i
].
meetingName
,
_esenglish
:
_dataList
[
i
].
meetingNumber
,
_userName
:
_dataList
[
i
].
create_user
,
_stateInfo
:
'准备'
,
_time
:
_dataList
[
i
].
beginTime
+
' - '
+
_dataList
[
i
].
endTime
,
_onlineLen
:
'0'
,
_DocInd
:
'classDoc'
+
i
,
_mediaInd
:
'classMedia'
+
i
,
_musicInd
:
'classMusic'
+
i
,
_updateInd
:
'classUpdate'
+
i
,
_updatacover
:
'updatacover'
+
i
,
_removeInd
:
_dataList
[
i
].
id
,
_value
:
_dataList
[
i
].
meetingPhoto
?
_dataList
[
i
].
meetingPhoto
:
''
,
_joinInd
:
_dataList
[
i
].
meetingNumber
})
courseContent
.
append
(
_adminList
);
}
courseContent
.
append
(
adminListEnd
);
}
}
_gainUserClassDataErr
(){
let
courseContent
=
$
(
'#courseContent0'
);
courseContent
.
empty
();
...
...
@@ -569,6 +509,9 @@ class ManagementHomePageApe extends Ape {
}
})
}
searchClass
(){
loger
.
log
(
'搜索'
)
}
_switchover
(
evt
){
$
(
evt
.
currentTarget
).
addClass
(
'liveInfoLeftLiCheck'
).
siblings
().
removeClass
(
'liveInfoLeftLiCheck'
);
}
...
...
src/ape/MyCenterApe.js
查看文件 @
67c189a
...
...
@@ -330,7 +330,6 @@ class MyCenterApe extends Ape {
studentListSwitch
(){
//首页课程
let
ind
=
$
(
'#studentInfoList .liveInfoLeftLiCheck'
).
attr
(
'data'
);
// this._studentStudyModule();
switch
(
parseInt
(
ind
)){
case
0
:
//待学习
...
...
@@ -347,7 +346,6 @@ class MyCenterApe extends Ape {
default
:
return
;
}
}
//学生端首页默认数据
detailPageStudent
(){
...
...
@@ -384,10 +382,7 @@ class MyCenterApe extends Ape {
isLocalStorage
(){
this
.
detailpage
();
loger
.
log
(
'登录老师首页'
,
ClassDataProxy
.
userType
,
ClassDataProxy
.
USER_TYPE_1
)
$
(
'#lanclassBox'
).
hide
();
loger
.
log
(
'显示头像数据'
,
ClassDataProxy
.
userPhoto
)
if
(
ClassDataProxy
.
userPhoto
==
null
||
ClassDataProxy
.
userPhoto
==
''
){
$
(
'#myCenterImg'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
)
//个人信息首页
$
(
'#personagePortrait'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
)
//个人信息
...
...
@@ -432,7 +427,6 @@ class MyCenterApe extends Ape {
}
}
/*-------------------老师-------------------*/
teacherListSwitch
(){
let
ind
=
$
(
'#teacherInfoList .liveInfoLeftLiCheck'
).
attr
(
'data'
);
...
...
@@ -472,29 +466,35 @@ class MyCenterApe extends Ape {
}
//老师端首页课程数据渲染
_teacherCourseCourse
(
_data
){
if
(
_data
){
let
myCurriculumInfo
=
$
(
'#myCurriculumInfo'
);
myCurriculumInfo
.
empty
();
loger
.
log
(
'skdfjslfsdfsssssssssss'
,
_data
)
let
that
=
this
;
if
(
_data
)
{
setInterval
(
function
()
{
myCurriculumInfo
.
empty
();
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
)
{
let
item
=
_data
[
i
];
let
timer
=
ClassDataProxy
.
getTimeCountDown
(
item
.
meetingBeginTime
,
item
.
meetingEndTime
)
loger
.
log
(
'skdfjslfsdfsssssssssss'
,
timer
)
if
(
item
)
{
let
curInfo
=
this
.
_format
(
curriculumList
,
{
let
lastTimer
=
0
;
let
timer
=
ClassDataProxy
.
getTimeCountDown
(
item
.
meetingBeginTime
,
item
.
meetingEndTime
)
if
(
timer
.
indexOf
(
'|'
)
!=-
1
){
timer
=
timer
.
substr
(
0
,
timer
.
length
-
1
);
lastTimer
=
1
;
}
else
if
(
timer
.
indexOf
(
'.'
)
!=-
1
){
timer
=
timer
.
substr
(
0
,
timer
.
length
-
1
);
lastTimer
=
0
;
}
let
curInfo
=
that
.
_format
(
curriculumList
,
{
_infoTit
:
item
.
meetingName
,
_meetingNumber
:
item
.
meetingNumber
,
_countDown
:
that
.
loadMeeting
(
item
),
// _isShow: (timer != '已结束') ? 'block' : 'none'
_countDown
:
timer
,
_isShow
:
(
lastTimer
==
1
)
?
'none'
:
'block'
})
myCurriculumInfo
.
append
(
curInfo
);
}
else
{
console
.
error
(
'_gainClassData没数据'
)
}
}
},
1000
)
}
}
//老师端首页直播数据
...
...
@@ -504,8 +504,8 @@ class MyCenterApe extends Ape {
this
.
_teacherCurriculumInfo
(
data
,
4
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
that
.
_teacherLivePage
(
_data
.
returnData
.
data
);
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -515,8 +515,8 @@ class MyCenterApe extends Ape {
this
.
_teacherCurriculumInfo
(
data
,
4
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
that
.
_teacherNotPage
(
_data
.
returnData
.
data
);
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -526,8 +526,8 @@ class MyCenterApe extends Ape {
this
.
_teacherCurriculumInfo
(
data
,
4
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
that
.
_teacherOverPage
(
_data
.
returnData
.
data
);
that
.
_teacherLiveCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -616,42 +616,37 @@ class MyCenterApe extends Ape {
}
studentCourseList
(
_data
){
if
(
_data
){
// loger.log('学生端首页课程信息',_data)
let
myCurriculumInfo
=
$
(
'#myCurriculumInfo'
);
myCurriculumInfo
.
empty
();
let
that
=
this
;
if
(
_data
)
{
setInterval
(
function
()
{
myCurriculumInfo
.
empty
();
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
)
{
let
that
=
this
;
// setInterval(function () {
let
item
=
_data
[
i
];
let
timer
=
ClassDataProxy
.
getTimeCountDown
(
item
.
meetingBeginTime
,
item
.
meetingEndTime
)
/* if(timer.indexOf(':')!=-1){
myCurriculumInfo.empty();
}*/
let
isShow
=
0
;
if
(
timer
.
split
(
':'
)[
1
]
||
timer
.
split
(
':'
)[
1
]
>
10
){
isShow
=
1
;
}
loger
.
log
(
'newTimenewTimenewTimenewTime'
,
isShow
)
if
(
item
)
{
let
lastTimer
=
0
;
let
timer
=
ClassDataProxy
.
getTimeCountDown
(
item
.
meetingBeginTime
,
item
.
meetingEndTime
)
if
(
timer
.
indexOf
(
'|'
)
!=-
1
){
timer
=
timer
.
substr
(
0
,
timer
.
length
-
1
);
lastTimer
=
1
;
}
else
if
(
timer
.
indexOf
(
'.'
)
!=-
1
){
timer
=
timer
.
substr
(
0
,
timer
.
length
-
1
);
lastTimer
=
0
;
}
let
curInfo
=
that
.
_format
(
curriculumList
,
{
_infoTit
:
item
.
meeting_name
,
_meetingNumber
:
item
.
meetingNumber
,
//_countDown:timer ,
_countDown
:
"准备"
,
// _isShow: (isShow == 1) ? 'none' : 'block'
_countDown
:
timer
,
_isShow
:
(
lastTimer
==
1
)
?
'none'
:
'block'
})
myCurriculumInfo
.
append
(
curInfo
);
}
else
{
console
.
error
(
'_gainClassData没数据'
)
}
// },1000)
}
},
1000
)
}
}
}
//学生端首页学习数据
//学生端首页 待学习数据
_studentStudyModule
(){
let
studentMyCenterContentList
=
$
(
'#studentMyCenterContentList'
);
let
that
=
this
;
...
...
@@ -790,54 +785,6 @@ class MyCenterApe extends Ape {
}
/* //老师端课程数据
_teacherCourseRender(_data){
let courseMinuteList = $('#courseMinuteList');
courseMinuteList.empty();
let count = _data.count;
let page = _data.page;
let pageno = _data.pageno;
let pagenum = Math.ceil(count / pageno);
let _dataList = _data.meetingInfo;
this.pageNo1 = pagenum;
$('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录');
if(count <= 12){
$('#courseMinutePageBox').hide();
}
//存储数据按日期分类
this.dataList={};
for(let i = 0;i<_dataList.length;i++){
let item=_dataList[i];
if(item){
let temp = item.beginTime.split(' ')[0]
if(!this.dataList[temp]) {
this.dataList[temp] = [];
}
this.dataList[temp].push(item)
}
}
for(let key in this.dataList){
let j = (key%4)==3;
let arrList = this.dataList[key];
if(arrList){
for(let n = 0;n<arrList.length;n++){
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : n == 0 ?'block':'none',
_meetingNumber : arrList[n].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : arrList[n].meetingName,
_create_user : arrList[n].create_user,
_liveTimer : key
})
courseMinuteList.append(_classifyList)
}
}
}
}*/
//学生端 我的课程 切换
_myCenterBoxHandler
(){
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_2
){
...
...
src/ape/MyCoursesApe.js
查看文件 @
67c189a
...
...
@@ -279,8 +279,8 @@ class MyCoursesApe extends Ape {
this
.
_teacherCurriculumInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
that
.
_teacherLivePage
(
_data
.
returnData
.
data
);
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -291,8 +291,8 @@ class MyCoursesApe extends Ape {
this
.
_teacherCurriculumInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
that
.
_teacherNotPage
(
_data
.
returnData
.
data
);
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -300,11 +300,11 @@ class MyCoursesApe extends Ape {
_teacherEndLiveModule
(
ind
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
create_user
:
ClassDataProxy
.
loginName
,
meetingStatus
:
4
};
let
that
=
this
;
this
.
_teacherCurriculumInfo
(
data
,
4
,
ind
,
function
(
_data
){
this
.
_teacherCurriculumInfo
(
data
,
8
,
ind
,
function
(
_data
){
//首页直播信息渲染
if
(
_data
){
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
that
.
_teacherOverPage
(
_data
.
returnData
.
data
);
that
.
_teacherCourse
(
_data
.
returnData
.
data
);
}
})
}
...
...
@@ -343,7 +343,7 @@ class MyCoursesApe extends Ape {
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNoT
=
pagenum
;
$
(
'#courseMinutePageMsg0'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
4
){
if
(
count
<=
8
){
$
(
'#courseMinutePageBox0'
).
hide
();
}
}
...
...
@@ -357,7 +357,7 @@ class MyCoursesApe extends Ape {
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNoT
=
pagenum
;
$
(
'#courseMinutePageMsg1'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
4
){
if
(
count
<=
8
){
$
(
'#courseMinutePageBox1'
).
hide
();
}
}
...
...
@@ -371,7 +371,7 @@ class MyCoursesApe extends Ape {
let
_dataList
=
_data
.
meetingInfo
;
this
.
pageNoT
=
pagenum
;
$
(
'#courseMinutePageMsg2'
).
html
(
'第'
+
page
+
'页/共'
+
pagenum
+
'页,有'
+
count
+
'个记录'
);
if
(
count
<=
4
){
if
(
count
<=
8
){
$
(
'#courseMinutePageBox2'
).
hide
();
}
}
...
...
@@ -380,6 +380,9 @@ class MyCoursesApe extends Ape {
//学生端 我的课程 切换
studentCourses
(){
let
ind
=
$
(
'#courseInfoList .liveInfoLeftLiCheck'
).
attr
(
'data'
);
$
(
'#courseMinutePageBox0'
).
hide
();
$
(
'#courseMinutePageBox1'
).
hide
();
$
(
'#courseMinutePageBox2'
).
hide
();
switch
(
parseInt
(
ind
)){
case
0
:
//待学习
...
...
src/main.js
查看文件 @
67c189a
...
...
@@ -51,7 +51,7 @@ let _managementHomePageApe;
let
_createClassApe
;
let
_createUserApe
;
let
_createGradeApe
;
let
_aboutClassApe
;
let
_aboutClassApe
;
//约课管理
let
_listDetailsApe
;
let
_administratorApe
;
let
_playRecordApe
;
...
...
@@ -70,7 +70,7 @@ let _headSwitchTitleApe;
class
Main
{
constructor
()
{
this
.
clientVersion
=
"v1.
8.10.20171011
"
;
this
.
clientVersion
=
"v1.
9.0.20171012
"
;
loger
.
warn
(
"clientVersion:"
+
this
.
clientVersion
);
let
locationProtocol
=
location
.
protocol
;
...
...
@@ -298,11 +298,11 @@ class Main {
break
;
case
3
:
//用户管理
_createUserApe
.
userAdminHandler
(
1
);
_createUserApe
.
manageUserList
(
);
break
;
case
4
:
//约课管理
_aboutClassApe
.
userAdminHandler
(
1
);
_aboutClassApe
.
aboutClass
(
);
break
;
case
5
:
//录制管理
...
...
@@ -351,6 +351,7 @@ class Main {
//预约成功重新渲染数据
orderFinish
(){
_homeApe
.
homeAllDate
();
_myCenterApe
.
_studentCourseModule
();
}
//判断登录用户的状态
_localStorageState
(){
...
...
src/proxy/ClassDataProxy.js
查看文件 @
67c189a
...
...
@@ -191,37 +191,28 @@ class ClassDataProxy {
//计算时间戳倒计时
static
getTimeCountDown
(
start
,
end
){
/*
var date1 = new Date('2013/04/02 18:00')
var date2 = new Date('2013/04/02 19:22:21')
var s1 = date1.getTime(),s2 = date2.getTime();
var total = (s2 - s1)/1000;
var day = parseInt(total / (24*60*60));//计算整数天数
var afterDay = total - day*24*60*60;//取得算出天数后剩余的秒数
var hour = parseInt(afterDay/(60*60));//计算整数小时数
var afterHour = total - day*24*60*60 - hour*60*60;//取得算出小时数后剩余的秒数
var min = parseInt(afterHour/60);//计算整数分
var afterMin = total - day*24*60*60 - hour*60*60 - min*60;//取得算出分后剩余的秒数*/
//当前时间
let
newDate
=
Date
.
parse
(
new
Date
());
//开始时间
let
newTime
=
Date
.
parse
(
new
Date
(
start
))
//结束时间
let
endTime
=
Date
.
parse
(
new
Date
(
end
))
let
t
=
newDate
-
endTime
;
let
y
=
newDate
-
newTime
;
let
newY
=
Math
.
abs
(
y
)
let
hour
=
Math
.
floor
(
newY
/
1000
/
60
/
60
%
24
);
let
min
=
Math
.
floor
(
newY
/
1000
/
60
%
60
);
let
sec
=
Math
.
floor
(
newY
/
1000
%
60
);
let
now
=
new
Date
(),
//现在的时间
last
=
new
Date
(
start
),
//开始上课时间
eend
=
new
Date
(
end
),
now_second
=
now
.
getTime
(),
//计算现在的毫秒数为多少(记住是从1970,1,1开始算起的)
last_second
=
last
.
getTime
(),
//同上
reserve_second
=
last
.
getTime
()
+
600000
,
end_second
=
eend
.
getTime
(),
gaptime
=
parseInt
((
last_second
-
now_second
)
/
1000
),
//计算的是结束时间到现在时间的差(单位为秒)
reserveTime
=
parseInt
((
reserve_second
-
now_second
)
/
1000
),
//提前十分钟
endTime
=
parseInt
((
end_second
-
now_second
)
/
1000
),
//这里是计算还剩多少天数(一天24小时,一小时60分钟,一分钟60秒,一秒钟1000毫秒)
date
=
parseInt
(
gaptime
/
(
24
*
60
*
60
)),
hour
=
parseInt
((
gaptime
/
3600
)
%
24
),
//这里是计算还剩多少小时
min
=
parseInt
((
gaptime
/
60
)
%
60
),
//这里是计算还剩多少分钟
sec
=
parseInt
(
gaptime
%
60
);
//这里是计算还剩多少秒数
if
(
date
==
0
){
date
=
''
}
else
{
date
=
"0"
+
date
+
":"
;
}
if
(
hour
<
10
)
{
hour
=
"0"
+
hour
;
}
...
...
@@ -231,18 +222,22 @@ class ClassDataProxy {
if
(
sec
<
10
)
{
sec
=
"0"
+
sec
;
}
console
.
log
(
'ssssssssssssss'
,
t
)
if
(
t
<
0
){
if
(
y
<
0
){
return
hour
+
":"
+
min
+
":"
+
sec
;
let
result
;
if
(
gaptime
>
0
){
if
(
reserveTime
<
0
){
result
=
date
+
hour
+
":"
+
min
+
":"
+
sec
+
'.'
;
}
else
{
re
turn
'马上加入
'
;
re
sult
=
date
+
hour
+
":"
+
min
+
":"
+
sec
+
'|
'
;
}
}
else
{
return
'已结束'
;
if
(
gaptime
!=
0
){
result
=
'马上加入'
;
}
else
{
result
=
'已结束'
;
}
}
return
result
;
}
//判断是否是今天
static
getTimeDay
(
start
){
...
...
@@ -255,7 +250,7 @@ class ClassDataProxy {
let
d_month
=
oldDate
.
getMonth
()
+
1
;
let
d_day
=
oldDate
.
getDate
();
if
(
month
==
d_month
&&
day
=
=
d_day
){
if
(
month
<=
d_month
&&
day
<
=
d_day
){
return
true
;
}
else
{
return
false
;
...
...
请
注册
或
登录
后发表评论