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-09-06 16:13:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9dab0c8bf6ee1d0478396139b97cff4f824a2a26
9dab0c8b
1 parent
bbd93ada
修改管理员注册老师账号
隐藏空白字符变更
内嵌
并排对比
正在显示
10 个修改的文件
包含
284 行增加
和
178 行删除
dist/images/ensure.png
dist/stylesheets/style.css
etc/umd.template.html
src/ape/CreateClassApe.js
src/ape/ErrorApe.js
src/ape/LoginOrRegister.js
src/ape/SubscribeApe.js
src/ape/TeacherDetailApe.js
src/ape/UIControlApe.js
src/main.js
dist/images/ensure.png
0 → 100644
查看文件 @
9dab0c8
5.8 KB
dist/stylesheets/style.css
查看文件 @
9dab0c8
...
...
@@ -872,7 +872,7 @@ body{
top
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
auto
;
margin
:
0
auto
;
background
:
#fff
;
}
.createClassHandler
{
...
...
@@ -1007,9 +1007,6 @@ body{
margin-right
:
20px
;
font-size
:
12px
;
}
.classThemeInfo1
{
height
:
26px
;
}
.classThemeInfoSelect
{
height
:
30px
;
width
:
370px
;
...
...
@@ -1413,7 +1410,7 @@ body{
height
:
120px
;
position
:
absolute
;
left
:
50%
;
right
:
50%
;
top
:
0
;
margin-left
:
-150px
;
z-index
:
1
;
background
:
#fffdfd
;
...
...
@@ -1852,4 +1849,42 @@ body{
}
.createUser
{
height
:
500px
;
}
\ No newline at end of file
}
/*预约成功弹框*/
.teacherDetailReminders
{
width
:
350px
;
height
:
300px
;
}
.remindersContent
{
margin
:
40px
50px
;
text-align
:
center
;
}
.remindersImg
{
width
:
80px
;
height
:
80px
;
}
.remindersTit
{
font-size
:
22px
;
padding
:
20px
0
10px
;
}
.remindersInfo
{
font-size
:
12px
;
color
:
#999
;
}
.remindersBtn
{
background
:
#3498db
;
color
:
#fff
;
line-height
:
34px
;
height
:
34px
;
width
:
220px
;
border
:
none
;
cursor
:
pointer
;
margin-top
:
20px
;
}
.userClass
{
height
:
535px
;
}
/*用户注册信息*/
.userClassList
{
display
:
none
;
}
...
...
etc/umd.template.html
查看文件 @
9dab0c8
...
...
@@ -243,6 +243,18 @@
</div>
</div>
</div>
<!--预约老师弹窗-->
<div
class=
"userSignBox"
id=
"teacherDetailRemindersBox"
>
<div
class=
"usersign teacherDetailReminders"
id=
"teacherDetailReminders"
>
<a
href=
"javascript: void(0)"
id=
"teacherDetailRemindersA"
class=
"usersignA iconfont"
>

</a>
<div
class=
"remindersContent"
>
<img
class=
"remindersImg"
src=
"images/ensure.png"
alt=
""
>
<p
class=
"remindersTit"
>
提交成功
</p>
<p
class=
"remindersInfo"
>
三个工作日内老师会联系您,请耐心等待
</p>
<button
id=
"remindersBtn"
class=
"remindersBtn"
>
返回
</button>
</div>
</div>
</div>
<!--管理员信息-->
<div
class=
"classManagementBox"
id=
"classManagementBox"
>
<div
class=
"classManagementLeft"
id=
"classManagementLeft"
>
...
...
@@ -291,11 +303,15 @@
<span
class=
"addUserText"
>
添加用户
</span>
</div>
<div
class=
"classManagementRightTitle"
id=
"classManagementRightTitle"
>
<div
class=
"liveInfoLeft"
id=
"liveInfoList"
>
<div
class=
"liveInfoLeftLi liveInfoLeftLiCheck"
>
正在直播
</div>
<div
class=
"liveInfoLeftLi"
>
未开始
</div>
<div
class=
"liveInfoLeftLi"
>
已结束
</div>
</div>
<ul
class=
"liveInfoLeft"
id=
"liveInfoList"
>
<li
class=
"liveInfoLeftLi liveInfoLeftLiCheck"
>
正在直播
</li>
<li
class=
"liveInfoLeftLi"
>
未开始
</li>
<li
class=
"liveInfoLeftLi"
>
已结束
</li>
</ul>
<ul
class=
"liveInfoLeft userClassList"
id=
"userClassList"
>
<li
class=
"liveInfoLeftLi liveInfoLeftLiCheck"
>
全部课堂
</li>
<li
class=
"liveInfoLeftLi"
>
问题课堂
</li>
</ul>
<div
class=
"liveInfoRight"
id=
"liveInfoRight"
>
<input
class=
"liveInfoRightInput"
id=
"liveInfoRightInput"
type=
"text"
>
<img
class=
"liveInfoRightInputBtn"
id=
"liveInfoRightInputBtn"
src=
"images/nav_link_14.png"
alt=
""
>
...
...
@@ -1307,7 +1323,7 @@
</div>
<!--创建用户2级-->
<div
id=
"createUserBox"
class=
"userSignBox createClassBox"
>
<div
id=
"createUser"
class=
"createClass
createUser
"
>
<div
id=
"createUser"
class=
"createClass
userClass
"
>
<div
class=
"createClassHandler"
>
<span
class=
"createClassHandlerTitle"
id=
"createUserTitle"
>
添加老师
</span>
<a
href=
"javascript: void(0)"
id=
"createUserA"
class=
"createClassA iconfont"
>

</a>
...
...
@@ -1318,7 +1334,7 @@
用户名:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserName"
name=
"createUserName"
type=
"text"
class=
"classThemeInfo
classThemeInfo1"
placeholder=
"输入课堂主题
"
value=
""
>
<input
id=
"createUserName"
name=
"createUserName"
type=
"text"
class=
"classThemeInfo"
value=
""
>
</div>
</div>
<div
class=
"form_item"
>
...
...
@@ -1326,7 +1342,7 @@
初始密码:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserPassWord"
name=
"createUserPassWord"
type=
"text"
class=
"classThemeInfo
classThemeInfo1"
placeholder=
"输入主持人密码"
value=
""
>
<input
id=
"createUserPassWord"
name=
"createUserPassWord"
type=
"text"
class=
"classThemeInfo
"
value=
""
>
</div>
</div>
<div
class=
"form_item"
>
...
...
@@ -1334,7 +1350,7 @@
真实姓名:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserRealName"
name=
"createUserRealName"
type=
"
password"
class=
"classThemeInfo classThemeInfo1"
placeholder=
"输入课堂密码
"
>
<input
id=
"createUserRealName"
name=
"createUserRealName"
type=
"
text"
class=
"classThemeInfo
"
>
</div>
</div>
<div
class=
"form_item form_item2"
>
...
...
@@ -1354,10 +1370,18 @@
</div>
<div
class=
"form_item"
>
<label
class=
"step_page1Title"
>
手机号码:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserPhone"
name=
"createUserIdentity"
type=
"text"
class=
"classThemeInfo"
value=
""
>
</div>
</div>
<div
class=
"form_item"
>
<label
class=
"step_page1Title"
>
身份证号:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserIdentity"
name=
"createUserIdentity"
type=
"text"
class=
"classThemeInfo
classThemeInfo1"
placeholder=
"输入课堂主题
"
value=
""
>
<input
id=
"createUserIdentity"
name=
"createUserIdentity"
type=
"text"
class=
"classThemeInfo"
value=
""
>
</div>
</div>
<div
class=
"form_item"
>
...
...
@@ -1365,7 +1389,7 @@
邮箱地址:
</label>
<div
class=
"step_page1_widget"
>
<input
id=
"createUserMail"
name=
"classThemeUserName"
type=
"text"
class=
"classThemeInfo
classThemeInfo1"
placeholder=
"输入课堂主题
"
value=
""
>
<input
id=
"createUserMail"
name=
"classThemeUserName"
type=
"text"
class=
"classThemeInfo"
value=
""
>
</div>
</div>
<div
class=
"form_item"
>
...
...
@@ -1384,8 +1408,8 @@
</div>
</div>
<div
class=
"form_button"
>
<input
id=
"createUserConfirm"
type=
"button"
value=
"确定"
class=
"createClassBtn createClassConfirm btnHover"
>
<span
id=
"createUserCancel"
class=
"createClassBtn main_closeBtn"
>
取消
</span>
<input
id=
"createUserConfirm"
type=
"button"
value=
"完成"
class=
"createClassBtn createClassConfirm btnHover"
>
</div>
</div>
</div>
...
...
src/ape/CreateClassApe.js
查看文件 @
9dab0c8
...
...
@@ -7,6 +7,7 @@ import Ape from "./Ape";
import
$
from
"jquery"
;
import
ClassDataProxy
from
"proxy/ClassDataProxy"
;
import
dateUI
from
'libs/laydate'
;
import
ErrorApe
from
"./ErrorApe"
;
let
loger
=
Loger
.
getLoger
(
'PC-CreateClassApe'
);
...
...
@@ -28,7 +29,8 @@ class CreateClassApe extends Ape {
// $('#createClassBtn').on('click',this._createClassBtnHandler.bind(this));
$
(
'.recordLi'
).
on
(
'click'
,
this
.
_recordLiHandler
.
bind
(
this
));
//课堂分类
$
(
'.liveInfoLeftLi'
).
on
(
'click'
,
this
.
_liveInfoLeftLiHandler
.
bind
(
this
));
//直播信息
$
(
'#liveInfoList li'
).
on
(
'click'
,
this
.
_liveInfoLeftLiHandler
.
bind
(
this
));
//首页
$
(
'#userClassList li'
).
on
(
'click'
,
this
.
_userClassListHandler
.
bind
(
this
));
//用户列表
//创建课堂
$
(
'#createClassA'
).
on
(
'click'
,
this
.
_closeClassHandler
.
bind
(
this
));
//关闭创建课堂
...
...
@@ -43,6 +45,9 @@ class CreateClassApe extends Ape {
//用户管理
$
(
'#addUserBtn'
).
on
(
'click'
,
this
.
_addUserBtnHandler
.
bind
(
this
));
//创建用户按钮
$
(
'#createUserYes'
).
on
(
'click'
,
this
.
_createUserYesHandler
.
bind
(
this
));
//进入创建用户界面
$
(
'#createUserConfirm'
).
on
(
'click'
,
this
.
_createUserConfirmHandler
.
bind
(
this
));
//创建用户按钮
$
(
'#createUserA'
).
on
(
'click'
,
this
.
_closeUserClassHandler
.
bind
(
this
));
//关闭创建课堂
$
(
'#createUserCancel'
).
on
(
'click'
,
this
.
_closeUserClassHandler
.
bind
(
this
));
//关闭创建课堂
//日历插件
this
.
_dateUI
();
}
...
...
@@ -77,7 +82,7 @@ class CreateClassApe extends Ape {
switch
(
parseInt
(
ind
)){
case
0
:
//首页
$
(
'#addUserBtn'
).
hid
e
();
this
.
_createClassHomePag
e
();
break
;
case
1
:
//创建课堂
...
...
@@ -107,9 +112,15 @@ class CreateClassApe extends Ape {
break
;
}
}
_
liveInfoLeftLiHandl
er
(
evt
){
_
switchov
er
(
evt
){
$
(
evt
.
currentTarget
).
addClass
(
'liveInfoLeftLiCheck'
).
siblings
().
removeClass
(
'liveInfoLeftLiCheck'
);
}
_liveInfoLeftLiHandler
(
evt
){
this
.
_switchover
(
evt
);
}
_userClassListHandler
(
evt
){
this
.
_switchover
(
evt
);
}
_createClassBtnHandler
(){
$
(
'#createClassBox'
).
show
();
$
(
'#scheduleForm1'
).
show
();
...
...
@@ -120,9 +131,17 @@ class CreateClassApe extends Ape {
//获取第一步中老师列表
this
.
allotSpeaker
();
}
//首页
_createClassHomePage
(){
$
(
'#addUserBtn'
).
hide
();
$
(
'#userClassList'
).
hide
();
$
(
'#liveInfoList'
).
show
();
}
//用户管理
userAdminHandler
(){
$
(
'#addUserBtn'
).
show
();
$
(
'#userClassList'
).
show
();
$
(
'#liveInfoList'
).
hide
();
}
//获取第一步中老师列表
allotSpeaker
(){
...
...
@@ -335,6 +354,144 @@ class CreateClassApe extends Ape {
_createUserYesHandler
(){
$
(
'#createUserAccountBox'
).
hide
();
$
(
'#createUserBox'
).
show
();
let
val
=
$
(
'#createUserRole'
).
val
();
let
name
=
''
;
switch
(
parseInt
(
val
)){
case
0
:
name
=
'老师'
;
break
;
case
1
:
name
=
'兼课'
;
break
;
default
:
return
;
}
$
(
'#createUserTitle'
).
html
(
'添加'
+
name
)
$
(
"input[name='createUserTeacher']"
).
get
(
val
).
checked
=
true
;
//创建身份
}
//创建用户
_createUserConfirmHandler
(){
let
_name
=
document
.
getElementById
(
"createUserName"
);
//老师名字
let
_passWord
=
document
.
getElementById
(
"createUserPassWord"
);
//密码
let
createUserRealName
=
document
.
getElementById
(
"createUserRealName"
);
//真实姓名
let
createCharacter
=
$
(
"input[name='createUserTeacher']:checked"
).
val
();
//角色
let
phone
=
document
.
getElementById
(
"createUserPhone"
);
//手机号
let
identity
=
document
.
getElementById
(
"createUserIdentity"
);
//身份证号
let
mail
=
document
.
getElementById
(
"createUserMail"
);
//邮箱
let
createUserNote
=
$
(
'#createUserNote'
).
val
();
//备注信息
let
createUserAbortTime
=
$
(
'#createUserAbortTime'
).
html
();
//有效期
if
(
_name
.
value
&&
createUserRealName
.
value
&&
phone
.
value
&&
mail
.
value
){
let
createUserList
=
{
"loginName"
:
_name
.
value
,
// 登录名
"password"
:
parseInt
(
_passWord
.
value
),
//登录密码
"companyName"
:
null
,
//公司名字
"userName"
:
createUserRealName
.
value
,
//用户名
"userRole"
:
3
,
// 用户角色 0超级管理员,1管理员,2监课,3老师,4学生
"userType"
:
1
,
"userEmail"
:
mail
.
value
,
// 用户邮箱
"userMobile"
:
parseInt
(
phone
.
value
),
// 用户手机号
"content"
:
createUserNote
,
// 用户简介
"groupId"
:
1
,
//用户组id
"IDcard"
:
123123
,
"time"
:
1
}
let
that
=
this
;
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/users/addUser'
;
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
data
:
createUserList
,
timeout
:
5000
,
success
:
function
(
_data
){
//注册成功后 跳转登录界面
if
(
_data
&&
_data
.
code
==
200
){
loger
.
log
(
_data
,
'注册老师账号成功'
)
ErrorApe
.
showWarnError
(
'注册成功'
);
$
(
'#createUserBox'
).
hide
();
}
else
{
ErrorApe
.
showWarnError
(
_data
.
returnData
.
data
.
msg
);
}
},
error
:
function
(
error
){
console
.
log
(
error
,
'失败'
)
}
})
}
else
{
this
.
_signMail
(
mail
);
//判断邮箱
this
.
_signIdentity
(
identity
);
this
.
_signPhone
(
phone
);
//判断手机号
this
.
_signName
(
createUserRealName
);
//判断用户名
this
.
_signName
(
_name
);
//判断登录名
}
}
_signName
(
_name
){
if
(
!
_name
.
value
){
_name
.
focus
();
return
false
;
}
}
_signPhone
(
phone
){
let
reg
=
"^1[3|4|5|8][0-9]\\d{8}$"
;
let
re
=
new
RegExp
(
reg
);
if
(
!
phone
.
value
){
phone
.
focus
();
return
false
;
}
if
(
re
.
test
(
phone
.
value
))
{
$
(
'#createUserPhone'
).
css
(
'color'
,
'#000'
);
}
else
{
$
(
'#createUserPhone'
).
val
(
'手机号输入不合法'
)
.
css
(
'color'
,
'#d95136'
);
phone
.
focus
();
return
false
;
}
}
_signMail
(
mail
){
let
filter
=
/^
([
a-zA-Z0-9_
\.\-])
+
\@(([
a-zA-Z0-9
\-])
+
\.)
+
([
a-zA-Z0-9
]{2,4})
+$/
;
if
(
!
mail
.
value
){
mail
.
focus
();
return
false
;
}
if
(
filter
.
test
(
mail
.
value
)){
$
(
'#createUserMail'
).
css
(
'color'
,
'#000'
);
}
else
{
$
(
'#createUserMail'
).
val
(
'电子邮箱输入不合法'
)
.
css
(
'color'
,
'#d95136'
);
mail
.
focus
();
return
false
;
}
}
_signIdentity
(
identity
){
let
reg
=
/
(
^
\d{15}
$
)
|
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
;
if
(
!
identity
.
value
){
identity
.
focus
();
return
false
;
}
if
(
reg
.
test
(
identity
.
value
)){
$
(
'#createUserIdentity'
).
css
(
'color'
,
'#000'
);
}
else
{
$
(
'#createUserIdentity'
).
val
(
'身份证号码输入不合法'
)
.
css
(
'color'
,
'#d95136'
);
identity
.
focus
();
return
false
;
}
}
_closeUserClassHandler
(){
$
(
'#createUserBox'
).
hide
();
this
.
_clearUserClssMsg
();
}
_clearUserClssMsg
(){
$
(
'#createUserName'
).
val
(
''
);
$
(
'#createUserPassWord'
).
val
(
''
);
$
(
'#createUserRealName'
).
val
(
''
);
$
(
'#createUserPhone'
).
val
(
''
);
$
(
'#createUserIdentity'
).
val
(
''
);
$
(
'#createUserMail'
).
val
(
''
);
$
(
'#createUserNote'
).
val
(
''
);
}
//设置当前时间 给输入框默认值
_setNewTime
(){
...
...
@@ -357,6 +514,9 @@ class CreateClassApe extends Ape {
this
.
_setMarginTopHandler
(
$
(
'#warnHintBox'
));
//错误提示
this
.
_setMarginTopHandler
(
$
(
'#removeHandler'
));
//删除
this
.
_setMarginTopHandler
(
$
(
'#updateInputBox'
));
//修改信息输入框
this
.
_setMarginTopHandler
(
$
(
'#teacherDetailReminders'
));
//预约成功弹框
this
.
_setMarginTopHandler
(
$
(
'#createUser'
));
//注册老师账号
this
.
_setMarginTopHandler
(
$
(
'#createClass'
));
//创建课堂
}
//设置弹框位置 方法
_setMarginTopHandler
(
_data
){
...
...
src/ape/ErrorApe.js
查看文件 @
9dab0c8
...
...
@@ -21,8 +21,8 @@ class ErrorApe extends Ape {
$
(
'#createUserNo'
).
on
(
'click'
,
this
.
_createUserNoHandler
.
bind
(
this
));
//取消创建用户
$
(
'#createUserBoxA'
).
on
(
'click'
,
this
.
_createUserNoHandler
.
bind
(
this
));
//取消创建用户
$
(
'#createUserCancel'
).
on
(
'click'
,
this
.
_closeCreateUserHandler
.
bind
(
this
));
//取消创建用户
$
(
'#createUserA'
).
on
(
'click'
,
this
.
_closeCreateUserHandler
.
bind
(
this
));
//取消创建用户
$
(
'#teacherDetailRemindersA'
).
on
(
'click'
,
this
.
_closeteacherDetailHandler
.
bind
(
this
));
//取消创建用户
$
(
'#remindersBtn'
).
on
(
'click'
,
this
.
_closeteacherDetailHandler
.
bind
(
this
));
//取消创建用户
}
_hideWarnError
(){
clearTimeout
(
this
.
_isTime
);
...
...
@@ -60,6 +60,9 @@ class ErrorApe extends Ape {
_closeCreateUserHandler
(){
$
(
'#createUserBox'
).
hide
();
}
_closeteacherDetailHandler
(){
$
(
'#teacherDetailRemindersBox'
).
hide
();
}
}
ErrorApe
.
prototype
.
TYPE_1
=
ErrorApe
.
TYPE_1
=
1
;
//兼容直播课堂的浏览器
ErrorApe
.
prototype
.
TYPE_2
=
ErrorApe
.
TYPE_2
=
2
;
//兼容录制回放的浏览器
...
...
src/ape/LoginOrRegister.js
查看文件 @
9dab0c8
...
...
@@ -24,11 +24,6 @@ class LoginOrRegister extends Ape {
$
(
'#skipLoginBtn'
).
on
(
'click'
,
this
.
_skipLoginBtnHandler
.
bind
(
this
));
//注册跳转登录界面
$
(
'#nowUserSign'
).
on
(
'click'
,
this
.
_nowUserSignHandler
.
bind
(
this
));
//新用户注册
$
(
'#signPhone'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断手机号
$
(
'#signMail'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断手机号
$
(
'#signPassWord'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断密码
$
(
'#securityCode'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断验证码
$
(
'#signBtn'
).
on
(
'click'
,
this
.
_signBtnHandler
.
bind
(
this
));
//注册信息提交
$
(
'#userLoginBtn'
).
on
(
'click'
,
this
.
_loginBtnHandler
.
bind
(
this
));
//登录信息提交
...
...
@@ -47,23 +42,13 @@ class LoginOrRegister extends Ape {
}
isLocalStorage
(){
let
that
=
this
;
$
(
window
).
on
(
'load'
,
function
(){
if
(
!
window
.
localStorage
.
getItem
(
'status'
)){
$
(
'#homeUserLoginBtn'
).
text
(
'登录'
);
}
else
{
}
if
(
window
.
localStorage
.
getItem
(
'status'
)
==
'true'
){
let
userType
=
window
.
localStorage
.
getItem
(
'userType'
)
$
(
'#homeUserLoginBtn'
).
text
(
window
.
localStorage
.
getItem
(
'loginName'
));
// that._showAdministratorInfo();
}
})
loger
.
log
(
ClassDataProxy
.
status
,
'登录状态'
)
if
(
!
ClassDataProxy
.
status
){
$
(
'#homeUserLoginBtn'
).
text
(
'登录'
);
}
if
(
ClassDataProxy
.
status
==
'true'
){
$
(
'#homeUserLoginBtn'
).
text
(
ClassDataProxy
.
loginName
);
}
}
addEvent
()
{
...
...
@@ -129,13 +114,7 @@ class LoginOrRegister extends Ape {
$
(
'#defaultBtn'
).
addClass
(
'header_listMsgCheck'
).
siblings
().
removeClass
(
'header_listMsgCheck'
);
}
_signFocusHandler
(
evt
){
let
_ele
=
$
(
evt
.
target
);
if
(
_ele
.
css
(
'color'
)
!=
'rgb(0, 0, 0)'
){
_ele
.
val
(
''
)
.
css
(
'color'
,
'#000'
);
}
}
_signName
(
_name
){
if
(
!
_name
.
value
){
_name
.
focus
();
...
...
src/ape/SubscribeApe.js
查看文件 @
9dab0c8
...
...
@@ -49,9 +49,10 @@ class SubscribeApe extends Ape {
let
arr
=
[
'收藏成功!'
,
'预约成功!'
,
'报名成功!'
]
loger
.
log
(
_data
,
'预约信息'
)
//获取课堂数据
if
(
_data
&&
_data
.
code
==
200
){
if
(
_data
&&
_data
.
code
==
200
||
_data
.
returnData
.
data
.
msg
==
'您已预约这堂课'
){
loger
.
log
(
_data
,
'预约信息'
)
ErrorApe
.
showWarnError
(
arr
[
status
]);
$
(
'#teacherDetailRemindersBox'
).
show
();
// ErrorApe.showWarnError(arr[status]);
}
else
{
that
.
toLogin
();
}
...
...
src/ape/TeacherDetailApe.js
查看文件 @
9dab0c8
...
...
@@ -41,6 +41,9 @@ class TeacherDetailApe extends Ape {
}
isLocalStorage
(){
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_1
){
$
(
'#myCenterBox'
).
show
();
}
}
_teacherBtnHandler
(
evt
){
this
.
_clearListContent
();
...
...
src/ape/UIControlApe.js
查看文件 @
9dab0c8
...
...
@@ -11,134 +11,28 @@ let loger = Loger.getLoger('PC-UIControlApe');
class
UIControlApe
extends
Ape
{
constructor
()
{
super
();
this
.
showLoadingFull
=
true
;
//完整显示加载进度
this
.
init
();
}
init
(){
//关闭上传文档动画
$
(
'.spinnerMasker'
).
on
(
'mouseenter'
,
this
.
_showExitSpinnerMasker
.
bind
(
this
));
$
(
'.spinnerMasker'
).
on
(
'mouseleave'
,
this
.
_hideExitSpinnerMasker
.
bind
(
this
));
$
(
'.exitSpinnerMaskerA'
).
on
(
'click'
,
this
.
_exitSpinner
.
bind
(
this
));
}
//设置左侧栏不可点击
enabledLeftBar
(){
$
(
'#leftBarEnabledMask'
).
hide
();
}
//设置左侧栏可点击
disEnabledLeftBar
(){
$
(
'#leftBarEnabledMask'
).
show
();
}
//设置底部栏不可点击
enabledBottomBar
(){
$
(
'#bottomBarEnabledMask'
).
hide
();
}
//设置底部栏可点击
disEnabledBottomBar
(){
$
(
'#bottomBarEnabledMask'
).
show
();
}
//显示底部栏
showBottomDocControlBar
(){;
$
(
'#docControlBar'
).
show
();
}
//隐藏底部栏
hideBottomDocControlBar
(){
$
(
'#docControlBar'
).
hide
();
}
//设置doc上传不可点击
enabledDocBar
(){
//默认色 input按钮可点
$
(
'#docFileBtn'
).
attr
(
'disabled'
,
false
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#3A9AD9'
)
}
//设置doc上传可点击
disEnabledDocBar
(){
//灰色 input按钮不可点
$
(
'#docFileBtn'
).
attr
(
'disabled'
,
true
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#9aa5ad'
)
}
//设置media上传不可点击
enabledMediaBar
(){
//默认色 input按钮可点
$
(
'#mediaFileBtn'
).
attr
(
'disabled'
,
false
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#3A9AD9'
)
}
//设置media上传可点击
disEnabledMediaBar
(){
//灰色 input按钮不可点
$
(
'#mediaFileBtn'
).
attr
(
'disabled'
,
true
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#9aa5ad'
)
}
//设置music上传不可点击
enabledMusicBar
(){
//默认色 input按钮可点
$
(
'#musicFileBtn'
).
attr
(
'disabled'
,
false
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#3A9AD9'
)
}
//设置music上传可点击
disEnabledMusicBar
(){
//灰色 input按钮不可点
$
(
'#musicFileBtn'
).
attr
(
'disabled'
,
true
)
$
(
'.mediaFileContentMenuSpan'
).
css
(
'background'
,
'#9aa5ad'
)
}
//注册学生
$
(
'#signPhone'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断手机号
$
(
'#signMail'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断邮箱
$
(
'#signPassWord'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断密码
$
(
'#securityCode'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册判断验证码
//注册老师
$
(
'#createUserPhone'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册用户判断手机号
$
(
'#createUserMail'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册用户判断邮箱
$
(
'#createUserPassWord'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册用户判断密码
$
(
'#createUserIdentity'
).
on
(
'focus'
,
this
.
_signFocusHandler
.
bind
(
this
));
//注册用户判断身份证号
//--------------------文件上传进度控制---------------------
//显示文件上传的的loadin 上传文件通用的加载进度
showLoadingMask
(
_isFull
=
true
){
$
(
'.spinnerMasker'
).
show
();
this
.
showLoadingFull
=
Boolean
(
_isFull
);
if
(
this
.
showLoadingFull
==
true
){
//全部显示
this
.
_defaultShow
();
}
else
{
//最小化
this
.
_minimizeShow
();
}
}
//隐藏上传进度
hideLoadingMask
(){
$
(
'.spinnerMasker'
).
hide
();
$
(
'.minspinner'
).
css
(
'width'
,
'0%'
);
$
(
'.spinnerHtml'
).
html
(
''
);
}
//更新上传进度百分几0-100
updataLoadingMaskProgress
(
_progress
){
$
(
'.spinnerHtml'
).
html
(
'loading '
+
_progress
+
"%"
);
$
(
'.minspinner'
).
css
(
'width'
,
_progress
+
'%'
);
}
_exitSpinner
(){
this
.
showLoadingMask
(
!
this
.
showLoadingFull
);
}
_showExitSpinnerMasker
(){
$
(
'.exitSpinnerMasker'
).
show
();
}
_hideExitSpinnerMasker
(){
$
(
'.exitSpinnerMasker'
).
hide
();
}
_defaultShow
(){
$
(
'.spinnerMasker'
).
css
({
'width'
:
'100%'
,
"height"
:
'100%'
,
"bottom"
:
"0"
})
$
(
'.spinnerMask'
).
show
();
$
(
'.spinner'
).
show
();
$
(
'.spinnerHtml'
).
css
(
'top'
,
'50%'
);
$
(
'.exitSpinnerMasker'
).
css
(
'top'
,
'39%'
);
}
_minimizeShow
(){
let
spinnerMasker
=
$
(
'.spinnerMasker'
);
spinnerMasker
.
css
({
'width'
:
'300px'
,
"height"
:
'42px'
,
"bottom"
:
-
$
(
'.botTurn'
).
height
()
})
$
(
'.spinnerMask'
).
hide
();
$
(
'.spinner'
).
hide
();
$
(
'.spinnerHtml'
).
css
(
'top'
,
'25%'
)
$
(
'.exitSpinnerMasker'
).
css
(
'top'
,
'25%'
);
_signFocusHandler
(
evt
){
let
_ele
=
$
(
evt
.
target
);
if
(
_ele
.
css
(
'color'
)
!=
'rgb(0, 0, 0)'
){
_ele
.
val
(
''
)
.
css
(
'color'
,
'#000'
);
}
}
//---------------------------文件上传进度控制 end------------------------
}
export
default
new
UIControlApe
;
...
...
src/main.js
查看文件 @
9dab0c8
...
...
@@ -5,6 +5,7 @@ import ClassDataProxy from "proxy/ClassDataProxy";
import
localConfig
from
"local/localConfig"
;
import
UIMagnifyApe
from
"ape/UIMagnifyApe"
;
import
UIControlApe
from
"ape/UIControlApe"
;
import
ErrorApe
from
'ape/ErrorApe'
;
...
...
@@ -38,7 +39,7 @@ let _subscribeApe;
class
Main
{
constructor
()
{
this
.
clientVersion
=
"v1.7.
0
.20170906"
;
this
.
clientVersion
=
"v1.7.
1
.20170906"
;
loger
.
warn
(
"clientVersion:"
+
this
.
clientVersion
);
let
locationProtocol
=
location
.
protocol
;
...
...
@@ -186,6 +187,7 @@ class Main {
let
userMobile
=
window
.
localStorage
.
getItem
(
'userMobile'
)
||
''
;
let
userEmail
=
window
.
localStorage
.
getItem
(
'userEmail'
)
||
''
;
let
monicker
=
window
.
localStorage
.
getItem
(
'monicker'
)
||
''
;
let
status
=
window
.
localStorage
.
getItem
(
'status'
)
||
''
;
ClassDataProxy
.
userType
=
parseInt
(
userType
);
ClassDataProxy
.
loginName
=
loginName
;
...
...
@@ -195,6 +197,7 @@ class Main {
ClassDataProxy
.
userMobile
=
userMobile
;
ClassDataProxy
.
userEmail
=
userEmail
;
ClassDataProxy
.
monicker
=
monicker
;
ClassDataProxy
.
status
=
status
;
loger
.
log
(
'进入课堂时显示的type值'
,
ClassDataProxy
.
userType
)
...
...
@@ -232,6 +235,10 @@ class Main {
$
(
'#myCenterBox'
).
hide
();
$
(
'#lanclassBox'
).
hide
();
$
(
'#classifyListBox'
).
hide
();
$
(
'#recordUl .recordLi'
).
eq
(
0
).
addClass
(
'recordLiCheck'
).
siblings
().
removeClass
(
'recordLiCheck'
);
$
(
'#addUserBtn'
).
hide
();
$
(
'#liveInfoList'
).
show
();
$
(
'#userClassList'
).
hide
();
}
_teacherHome
(){
$
(
'#slideshow'
).
hide
();
...
...
@@ -242,7 +249,7 @@ class Main {
$
(
'#androidDownload'
).
hide
();
$
(
'#classManagementBox'
).
hide
();
$
(
'#classifyListBox'
).
hide
();
$
(
'#myCenterBox'
).
hide
();
$
(
'#myCenterBox'
).
show
();
$
(
'.myCenterContentBox'
).
eq
(
0
).
show
();
$
(
'.recordLi2'
).
eq
(
0
).
addClass
(
'recordLiCheck'
).
siblings
().
removeClass
(
'recordLiCheck'
);
}
...
...
请
注册
或
登录
后发表评论