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-28 17:46:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
33841fd2010be592a49bbce0bc26871ea8ac8c3e
33841fd2
1 parent
f488a942
修改图片上传,个人信息头像0928
隐藏空白字符变更
内嵌
并排对比
正在显示
13 个修改的文件
包含
287 行增加
和
56 行删除
dist/stylesheets/style.css
etc/umd.template.html
src/ape/AdministratorApe.js
src/ape/HomeApe.js
src/ape/LanclassApe.js
src/ape/LiveClassApe.js
src/ape/LoginOrRegister.js
src/ape/ManagementHomePageApe.js
src/ape/MyCenterApe.js
src/ape/MyChangeInfoApe.js
src/ape/TeacherDetailApe.js
src/main.js
src/proxy/ClassDataProxy.js
dist/stylesheets/style.css
查看文件 @
33841fd
...
...
@@ -871,11 +871,21 @@ body{
}
.tr_mainRight
{
border-right
:
1px
solid
#e6e6e6
;
position
:
relative
;
}
.classHandlePort
{
margin
:
0
3
px
;
margin
:
0
2
px
;
color
:
#3498db
;
}
.updatacoverFile
{
width
:
53px
;
height
:
20px
;
position
:
absolute
;
right
:
6px
;
top
:
6px
;
opacity
:
0
;
cursor
:
pointer
;
}
.classHandlePortCheck
{
color
:
#999999
;
}
...
...
@@ -1713,6 +1723,7 @@ body{
padding
:
30px
0
0
45px
;
}
.oneselfInfoList1
{
position
:
relative
;
}
.oneselfInfoHeader
{
font-size
:
14px
;
...
...
@@ -2029,4 +2040,54 @@ body{
color
:
#999999
;
padding-left
:
15px
;
}
/*上传图片*/
.updataPhoto
{
width
:
450px
;
height
:
300px
;
}
.updataPhotoContent
{
padding
:
50px
0
0
80px
;
}
.updataPhotoBtn
{
position
:
absolute
;
left
:
50%
;
bottom
:
30px
;
margin-left
:
-50px
;
border
:
none
;
}
.updataPhotoInput
{
/* width: 100px;
height: 34px;
opacity:0;
position: absolute;
left:0;
top:0;*/
float
:
left
;
padding-left
:
50px
;
}
.updataPhotoImg
{
width
:
120px
;
height
:
100px
;
border
:
1px
solid
#999999
;
margin
:
20px
0
0
80px
;
float
:
left
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
}
.personagePortraitImg
{
width
:
50px
;
height
:
50px
;
background-size
:
100%
;
border-radius
:
50%
;
border
:
1px
solid
#e8e4e4
;
}
.personagePhoto
{
position
:
absolute
;
left
:
125px
;
top
:
30px
;
opacity
:
0
;
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
}
\ No newline at end of file
...
...
etc/umd.template.html
查看文件 @
33841fd
...
...
@@ -1367,7 +1367,7 @@
<div
class=
"myCenterContentBox"
>
<div
class=
"myCenterTopLeftBox"
>
<div
class=
"teacherMyCenter1"
>
<img
class=
"teacherMyCenterImg"
src=
"images/u373.png"
alt=
""
>
<img
class=
"teacherMyCenterImg"
id=
"myCenterImg"
src=
"images/u373.png"
alt=
""
>
<p
class=
"teacherMyCenterInfoBox"
>
<span
class=
"teacherMyCenterInfo"
id=
"teacherMyCenterTime"
>
上午好,
</span>
<span
id=
"teacherMyCenterName"
></span>
...
...
@@ -1565,7 +1565,10 @@
<ul
class=
"oneselfInfoUI"
>
<li
class=
"oneselfInfoList oneselfInfoList1"
>
<label
class=
"oneselfInfoHeader"
>
头像
</label>
<img
src=
"images/u293.png"
alt=
""
>
<img
src=
"images/u293.png"
alt=
""
class=
"personagePortraitImg"
id=
"personagePortrait"
>
<form
id=
"personagePhotoForm"
>
<input
class=
"personagePhoto"
id=
"personagePortraitBtn"
type=
"file"
name=
"file"
/>
</form>
</li>
<li
class=
"oneselfInfoList"
>
<label
class=
"oneselfInfoHeader"
>
登录名
</label>
...
...
@@ -2511,6 +2514,21 @@
</table>
</div>
</div>
<!--上传图片-->
<div
class=
"userSignBox"
id=
"updataPhotoBox"
>
<div
class=
"usersign updataPhoto"
id=
"updataPhoto"
>
<a
href=
"javascript: void(0)"
id=
"updataPhotoA"
class=
"usersignA iconfont"
>

</a>
<div
class=
"updataPhotoContent"
id=
"updataPhotoContent"
>
<form
id=
"updataPhotoForm"
>
<!-- <span class="addUserBtn updataPhotoBtn">上传封面-->
<input
class=
"updataPhotoInput"
id=
"updataPhotoInput"
type=
"file"
name=
"file"
/>
<!--</span>-->
<div
class=
"updataPhotoImg"
id=
"updataPhotoImg"
></div>
<span
class=
"addUserBtn updataPhotoBtn"
id=
"updataPhotoBtn"
>
上传
</span>
</form>
</div>
</div>
</div>
</div>
<div
class=
"footerBg"
>
<div
class=
"footer"
>
...
...
src/ape/AdministratorApe.js
查看文件 @
33841fd
...
...
@@ -32,8 +32,6 @@ class AdministratorApe extends Ape {
isLocalStorage
(){
//设置当前时间 给输入框默认值
this
.
_setNewTime
();
//设置弹框位置
// this._setMarginTop();
}
_switchover
(
evt
){
$
(
evt
.
currentTarget
).
addClass
(
'recordLiCheck'
).
siblings
().
removeClass
(
'recordLiCheck'
);
...
...
@@ -81,25 +79,5 @@ class AdministratorApe extends Ape {
$
(
'.liveInfoCenterLiveEnd'
).
html
(
time
);
$
(
'#createUserAbortTime'
).
html
(
time
);
}
//设置弹框位置
_setMarginTop
(){
this
.
_setMarginTopHandler
(
$
(
'#createUserAccount'
));
//创建用户选择身份
this
.
_setMarginTopHandler
(
$
(
'#userLogin'
));
//登录
this
.
_setMarginTopHandler
(
$
(
'#usersign'
));
//注册
this
.
_setMarginTopHandler
(
$
(
'#warnHintBox'
));
//错误提示
this
.
_setMarginTopHandler
(
$
(
'#removeHandler'
));
//删除
this
.
_setMarginTopHandler
(
$
(
'.updateInputBox'
));
//修改信息输入框
this
.
_setMarginTopHandler
(
$
(
'#teacherDetailReminders'
));
//预约成功弹框
this
.
_setMarginTopHandler
(
$
(
'#createUser'
));
//注册老师账号
this
.
_setMarginTopHandler
(
$
(
'#createClass'
));
//创建课堂
}
//设置弹框位置 方法
_setMarginTopHandler
(
_data
){
let
top
=
(
$
(
window
).
height
()
-
_data
.
height
())
/
2
;
let
left
=
(
$
(
window
).
width
()
-
_data
.
width
())
/
2
;
let
scrollTop
=
$
(
document
).
scrollTop
();
let
scrollLeft
=
$
(
document
).
scrollLeft
();
_data
.
css
(
{
position
:
'absolute'
,
'top'
:
top
+
scrollTop
,
left
:
left
+
scrollLeft
}
);
}
}
export
default
AdministratorApe
;
\ No newline at end of file
...
...
src/ape/HomeApe.js
查看文件 @
33841fd
...
...
@@ -165,10 +165,12 @@ class HomeApe extends Ape {
if
(
i
<
8
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_data
[
i
].
beginTime
,
_data
[
i
].
endTime
)
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_data
[
i
].
meetingPhoto
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_data
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_data
[
i
].
meetingName
,
_schoolTime
:
_getTime
,
_subscribeNum
:
_data
[
i
].
reservationNumber
+
'人预约'
...
...
@@ -186,10 +188,12 @@ class HomeApe extends Ape {
if
(
i
<
8
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_data
[
i
].
beginTime
,
_data
[
i
].
endTime
)
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_data
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_data
[
i
].
meetingName
,
_schoolTime
:
_getTime
,
_subscribeNum
:
_data
[
i
].
reservationNumber
+
'人预约'
...
...
@@ -206,11 +210,13 @@ class HomeApe extends Ape {
if
(
_data
){
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_data
[
i
].
create_time
,
_data
[
i
].
end_time
)
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_data
[
i
].
create_time
,
_data
[
i
].
end_time
);
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
teacherList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_data
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_data
[
i
].
user_name
,
_schoolTime
:
_getTime
.
split
(
'-'
)[
0
],
_subscribeNum
:
_data
[
i
].
reservationNumber
+
'人预约'
...
...
@@ -235,9 +241,10 @@ class HomeApe extends Ape {
//首页点击 进入个人中心
_homeCenterBtnHandler
(){
if
(
ClassDataProxy
.
userType
==
0
){
$
(
'#homeUserLoginBtn'
).
attr
(
'data'
,
''
);
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_0
){
this
.
toLogin
();
}
else
{
}
else
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_8
)
{
$
(
'#slideshow'
).
hide
();
$
(
'#defaultBox'
).
hide
();
$
(
'#classifyListBox'
).
hide
();
...
...
@@ -249,6 +256,16 @@ class HomeApe extends Ape {
$
(
'#myCenterBox'
).
show
();
}
}
studentClick
(){
$
(
'#slideshow'
).
show
();
$
(
'#defaultBox'
).
show
();
$
(
'.curriculumBox'
).
show
();
$
(
'#classifyListBox'
).
hide
();
$
(
'#teacherDetailBox'
).
hide
();
$
(
'#lanclassBox'
).
hide
();
$
(
'#myCenterBox'
).
hide
();
$
(
'#lanclassAllBox'
).
hide
();
}
toLogin
(){
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#userLogin'
));
$
(
'#userLoginBox'
).
show
();
...
...
src/ape/LanclassApe.js
查看文件 @
33841fd
...
...
@@ -135,10 +135,12 @@ class LanclassApe extends Ape {
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_dataList
[
i
].
beginTime
,
_dataList
[
i
].
endTime
)
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_dataList
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_dataList
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_dataList
[
i
].
meetingName
,
_schoolTime
:
_getTime
,
_subscribeNum
:
_dataList
[
i
].
reservationNumber
+
'人预约'
...
...
src/ape/LiveClassApe.js
查看文件 @
33841fd
...
...
@@ -143,11 +143,13 @@ class LiveClassApe extends Ape {
if
(
_dataList
){
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_dataList
[
i
].
beginTime
,
_dataList
[
i
].
endTime
)
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_dataList
[
i
].
beginTime
,
_dataList
[
i
].
endTime
);
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_dataList
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_dataList
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_dataList
[
i
].
meetingName
,
_schoolTime
:
_getTime
,
_subscribeNum
:
_dataList
[
i
].
reservationNumber
+
'人预约'
...
...
src/ape/LoginOrRegister.js
查看文件 @
33841fd
...
...
@@ -113,6 +113,7 @@ class LoginOrRegister extends Ape {
ClassDataProxy
.
loginName
=
""
;
ClassDataProxy
.
password
=
""
ClassDataProxy
.
token
=
""
;
ClassDataProxy
.
userPhoto
=
""
;
ClassDataProxy
.
status
=
false
;
}
...
...
@@ -322,6 +323,7 @@ class LoginOrRegister extends Ape {
ClassDataProxy
.
loginName
=
_name
.
value
;
ClassDataProxy
.
password
=
_passWord
.
value
;
ClassDataProxy
.
token
=
_data
.
returnData
.
data
.
token
ClassDataProxy
.
userPhoto
=
_data
.
returnData
.
data
.
userPhoto
;
ClassDataProxy
.
status
=
true
;
ClassDataProxy
.
id
=
_data
.
returnData
.
data
.
id
;
// ClassDataProxy.siteId = _data.returnData.data.siteId;
...
...
@@ -334,6 +336,7 @@ class LoginOrRegister extends Ape {
window
.
localStorage
.
setItem
(
"password"
,
ClassDataProxy
.
password
);
//密码
window
.
localStorage
.
setItem
(
"userType"
,
ClassDataProxy
.
userType
);
window
.
localStorage
.
setItem
(
"token"
,
ClassDataProxy
.
token
);
window
.
localStorage
.
setItem
(
"userPhoto"
,
ClassDataProxy
.
userPhoto
);
//个人图片
window
.
localStorage
.
setItem
(
'status'
,
ClassDataProxy
.
status
);
window
.
localStorage
.
setItem
(
'id'
,
ClassDataProxy
.
id
);
window
.
localStorage
.
setItem
(
'siteId'
,
ClassDataProxy
.
siteId
);
...
...
@@ -373,7 +376,7 @@ class LoginOrRegister extends Ape {
updateChangeUser
(
_data
){
let
_isMyCenter
=
$
(
'#homeUserLoginBtn'
).
attr
(
'data'
);
if
(
parseInt
(
_isMyCenter
)
==
1
){
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_8
&&
parseInt
(
_isMyCenter
)
==
1
){
$
(
'#slideshow'
).
hide
();
$
(
'#defaultBox'
).
hide
();
$
(
'#classifyListBox'
).
hide
();
...
...
@@ -382,16 +385,26 @@ class LoginOrRegister extends Ape {
$
(
'#lanclassAllBox'
).
hide
();
$
(
'#teacherIntroAllBox'
).
hide
();
$
(
'#teacherDetailBox'
).
hide
();
$
(
'#myCenterBox'
).
show
();
}
else
{
$
(
'#myCenterBox'
).
hide
();
}
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_1
){
$
(
'#myCenterBox'
).
show
();
}
$
(
'#myCenterBox'
).
show
();
// loger.log('登录成功后更改用户名',_data)
let
_dataList
=
_data
.
returnData
.
data
;
let
myCenterImg
=
$
(
'#myCenterImg'
);
//个人信息首页
let
personagePortrait
=
$
(
'#personagePortrait'
);
//个人信息
let
oneselfInfoLoginName
=
$
(
'#oneselfInfoLoginName'
);
//登录名
let
oneselfInfoUserName
=
$
(
'#oneselfInfoUserName'
);
//用户名
let
setPassWord
=
$
(
'#setPassWord'
);
//密码
let
setMail
=
$
(
'#setMail'
);
//邮箱
let
setPhone
=
$
(
'#setPhone'
);
//手机号
myCenterImg
.
attr
(
'src'
,
_dataList
.
userPhoto
)
personagePortrait
.
attr
(
'src'
,
_dataList
.
userPhoto
)
oneselfInfoLoginName
.
val
(
_dataList
.
loginName
);
oneselfInfoUserName
.
val
(
_dataList
.
userName
);
...
...
src/ape/ManagementHomePageApe.js
查看文件 @
33841fd
...
...
@@ -7,6 +7,7 @@ import Ape from "./Ape";
import
$
from
"jquery"
;
import
ClassDataProxy
from
"proxy/ClassDataProxy"
;
import
MessageTypes
from
"../MessageTypes"
;
import
ErrorApe
from
"./ErrorApe"
;
let
loger
=
Loger
.
getLoger
(
'PC-ManagementHomePageApe'
);
const
adminListTit
=
`
<
table
width
=
"100%"
align
=
"center"
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
class
=
"t_box"
>
...
...
@@ -30,7 +31,7 @@ const adminListTit = `<table width="100%" align="center" cellpadding="0" cellspa
<
th
width
=
"6%"
class
=
"tr_center"
>
在线人数
<
/th
>
<
th
width
=
"2
0
%"
class
=
"tr_center"
>
<
th
width
=
"2
3
%"
class
=
"tr_center"
>
操作
<
/th
>
<
/tr
>
...
...
@@ -43,22 +44,38 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor=
<
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
=
"
18
%"
class
=
"tr_main tr_mainRight"
align
=
"center"
data
=
"{_esenglish}"
>
<
td
width
=
"
21
%"
class
=
"tr_main tr_mainRight"
align
=
"center"
data
=
"{_esenglish}"
>
<
a
id
=
"{_DocInd}"
class
=
"classHandlePort"
href
=
"###"
>
文档
<
/a
>
<
a
id
=
"{_mediaInd}"
class
=
"classHandlePort"
href
=
"###"
>
多媒体
<
/a
>
<
a
id
=
"{_musicInd}"
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
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort updatacover"
href
=
"###"
>
上传封面
<!--
<
input
type
=
"file"
id
=
"{_updatacover}"
class
=
"updatacoverFile"
/>-->
<
/a
>
<
/td
>
<
/tr
>
`
;
const
adminListEnd
=
`
<
/tbody></
table
>
`
;
const
form
=
`
<
form
action
=
"{_action}"
method
=
"post"
enctype
=
"multipart/form-data"
>
<
input
class
=
"updataPhotoInput"
id
=
"updataPhotoInput"
type
=
"file"
name
=
"file"
/>
<
div
class
=
"updataPhotoImg"
id
=
"updataPhotoImg"
>
<
/div
>
<
div
class
=
"updataPhotoInfo"
id
=
"updataPhotoInfo"
><
/div
>
<
input
class
=
"addUserBtn updataPhotoBtn"
id
=
"updataPhotoBtn"
type
=
"submit"
value
=
"上传"
/>
<
/form
>
`
class
ManagementHomePageApe
extends
Ape
{
constructor
()
{
super
();
this
.
pageNo
=
0
;
this
.
presentInd
=
1
;
this
.
files
=
{};
this
.
dataId
=
0
;
this
.
addEvent
();
this
.
init
();
}
...
...
@@ -74,6 +91,14 @@ class ManagementHomePageApe extends Ape {
// $('#courseContent0').on('click','.deleteClass',this._deleteClass.bind(this));//删除课堂
$
(
'#courseContent0'
).
on
(
'click'
,
'.joinClass'
,
this
.
_joinClass
.
bind
(
this
));
//加入课堂
$
(
'#courseContent0'
).
on
(
'click'
,
'.updatacover'
,
this
.
_updatacover
.
bind
(
this
));
//上传课堂封面
$
(
'#updataPhotoA'
).
on
(
'click'
,
this
.
_closeUpdatacover
.
bind
(
this
));
//上传课堂封面 取消
$
(
'#updataPhotoInput'
).
on
(
'change'
,
this
.
_updataPhotoBtnHandler
.
bind
(
this
));
//上传课堂封面 取消
$
(
'#updataPhotoBtn'
).
on
(
'click'
,
this
.
_submitBtnHandler
.
bind
(
this
));
//上传课堂封面
}
addEvent
()
{
...
...
@@ -124,6 +149,7 @@ class ManagementHomePageApe extends Ape {
url
:
_url
,
data
:{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
status
},
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
page
:
ind
,
pageno
:
8
,
'token'
:
ClassDataProxy
.
token
...
...
@@ -168,6 +194,7 @@ class ManagementHomePageApe extends Ape {
_mediaInd
:
'classMedia'
+
i
,
_musicInd
:
'classMusic'
+
i
,
_updateInd
:
'classUpdate'
+
i
,
_updatacover
:
'updatacover'
+
i
,
_removeInd
:
_dataList
[
i
].
id
,
_joinInd
:
_dataList
[
i
].
meetingNumber
})
...
...
@@ -211,6 +238,76 @@ class ManagementHomePageApe extends Ape {
let
_data
=
$
(
evt
.
target
).
attr
(
'data'
);
window
.
open
(
'http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber='
+
_data
);
}
_updatacover
(
evt
){
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#updataPhoto'
));
$
(
'#updataPhotoBox'
).
show
();
let
_data
=
$
(
evt
.
target
).
attr
(
'data'
);
this
.
dataId
=
_data
;
}
_closeUpdatacover
(){
$
(
'#updataPhotoBox'
).
hide
();
$
(
"#updataPhotoInput"
).
val
(
''
);
$
(
"#updataPhotoImg"
)[
0
].
style
.
backgroundImage
=
''
;
}
_updataPhotoBtnHandler
()
{
let
fileInput
=
document
.
getElementById
(
'updataPhotoInput'
);
let
preview
=
document
.
getElementById
(
'updataPhotoImg'
);
let
file
=
fileInput
.
files
[
0
];
if
(
!
file
)
{
loger
.
log
(
"没有选择文件"
);
return
;
}
let
fileStr
=
file
.
name
;
if
(
fileStr
){
fileStr
=
fileStr
.
toLowerCase
();
}
if
(
fileStr
.
lastIndexOf
(
'.jpg'
)
<
0
&&
fileStr
.
lastIndexOf
(
'.png'
)
<
0
)
{
alert
(
'不是有效的图片文件!'
);
return
;
}
let
reader
=
new
FileReader
();
reader
.
onload
=
function
(
e
){
let
data
=
e
.
target
.
result
;
preview
.
style
.
backgroundImage
=
'url('
+
data
+
')'
;
}
reader
.
readAsDataURL
(
file
);
let
data
=
new
FormData
(
$
(
'#updataPhotoForm'
)[
0
]);
this
.
files
=
data
;
}
_submitBtnHandler
(){
let
_dataId
=
this
.
dataId
;
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_dataId
+
'&category=1'
let
files
=
this
.
files
;
let
that
=
this
;
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
data
:
files
,
dataType
:
'JSON'
,
cache
:
false
,
processData
:
false
,
contentType
:
false
,
success
:
function
(
_data
){
loger
.
log
(
_data
,
'成功1111'
)
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'上传成功'
);
that
.
_closeUpdatacover
();
}.
bind
(
this
),
error
:
function
(
_data
)
{
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'上传失败'
);
loger
.
log
(
_data
,
'error'
)
}
})
}
_switchover
(
evt
){
$
(
evt
.
currentTarget
).
addClass
(
'liveInfoLeftLiCheck'
).
siblings
().
removeClass
(
'liveInfoLeftLiCheck'
);
}
...
...
src/ape/MyCenterApe.js
查看文件 @
33841fd
...
...
@@ -424,7 +424,6 @@ class MyCenterApe extends Ape {
let
text
=
newHours
>
12
?
'下午好,'
:
'上午好,'
$
(
'#teacherMyCenterTime'
).
text
(
text
);
$
(
'#myCenterBox'
).
show
();
$
(
'#teacherMyCenterName'
).
text
(
ClassDataProxy
.
loginName
);
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_1
){
$
(
'#teacherMyCenterStatus'
).
text
(
'老师'
);
...
...
@@ -432,25 +431,24 @@ class MyCenterApe extends Ape {
$
(
'#studentMyCerter'
).
hide
();
$
(
'#teacherUI .recordLi'
).
eq
(
2
).
hide
();
this
.
detailPageTeacher
();
$
(
'#myCenterBox'
).
show
();
}
else
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_8
){
$
(
'#teacherMyCenterStatus'
).
text
(
'同学'
);
$
(
'#teacherMyCerter'
).
hide
();
$
(
'#studentMyCerter'
).
show
();
$
(
'#teacherUI .recordLi'
).
eq
(
2
).
show
();
this
.
detailPageStudent
();
}
}
isLocalStorage
(){
this
.
detailpage
();
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_1
){
$
(
'#myCenterBox'
).
show
();
}
loger
.
log
(
'登录老师首页'
,
ClassDataProxy
.
userType
,
ClassDataProxy
.
USER_TYPE_1
)
$
(
'#lanclassBox'
).
hide
();
loger
.
log
(
'显示头像数据'
,
ClassDataProxy
.
userPhoto
)
$
(
'#myCenterImg'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
);
//个人信息首页
$
(
'#personagePortrait'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
);
//个人信息
$
(
'#oneselfInfoLoginName'
).
val
(
ClassDataProxy
.
loginName
);
//登录名
$
(
'#oneselfInfoUserName'
).
val
(
ClassDataProxy
.
monicker
);
//用户名
let
setMail
=
$
(
'#setMail'
);
//邮箱
...
...
@@ -831,9 +829,8 @@ class MyCenterApe extends Ape {
$
(
'#teacherDetailBox'
).
hide
();
$
(
'#teacherUI .recordLi'
).
eq
(
2
).
show
();
}
else
if
(
ClassDataProxy
.
userType
==
ClassDataProxy
.
USER_TYPE_1
){
$
(
'#myCenterBox'
).
show
();
}
$
(
'#myCenterBox'
).
show
();
}
updateEmail
(
userEmail
){
return
userEmail
.
replace
(
/
(\d{2})\d{2}(\d{1})
/
,
'$1****$2'
)
...
...
src/ape/MyChangeInfoApe.js
查看文件 @
33841fd
...
...
@@ -26,13 +26,57 @@ class MyChangeInfoApe extends Ape {
$
(
'#accountEmailBtn'
).
on
(
'click'
,
this
.
_accountEmailBtnHandler
.
bind
(
this
));
//邮箱
$
(
'#accountMobilelBtn'
).
on
(
'click'
,
this
.
_accountMobilelBtnHandler
.
bind
(
this
));
//手机号
$
(
'#personagePortraitBtn'
).
on
(
'change'
,
this
.
_personagePortraitBtnHandler
.
bind
(
this
));
//修改头像
}
addEvent
()
{
}
_personagePortraitBtnHandler
(){
let
fileInput
=
document
.
getElementById
(
'personagePortraitBtn'
);
let
file
=
fileInput
.
files
[
0
];
if
(
!
file
)
{
loger
.
log
(
"没有选择文件"
);
return
;
}
let
fileStr
=
file
.
name
;
if
(
fileStr
){
fileStr
=
fileStr
.
toLowerCase
();
}
if
(
fileStr
.
lastIndexOf
(
'.jpg'
)
<
0
&&
fileStr
.
lastIndexOf
(
'.png'
)
<
0
)
{
alert
(
'不是有效的图片文件!'
);
return
;
}
let
_id
=
ClassDataProxy
.
id
;
let
data
=
new
FormData
(
$
(
'#personagePhotoForm'
)[
0
]);
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_id
+
'&category=1'
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
data
:
data
,
dataType
:
'JSON'
,
cache
:
false
,
processData
:
false
,
contentType
:
false
,
success
:
function
(
_data
){
loger
.
log
(
_data
,
'成功1111'
)
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'修改成功,请重新登录'
);
}.
bind
(
this
),
error
:
function
(
_data
)
{
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'修改失败'
);
loger
.
log
(
_data
,
'error'
)
}
})
}
//修改密码
_accountPassWordBtnHandler
(){
this
.
data
=
0
;
...
...
@@ -125,6 +169,7 @@ class MyChangeInfoApe extends Ape {
let
setPassWord
=
$
(
'#setPassWord'
).
attr
(
'data'
);
//密码
let
setMail
=
$
(
'#setMail'
).
attr
(
'data'
);
//邮箱
let
setPhone
=
$
(
'#setPhone'
).
attr
(
'data'
);
//手机号
let
signInfo
=
{};
if
(
oneselfInfoLoginName
!=
loginName
){
signInfo
.
loginName
=
oneselfInfoLoginName
;
...
...
@@ -187,11 +232,6 @@ class MyChangeInfoApe extends Ape {
ClassDataProxy
.
status
=
false
;
}
//个人信息
_updatMessage
(){
$
(
'#oneselfInfoLoginName'
).
val
(
ClassDataProxy
.
loginName
);
//登录名
$
(
'#oneselfInfoUserName'
).
val
(
ClassDataProxy
.
monicker
);
//用户名
}
}
export
default
MyChangeInfoApe
;
\ No newline at end of file
...
...
src/ape/TeacherDetailApe.js
查看文件 @
33841fd
...
...
@@ -134,10 +134,12 @@ class TeacherDetailApe extends Ape {
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
j
=
(
i
%
4
)
==
3
;
let
_getTime
=
ClassDataProxy
.
getTimeDifference
(
_dataList
[
i
].
create_time
,
_dataList
[
i
].
end_time
)
let
_img
=
'../images/u373.png'
;
let
_classImg
=
_dataList
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_dataList
[
i
].
id
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_classImg
?
_classImg
:
_img
,
_classroomTitle
:
_dataList
[
i
].
user_name
,
_schoolTime
:
_getTime
.
split
(
'-'
)[
0
],
_subscribeNum
:
_dataList
[
i
].
reservationNumber
+
'人预约'
...
...
src/main.js
查看文件 @
33841fd
...
...
@@ -68,7 +68,7 @@ let _headSwitchTitleApe;
class
Main
{
constructor
()
{
this
.
clientVersion
=
"v1.8.
5.20170925
"
;
this
.
clientVersion
=
"v1.8.
6.20170928
"
;
loger
.
warn
(
"clientVersion:"
+
this
.
clientVersion
);
let
locationProtocol
=
location
.
protocol
;
...
...
@@ -124,6 +124,7 @@ class Main {
//将地址转化成一个对象
_parseUrlParams
()
{
let
url
=
encodeURI
(
location
.
search
);
loger
.
log
(
'地址栏参数'
,
location
.
search
)
let
thisParam
=
{};
let
strs
;
// 判断是否存在请求的参数
...
...
@@ -352,6 +353,7 @@ class Main {
let
monicker
=
window
.
localStorage
.
getItem
(
'monicker'
)
||
''
;
let
status
=
window
.
localStorage
.
getItem
(
'status'
)
||
''
;
let
token
=
window
.
localStorage
.
getItem
(
'token'
)
||
''
;
let
userPhoto
=
window
.
localStorage
.
getItem
(
'userPhoto'
)
||
''
;
let
password
=
window
.
localStorage
.
getItem
(
'password'
)
||
''
;
...
...
@@ -365,6 +367,7 @@ class Main {
ClassDataProxy
.
monicker
=
monicker
;
ClassDataProxy
.
status
=
status
;
ClassDataProxy
.
token
=
token
;
ClassDataProxy
.
userPhoto
=
userPhoto
;
ClassDataProxy
.
password
=
password
loger
.
log
(
'进入课堂时显示的type值'
,
ClassDataProxy
.
userType
)
...
...
src/proxy/ClassDataProxy.js
查看文件 @
33841fd
...
...
@@ -337,6 +337,7 @@ ClassDataProxy.userMobile = '';
ClassDataProxy
.
userEmail
=
''
;
ClassDataProxy
.
monicker
=
""
;
ClassDataProxy
.
meetingId
=
''
;
ClassDataProxy
.
userPhoto
=
''
;
ClassDataProxy
.
USER_TYPE_0
=
0
;
ClassDataProxy
.
USER_TYPE_1
=
1
;
...
...
请
注册
或
登录
后发表评论