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-29 20:21:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ab5905bc8e8f957e990306893048f2c0dc8bf5c
6ab5905b
1 parent
7151db6b
修改首页轮播图
隐藏空白字符变更
内嵌
并排对比
正在显示
14 个修改的文件
包含
606 行增加
和
281 行删除
dist/stylesheets/style.css
etc/umd.template.html
src/MessageTypes.js
src/ape/CollectApe.js
src/ape/HomeApe.js
src/ape/ListDetailsApe.js
src/ape/LoginOrRegister.js
src/ape/ManagementHomePageApe.js
src/ape/MyBookingsApe.js
src/ape/MyCenterApe.js
src/ape/MyChangeInfoApe.js
src/ape/MyCoursesApe.js
src/ape/Slideshow.js
src/main.js
dist/stylesheets/style.css
查看文件 @
6ab5905
...
...
@@ -241,10 +241,14 @@ body{
}
.slidesMap
{
float
:
left
;
width
:
100%
;
height
:
540px
;
}
.slidesImg
{
height
:
540px
;
width
:
100%
;
height
:
100%
;
background-size
:
100%
100%
;
cursor
:
pointer
;
}
.dots
{
position
:
absolute
;
...
...
@@ -1308,11 +1312,11 @@ body{
}
.usersignInput
{
width
:
260px
;
padding-left
:
20px
;
border
:
none
;
background
:
none
;
outline
:
none
;
border-radius
:
2px
;
}
.userVerifyLiInputBtn
{
...
...
etc/umd.template.html
查看文件 @
6ab5905
...
...
@@ -43,11 +43,11 @@
<!--图片轮播-->
<div
class=
"slideshow"
id=
"slideshow"
>
<ul
class=
"motionMapBox"
id=
"motionMapBox"
>
<li
class=
"slidesMap"
><img
class=
"slidesImg"
src=
"images/xdybg.png"
alt=
""
></li>
<
!--<
li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li>
<li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li>
<li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li>
<li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li>
<li
class=
"slidesMap"
><img
class=
"slidesImg"
src=
"images/xdybg.png"
alt=
""
></li>
<li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li>
-->
</ul>
<ol
class=
"dots"
id=
"dots"
>
</ol>
...
...
@@ -1657,7 +1657,7 @@
<button
class=
"userVerifyLiInputBtn btnHover"
>
发送验证码
</button>
</li>
<li
class=
"permitSign usersignLi"
>
<input
id=
"permitSign"
class=
"permitSignIcon"
type=
"checkbox"
>
<input
id=
"permitSign"
class=
"permitSignIcon"
type=
"checkbox"
checked
>
<label
for=
"permitSign"
></label>
<span
class=
"permitSignMsg"
>
我已阅读并接受用户协议
</span>
<p
class=
"errorTit"
id=
"errorTitLogin"
></p>
...
...
@@ -2523,7 +2523,7 @@
<!-- <span class="addUserBtn updataPhotoBtn">上传封面-->
<input
class=
"updataPhotoInput"
id=
"updataPhotoInput"
type=
"file"
name=
"file"
/>
<!--</span>-->
<
div
class=
"updataPhotoImg"
id=
"updataPhotoImg"
></div
>
<
img
src=
""
class=
"updataPhotoImg"
id=
"updataPhotoImg"
alt=
""
>
<span
class=
"addUserBtn updataPhotoBtn"
id=
"updataPhotoBtn"
>
上传
</span>
</form>
</div>
...
...
src/MessageTypes.js
查看文件 @
6ab5905
...
...
@@ -35,5 +35,10 @@ MessageTypes.ROLE_MESSAGE= "role_message"; //我的信息
MessageTypes
.
IS_COLLECT
=
"is_collect"
;
//是否收藏
MessageTypes
.
COLLECT_BREAK
=
"collect_break"
;
//刷新收藏数据
//首页图片数据详情
MessageTypes
.
CLICK_IMGINFO
=
"click_imginfo"
;
//刷新收藏数据
export
default
MessageTypes
;
...
...
src/ape/CollectApe.js
查看文件 @
6ab5905
...
...
@@ -39,6 +39,7 @@ class CollectApe extends Ape {
this
.
detailPage
(
_url
,
data
,
function
(
_data
){
if
(
_data
&&
_data
.
code
==
200
){
that
.
_collectNoClick
();
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'收藏成功'
);
loger
.
log
(
'收藏数据信息'
,
_data
)
}
...
...
@@ -49,16 +50,16 @@ class CollectApe extends Ape {
let
that
=
this
;
let
id
=
$
(
'#lanclassBox'
).
attr
(
'data'
);
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/
updateStudentMeetingBySite/'
+
i
d
;
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/
delStudentMeetingBySite/'
+
id
+
'/'
+
ClassDataProxy
.
siteI
d
;
$
.
ajax
({
type
:
"
PUT
"
,
type
:
"
delete
"
,
url
:
_url
,
timeout
:
5000
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
'token'
:
ClassDataProxy
.
token
},
data
:{
s
tatus
:
parseInt
(
status
)
},
data
:{
s
iteId
:
ClassDataProxy
.
siteId
,
id
:
ClassDataProxy
.
id
},
success
:
function
(
_data
){
//获取课堂数据
if
(
_data
&&
_data
.
code
==
200
){
...
...
@@ -101,21 +102,6 @@ class CollectApe extends Ape {
}
})
}
isCollect
(
id
){
let
that
=
this
;
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/addStudentMeeting'
;
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
"studentId"
:
ClassDataProxy
.
id
,
"status"
:
6
,
"meetingId"
:
id
}
this
.
detailPage
(
_url
,
data
,
function
(
_data
){
loger
.
log
(
'您已收藏这堂课'
,
_data
)
if
(
_data
.
returnData
.
data
.
msg
==
'您已收藏这堂课'
){
that
.
_collectNoClick
();
}
})
}
toLogin
(){
$
(
'#userLoginBox'
).
show
();
}
...
...
src/ape/HomeApe.js
查看文件 @
6ab5905
...
...
@@ -93,11 +93,11 @@ class HomeApe extends Ape {
//直播信息
liveModule
(){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/meeting/getMeeting'
;
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
2
}
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
2
}
;
let
that
=
this
;
this
.
detailPage
(
_url
,
data
,
8
,
1
,
function
(
_data
){
if
(
_data
){
//
loger.log('首页直播信息',_data)
//
loger.log('首页直播信息',_data)
that
.
_liveClassData
(
_data
.
returnData
.
data
.
meetingInfo
);
}
})
...
...
@@ -105,7 +105,7 @@ class HomeApe extends Ape {
//互动信息
interactModule
(){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/meeting/getMeeting'
;
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
1
}
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
,
meetingStatus
:
1
}
;
let
that
=
this
;
this
.
detailPage
(
_url
,
data
,
8
,
1
,
function
(
_data
){
if
(
_data
){
...
...
@@ -166,7 +166,7 @@ class HomeApe extends Ape {
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
_classImg
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_id
:
_data
[
i
].
id
,
...
...
src/ape/ListDetailsApe.js
查看文件 @
6ab5905
...
...
@@ -50,6 +50,7 @@ class ListDetailsApe extends Ape {
let
_id
=
$
(
evt
.
currentTarget
).
attr
(
'data'
);
this
.
_id
=
_id
;
this
.
liveInfoDetail
(
_id
);
this
.
collectInfoDetail
(
_id
);
this
.
commonalityClass
();
}
commonalityClass
(){
...
...
@@ -65,6 +66,21 @@ class ListDetailsApe extends Ape {
this
.
teacherInfoDetail
(
_id
);
this
.
commonalityClass
();
}
_slideshowInfo
(
_id
){
let
that
=
this
;
let
data
=
{
id
:
_id
,
siteId
:
ClassDataProxy
.
siteId
}
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/meeting/getMeeting'
;
this
.
detailPage
(
_url
,
data
,
function
(
_data
){
if
(
_data
){
loger
.
log
(
'detailPage'
,
_data
)
that
.
_gainClassData
(
_data
.
returnData
.
data
);
}
})
this
.
commonalityClass
();
}
classInfoDetail
(
_id
){
let
that
=
this
;
let
data
=
{
...
...
@@ -93,6 +109,27 @@ class ListDetailsApe extends Ape {
}
})
}
collectInfoDetail
(
_id
){
let
that
=
this
;
let
data
=
{
studentId
:
ClassDataProxy
.
id
,
meetingId
:
_id
,
siteId
:
ClassDataProxy
.
siteId
}
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/isAppointment'
;
this
.
detailPage
(
_url
,
data
,
function
(
_data
){
if
(
_data
&&
_data
.
code
==
200
){
let
_dataList
=
_data
.
returnData
.
data
;
if
(
_dataList
&&
_dataList
.
length
>
0
){
loger
.
log
(
'收藏'
,
_data
)
that
.
_collectNoClick
();
}
else
{
loger
.
log
(
'未收藏'
)
that
.
_collectYesClick
();
}
}
})
}
teacherInfoDetail
(
_id
){
let
that
=
this
;
let
data
=
{
...
...
@@ -119,57 +156,66 @@ class ListDetailsApe extends Ape {
if
(
_data
){
let
teacherList
=
_data
.
users
;
if
(
teacherList
){
loger
.
log
(
'老师1111'
,
teacherList
)
this
.
_lanclassRender
(
teacherList
[
0
]);
}
}
}
//老师
_lanclassRender
(
_dataList
){
$
(
'#defaultBox'
).
hide
();
$
(
'.curriculumBox'
).
hide
();
$
(
'#teacherDetailBox'
).
show
();
$
(
'#teacherDetailBox'
).
attr
(
'data'
,
this
.
_id
);
let
_img
=
_dataList
.
userPhoto
;
let
defaultImg
=
'images/u373.png'
$
(
'#teacherDetailInfoImg'
).
attr
(
'src'
,
_img
?
_img
:
defaultImg
);
//老师授课标题图片
$
(
'#teacherDetailInfoDetailName'
).
text
(
_dataList
.
userName
);
//老师名字
$
(
'#teacherDetailInfoDetailSex'
).
text
();
//老师性别
$
(
'#teacherDetailInfoDetailPoint'
).
text
();
//老师专长
$
(
'#teacherDetailInfoDetailAge'
).
text
(
3
+
'年'
);
//老师教龄
$
(
'#teacherDetailInfoDetailGrade'
).
text
();
//老师评分
$
(
'#teacherDetailReferralContent'
).
text
();
//老师授课内容
$
(
'#teacherDetailPost'
).
text
();
//老师职称
$
(
'#teacherDetailEducation'
).
text
();
//老师学历
$
(
'#teacherDetailAcademy'
).
text
();
//老师院校
$
(
'#teacherDetailWay'
).
text
();
//老师授课方式
$
(
'#teacherDetailArea'
).
text
();
//老师授课地区
$
(
'#teacherDetailSynopsis'
).
text
();
//老师授课简介
if
(
_dataList
){
$
(
'#defaultBox'
).
hide
();
$
(
'.curriculumBox'
).
hide
();
$
(
'#teacherDetailBox'
).
show
();
$
(
'#teacherDetailBox'
).
attr
(
'data'
,
this
.
_id
);
let
_img
=
_dataList
.
userPhoto
;
let
defaultImg
=
'images/u373.png'
$
(
'#teacherDetailInfoImg'
).
attr
(
'src'
,
_img
?
_img
:
defaultImg
);
//老师授课标题图片
$
(
'#teacherDetailInfoDetailName'
).
text
(
_dataList
.
userName
);
//老师名字
$
(
'#teacherDetailInfoDetailSex'
).
text
();
//老师性别
$
(
'#teacherDetailInfoDetailPoint'
).
text
();
//老师专长
$
(
'#teacherDetailInfoDetailAge'
).
text
(
3
+
'年'
);
//老师教龄
$
(
'#teacherDetailInfoDetailGrade'
).
text
();
//老师评分
$
(
'#teacherDetailReferralContent'
).
text
();
//老师授课内容
$
(
'#teacherDetailPost'
).
text
();
//老师职称
$
(
'#teacherDetailEducation'
).
text
();
//老师学历
$
(
'#teacherDetailAcademy'
).
text
();
//老师院校
$
(
'#teacherDetailWay'
).
text
();
//老师授课方式
$
(
'#teacherDetailArea'
).
text
();
//老师授课地区
$
(
'#teacherDetailSynopsis'
).
text
();
//老师授课简介
}
}
//课堂
_liveRender
(
_dataList
){
$
(
'#defaultBox'
).
hide
();
$
(
'.curriculumBox'
).
hide
();
$
(
'#lanclassBox'
).
show
();
$
(
'#lanclassBox'
).
attr
(
'data'
,
this
.
_id
);
let
_img
=
_dataList
.
meetingPhoto
;
let
defaultImg
=
'images/u373.png'
$
(
'#lanclassContentCover'
).
attr
(
'src'
,
_img
?
_img
:
defaultImg
);
//老师授课标题图片
$
(
'#lanclassContentTitle'
).
text
(
_dataList
.
meetingName
);
//老师授课标题
if
(
_dataList
){
$
(
'#defaultBox'
).
hide
();
$
(
'.curriculumBox'
).
hide
();
$
(
'#lanclassBox'
).
show
();
$
(
'#lanclassBox'
).
attr
(
'data'
,
this
.
_id
);
let
_img
=
_dataList
.
meetingPhoto
;
let
classImg
;
if
(
_img
){
classImg
=
_img
;
}
else
{
classImg
=
null
;
}
let
defaultImg
=
'images/u373.png'
$
(
'#lanclassContentCover'
).
attr
(
'src'
,
_img
?
_img
:
defaultImg
);
//老师授课标题图片
$
(
'#lanclassContentTitle'
).
text
(
_dataList
.
meetingName
);
//老师授课标题
let
_teacherImg
=
_dataList
.
teacherPhoto
;
let
teacherDefault
=
'images/u293.png'
;
$
(
'#lanclassContentInfoPortrait'
).
attr
(
'src'
,
_teacherImg
?
_teacherImg
:
teacherDefault
);
//老师授课老师头像
$
(
'#lanclassContentInfoName'
).
text
(
_dataList
.
create_user
);
//老师授课老师名字
$
(
'#teacherInfoName'
).
text
(
_dataList
.
create_user
);
//老师授课老师名字
$
(
'#lanclassContentInfoTimeStart'
).
text
(
_dataList
.
beginTime
);
//老师授课开始时间
$
(
'#lanclassContentInfoTimeEnd'
).
text
(
_dataList
.
endTime
);
//老师授课结束时间
$
(
'#collectYes'
);
//老师授课是否收藏
$
(
'#collectNo'
);
//老师授课是否收藏
$
(
'#lanclassIntroduceDescription'
).
text
();
//老师授课课程介绍
$
(
'#teacherInfoSchool'
).
text
();
//老师学院
$
(
'#teacherInfoContent'
).
text
();
//老师专业等级信息
let
_teacherImg
=
_dataList
.
teacherPhoto
;
let
teacherDefault
=
'images/u293.png'
;
$
(
'#lanclassContentInfoPortrait'
).
attr
(
'src'
,
_teacherImg
?
_teacherImg
:
teacherDefault
);
//老师授课老师头像
$
(
'#lanclassContentInfoName'
).
text
(
_dataList
.
create_user
);
//老师授课老师名字
$
(
'#teacherInfoName'
).
text
(
_dataList
.
create_user
);
//老师授课老师名字
$
(
'#lanclassContentInfoTimeStart'
).
text
(
_dataList
.
beginTime
);
//老师授课开始时间
$
(
'#lanclassContentInfoTimeEnd'
).
text
(
_dataList
.
endTime
);
//老师授课结束时间
$
(
'#collectYes'
);
//老师授课是否收藏
$
(
'#collectNo'
);
//老师授课是否收藏
$
(
'#lanclassIntroduceDescription'
).
text
();
//老师授课课程介绍
$
(
'#teacherInfoSchool'
).
text
();
//老师学院
$
(
'#teacherInfoContent'
).
text
();
//老师专业等级信息
}
}
detailPage
(
url
,
data
,
callback
){
...
...
@@ -200,5 +246,13 @@ class ListDetailsApe extends Ape {
}
})
}
_collectYesClick
(){
$
(
'#collectYes '
).
hide
();
$
(
'#collectNo '
).
show
();
}
_collectNoClick
(){
$
(
'#collectYes '
).
show
();
$
(
'#collectNo '
).
hide
();
}
}
export
default
ListDetailsApe
;
\ No newline at end of file
...
...
src/ape/LoginOrRegister.js
查看文件 @
6ab5905
...
...
@@ -64,10 +64,23 @@ class LoginOrRegister extends Ape {
//关闭注册界面
_usersignAHandler
(){
$
(
'#userSignBox'
).
hide
();
this
.
_clearSignData
();
}
_clearSignData
(){
$
(
'#signName'
).
val
(
''
);
$
(
'#signPhone'
).
val
(
''
);
$
(
'#signMail'
).
val
(
''
);
$
(
'#signPassWord'
).
val
(
''
);
$
(
'#securityCode'
).
val
(
''
);
}
_clearLoginData
(){
$
(
'#loginName'
).
val
(
''
);
$
(
'#loginPassWord'
).
val
(
''
);
}
//关闭登录界面
_userLoginAHandler
(){
$
(
'#userLoginBox'
).
hide
();
this
.
_clearLoginData
();
}
//注册跳转登录界面
_skipLoginBtnHandler
(){
...
...
@@ -75,6 +88,7 @@ class LoginOrRegister extends Ape {
$
(
'#userSignBox'
).
hide
();
$
(
'#userLoginBox'
).
show
();
$
(
'#loginName'
).
focus
();
this
.
_clearSignData
();
}
//新用户注册
_nowUserSignHandler
(){
...
...
@@ -82,6 +96,7 @@ class LoginOrRegister extends Ape {
$
(
'#userLoginBox'
).
hide
();
$
(
'#userSignBox'
).
show
();
$
(
'#signName'
).
focus
();
this
.
_clearLoginData
();
}
//首页用户登录
_homeUserLoginBtnHandler
(){
...
...
@@ -142,6 +157,11 @@ class LoginOrRegister extends Ape {
ErrorApe
.
showWarnError
(
'用户名不能为空'
);
_name
.
focus
();
return
false
;
}
else
if
(
_name
.
value
.
length
>
12
||
_name
.
value
.
length
<
6
){
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'请输入4位以上字符'
);
_name
.
focus
();
return
false
;
}
}
_signPhone
(
phone
){
...
...
@@ -158,6 +178,8 @@ class LoginOrRegister extends Ape {
}
else
{
$
(
'#signPhone'
).
val
(
'手机号输入不合法'
)
.
css
(
'color'
,
'#d95136'
);
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'手机号输入不合法'
);
phone
.
focus
();
return
false
;
}
...
...
@@ -176,27 +198,31 @@ class LoginOrRegister extends Ape {
else
{
$
(
'#signMail'
).
val
(
'电子邮箱输入不合法'
)
.
css
(
'color'
,
'#d95136'
);
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'电子邮箱输入不合法'
);
mail
.
focus
();
return
false
;
}
}
//判断密码
_signPassWord
(
_passWord
){
let
reg
=
/^
[
0-9a-zA-Z
]{
8
,12}
$/
;
//密码正则
let
reg
=
/^
[
0-9a-zA-Z
]{
6
,12}
$/
;
//密码正则
if
(
_passWord
.
value
==
''
){
_passWord
.
focus
();
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'密码不能为空'
);
return
false
;
}
if
(
reg
.
test
(
_passWord
.
value
)){
$
(
'#signPassWord'
).
css
(
'color'
,
'#000'
);
}
else
{
}
else
if
(
_passWord
.
value
.
length
>
12
||
_passWord
.
value
.
length
<
6
){
$
(
'#signPassWord'
).
val
(
'密码长度不够或太长'
)
.
css
(
'color'
,
'#d95136'
);
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'请输入6-12位密码'
);
_passWord
.
focus
();
return
false
;
}
if
(
reg
.
test
(
_passWord
.
value
)){
$
(
'#signPassWord'
).
css
(
'color'
,
'#000'
);
}
}
//判断验证码
_securityCode
(
securityCode
){
...
...
@@ -212,6 +238,8 @@ class LoginOrRegister extends Ape {
}
else
{
$
(
'#securityCode'
).
val
(
'验证码不正确'
)
.
css
(
'color'
,
'#d95136'
);
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
'验证码不正确'
);
securityCode
.
focus
();
return
false
;
}
...
...
@@ -257,6 +285,7 @@ class LoginOrRegister extends Ape {
}
else
{
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
_data
.
returnData
.
data
.
msg
);
loger
.
log
(
'注册失败'
,
_data
)
// alert(_data.returnData.data.msg)
}
},
...
...
@@ -350,8 +379,9 @@ class LoginOrRegister extends Ape {
that
.
updateChangeUser
(
_data
);
}
else
{
loger
.
log
(
'登录错误'
,
_data
)
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#warnHintBox'
));
ErrorApe
.
showWarnError
(
_data
.
returnData
.
data
.
msg
);
ErrorApe
.
showWarnError
(
'登录错误'
);
// alert(_data.returnData.data.msg)
}
},
...
...
@@ -402,9 +432,13 @@ class LoginOrRegister extends Ape {
let
setPassWord
=
$
(
'#setPassWord'
);
//密码
let
setMail
=
$
(
'#setMail'
);
//邮箱
let
setPhone
=
$
(
'#setPhone'
);
//手机号
myCenterImg
.
attr
(
'src'
,
_dataList
.
userPhoto
)
personagePortrait
.
attr
(
'src'
,
_dataList
.
userPhoto
)
if
(
_dataList
.
userPhoto
){
myCenterImg
.
attr
(
'src'
,
_dataList
.
userPhoto
)
personagePortrait
.
attr
(
'src'
,
_dataList
.
userPhoto
)
}
else
{
myCenterImg
.
attr
(
'src'
,
'../images/u373.png'
)
personagePortrait
.
attr
(
'src'
,
'../images/u373.png'
)
}
oneselfInfoLoginName
.
val
(
_dataList
.
loginName
);
oneselfInfoUserName
.
val
(
_dataList
.
userName
);
...
...
src/ape/ManagementHomePageApe.js
查看文件 @
6ab5905
...
...
@@ -45,30 +45,18 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor=
<
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
=
"{_mediaInd}"
class
=
"classHandlePort"
href
=
"###"
>
多媒体
<
/a
>
<
a
id
=
"{_musicInd}"
class
=
"classHandlePort"
href
=
"###"
>
伴音
<
/a
>
<
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
>
<
a
data
=
"{_removeInd}"
class
=
"classHandlePort updatacover"
href
=
"###"
>
上传封面
<!--
<
input
type
=
"file"
id
=
"{_updatacover}"
class
=
"updatacoverFile"
/>-->
<
/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
>
<
/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
();
...
...
@@ -93,11 +81,11 @@ class ManagementHomePageApe extends Ape {
$
(
'#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
));
//上传课堂封面 取消
$
(
'#courseContent0'
).
on
(
'click'
,
'.generalize'
,
this
.
_generalize
.
bind
(
this
));
//上传课堂封面 推广
$
(
'#updataPhotoBtn'
).
on
(
'click'
,
this
.
_submitBtnHandler
.
bind
(
this
));
//上传课堂封面
$
(
'#updataPhotoA'
).
on
(
'click'
,
this
.
_closeUpdatacover
.
bind
(
this
));
//上传课堂封面 取消
$
(
'#updataPhotoInput'
).
on
(
'change'
,
this
.
_updataPhotoBtnHandler
.
bind
(
this
));
//上传课堂封面
$
(
'#updataPhotoBtn'
).
on
(
'click'
,
this
.
_submitBtnHandler
.
bind
(
this
));
//上传课堂封面 上传按钮
}
...
...
@@ -196,6 +184,7 @@ class ManagementHomePageApe extends Ape {
_updateInd
:
'classUpdate'
+
i
,
_updatacover
:
'updatacover'
+
i
,
_removeInd
:
_dataList
[
i
].
id
,
_value
:
_dataList
[
i
].
meetingPhoto
?
_dataList
[
i
].
meetingPhoto
:
''
,
_joinInd
:
_dataList
[
i
].
meetingNumber
})
courseContent
.
append
(
_adminList
);
...
...
@@ -240,14 +229,36 @@ class ManagementHomePageApe extends Ape {
}
_updatacover
(
evt
){
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#updataPhoto'
));
$
(
'#updataPhotoBox'
).
attr
(
'data'
,
1
);
//上传图片
$
(
'#updataPhotoBox'
).
show
();
$
(
'#updataPhotoImg'
).
css
({
'width'
:
'120px'
,
"margin-left"
:
'80px'
})
let
_data
=
$
(
evt
.
target
).
attr
(
'data'
);
this
.
dataId
=
_data
;
let
_value
=
$
(
evt
.
target
).
attr
(
'value'
);
$
(
"#updataPhotoImg"
).
attr
(
'src'
,
_value
)
}
_generalize
(
evt
){
ClassDataProxy
.
getMarginTopHandler
(
$
(
'#updataPhoto'
));
$
(
'#updataPhotoBox'
).
show
();
$
(
'#updataPhotoImg'
).
css
({
'width'
:
'230px'
,
"margin-left"
:
'20px'
})
$
(
'#updataPhotoBox'
).
attr
(
'data'
,
2
);
//上传推广图片
let
_data
=
$
(
evt
.
target
).
attr
(
'data'
);
this
.
dataId
=
_data
;
let
_value
=
$
(
evt
.
target
).
attr
(
'value'
);
$
(
"#updataPhotoImg"
).
attr
(
'src'
,
_value
)
}
_closeUpdatacover
(){
$
(
'#updataPhotoBox'
).
hide
();
$
(
"#updataPhotoInput"
).
val
(
''
);
$
(
"#updataPhotoImg"
)
[
0
].
style
.
backgroundImage
=
''
;
$
(
"#updataPhotoImg"
)
.
attr
(
'src'
,
''
)
}
_updataPhotoBtnHandler
()
{
let
fileInput
=
document
.
getElementById
(
'updataPhotoInput'
);
...
...
@@ -273,7 +284,7 @@ class ManagementHomePageApe extends Ape {
let
reader
=
new
FileReader
();
reader
.
onload
=
function
(
e
){
let
data
=
e
.
target
.
result
;
preview
.
style
.
backgroundImage
=
'url('
+
data
+
')'
;
$
(
preview
).
attr
(
'src'
,
data
)
}
reader
.
readAsDataURL
(
file
);
...
...
@@ -281,8 +292,10 @@ class ManagementHomePageApe extends Ape {
this
.
files
=
data
;
}
_submitBtnHandler
(){
let
genre
=
$
(
'#updataPhotoBox'
).
attr
(
'data'
);
loger
.
log
(
'上传类型'
,
genre
)
let
_dataId
=
this
.
dataId
;
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_dataId
+
'&category=
1'
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_dataId
+
'&category=
'
+
parseInt
(
genre
)
+
'&siteId='
+
ClassDataProxy
.
siteId
;
let
files
=
this
.
files
;
let
that
=
this
;
...
...
src/ape/MyBookingsApe.js
查看文件 @
6ab5905
...
...
@@ -13,7 +13,7 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS
<
span
class
=
"courseMinuteListTime"
>
{
_liveTimer
}
<
/span
>
<
span
class
=
"courseMinuteListWire"
><
/span
>
<
/div
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
data
=
"{_id}"
>
<
div
class
=
"myCenterContentMask accessLearningBtn"
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_meetingNumber}"
>
进入学习
<
/button
>
<
/div
>
...
...
@@ -55,6 +55,7 @@ class MyBookingsApe extends Ape {
this.presentInd = 1;//点击翻页默认为第一页
this.pageNo = 0;
this.orderId = 0;
this.collectId = 0;
this.addEvent();
this.init();
}
...
...
@@ -145,7 +146,9 @@ class MyBookingsApe extends Ape {
let data = $('#subscribeList').find('.liveInfoLeftLiCheck').attr('data');
if(parseInt(data) == 1){
this._studentCurriculumInfo(32,ind,function(_data){
that._studentSubscribeTeacher(_data.returnData.data)
if(_data){
that._studentSubscribeTeacher(_data.returnData.data)
}
})
}else{
this._studentCurriculumInfo(12,ind,function(_data){
...
...
@@ -174,6 +177,7 @@ class MyBookingsApe extends Ape {
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_id:_data[i].meetingId,
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
...
...
@@ -234,12 +238,18 @@ class MyBookingsApe extends Ape {
ClassDataProxy.getMarginTopHandler($('#removeHandler'));
$("
#
removeHandlerBox
").show();
$('#removeHandlerContent').html('确定要取消预约吗?');
$('#removeConfirm').attr('data',1);
}
_removeCancelHandler(){
this._hideRemoveBox();
}
_removeConfirmHandler(){
this._cancelSubscribeHandler(this.orderId);
_removeConfirmHandler(evt){
let ind = $(evt.target).attr('data')
if(parseInt(ind) == 7){
this.classCancelCollect(this.collectId);
}else if(parseInt(ind) == 1){
this._cancelSubscribeHandler(this.orderId);
}
this._hideRemoveBox();
}
_hideRemoveBox(){
...
...
@@ -334,14 +344,52 @@ class MyBookingsApe extends Ape {
$(evt.currentTarget).find('.accessLearningBtn').hide();
}
_enterClassRoomHandler(evt){
let ind = $(evt.target).attr('data');
window.open('http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber=' + ind);
let val = $(evt.currentTarget).find('.myCenterContentMaskBtn').attr('value');
let _id = $(evt.currentTarget).parents('.classifyListMyCenter').attr('data');
this.collectId = _id;
if(val == '取消收藏'){
this.showcancelBox();
}else{
let ind = $(evt.target).attr('data');
window.open('http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber=' + ind);
}
}
showcancelBox(_id){
ClassDataProxy.getMarginTopHandler($('#removeHandler'));
$("
#
removeHandlerBox
").show();
$('#removeHandlerContent').html('确定要取消收藏吗?');
$('#removeConfirm').attr('data',7)
}
//课堂取消收藏
classCancelCollect(_id){
let that = this;
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/delStudentMeetingBySite/'+_id+'/'+ClassDataProxy.siteId;
$.ajax({
type: "
delete
",
url: _url,
timeout:5000,
headers: {
siteId:ClassDataProxy.siteId,
'token':ClassDataProxy.token
},
data:{siteId:ClassDataProxy.siteId,id:ClassDataProxy.id},
success:function(_data){
//获取课堂数据
if(_data && _data.code == 200){
console.log(_data,'课堂取消收藏成功')
this._emit(MessageTypes.COLLECT_BREAK);
}
},
error:function(error){
console.log(error,'课堂取消收藏失败')
}
})
}
_studentCurriculumInfo(num,ind,callback){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id;
let that = this;
$.ajax({
type: "
GE
T
"
,
type: "
POS
T
"
,
url
:
_url
,
timeout
:
5000
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
num
,
page
:
ind
,
id
:
ClassDataProxy
.
id
,
...
...
src/ape/MyCenterApe.js
查看文件 @
6ab5905
...
...
@@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS
<
span
class
=
"courseMinuteListTime"
>
{
_liveTimer
}
<
/span
>
<
span
class
=
"courseMinuteListWire"
><
/span
>
<
/div
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
data
=
"{_id}"
>
<
div
class
=
"myCenterContentMask accessLearningBtn"
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_meetingNumber}"
>
{
_studyMsg
}
<
/button
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_meetingNumber}"
value
=
"{_studyMsg}"
>
{
_studyMsg
}
<
/button
>
<
/div
>
<
div
class
=
"myCenterContentMask cancelReservation"
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_studentMeetingId}"
>
取消预约
<
/button
>
...
...
@@ -108,6 +108,11 @@ class MyCenterApe extends Ape {
addEvent
()
{
}
defaultDateList
(){
let
studentInfoList
=
$
(
'#studentInfoList'
);
this
.
_anewLoad
(
studentInfoList
)
//默认显示第一个列表
this
.
_studentStudyModule
();
}
//首页
_homePageHandler
(){
this
.
presentInd
=
1
;
...
...
@@ -207,6 +212,7 @@ class MyCenterApe extends Ape {
}
detailpage
(){
this
.
_showStatus
();
this
.
defaultDateList
();
}
//首页
_homePageHandler
(){
...
...
@@ -357,13 +363,14 @@ class MyCenterApe extends Ape {
}
})
}
_studentCurriculumInfo
(
num
,
callback
){
_studentCurriculumInfo
(
num
,
_data
,
callback
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/getStudentMeetingByStudentId/'
+
ClassDataProxy
.
id
;
let
that
=
this
;
$
.
ajax
({
type
:
"
GE
T"
,
type
:
"
POS
T"
,
url
:
_url
,
timeout
:
5000
,
data
:
_data
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
num
,
id
:
ClassDataProxy
.
id
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
...
...
@@ -396,28 +403,30 @@ class MyCenterApe extends Ape {
this
.
teacherListSwitch
();
}
detailPageStudent
(){
this
.
_studentCourseModule
();
//首页课程
let
ind
=
$
(
'#studentInfoList .liveInfoLeftLiCheck'
).
attr
(
'data'
);
let
studentMyCenterContentList
=
$
(
'#studentMyCenterContentList'
);
this
.
_studentStudyModule
(
);
switch
(
parseInt
(
ind
)){
case
0
:
//待学习
this
.
_studentStudyModule
(
studentMyCenterContentList
);
this
.
_studentStudyModule
();
break
;
case
1
:
//已学完
this
.
_studentStudyOverModule
(
studentMyCenterContentList
);
this
.
_studentStudyOverModule
();
break
;
case
2
:
//收藏
this
.
_studenTcollectModule
(
studentMyCenterContentList
);
this
.
_studenTcollectModule
();
break
;
default
:
return
;
}
}
_anewLoad
(
ele
){
ele
.
find
(
'.liveInfoLeftLi'
).
eq
(
0
).
addClass
(
'liveInfoLeftLiCheck'
).
siblings
().
removeClass
(
'liveInfoLeftLiCheck'
)
}
_showStatus
(){
let
newDate
=
new
Date
();
let
newHours
=
newDate
.
getHours
();
...
...
@@ -447,8 +456,13 @@ class MyCenterApe extends Ape {
$
(
'#lanclassBox'
).
hide
();
loger
.
log
(
'显示头像数据'
,
ClassDataProxy
.
userPhoto
)
$
(
'#myCenterImg'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
);
//个人信息首页
$
(
'#personagePortrait'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
);
//个人信息
if
(
ClassDataProxy
.
userPhoto
==
null
||
ClassDataProxy
.
userPhoto
==
''
){
$
(
'#myCenterImg'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
)
//个人信息首页
$
(
'#personagePortrait'
).
attr
(
'src'
,
ClassDataProxy
.
userPhoto
)
//个人信息
}
else
{
$
(
'#myCenterImg'
).
attr
(
'src'
,
'../images/u373.png'
)
//个人信息首页
$
(
'#personagePortrait'
).
attr
(
'src'
,
'../images/u373.png'
)
//个人信息
}
$
(
'#oneselfInfoLoginName'
).
val
(
ClassDataProxy
.
loginName
);
//登录名
$
(
'#oneselfInfoUserName'
).
val
(
ClassDataProxy
.
monicker
);
//用户名
let
setMail
=
$
(
'#setMail'
);
//邮箱
...
...
@@ -621,8 +635,11 @@ class MyCenterApe extends Ape {
//学生端首页課程显示
_studentCourseModule
(){
let
that
=
this
;
this
.
_studentCurriculumInfo
(
3
,
function
(
_data
){
that
.
studentCourseList
(
_data
.
returnData
.
data
);
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
};
this
.
_studentCurriculumInfo
(
3
,
data
,
function
(
_data
){
if
(
_data
){
that
.
studentCourseList
(
_data
.
returnData
.
data
);
}
})
}
studentCourseList
(
_data
){
...
...
@@ -653,9 +670,11 @@ class MyCenterApe extends Ape {
}
}
//学生端首页学习数据
_studentStudyModule
(
studentMyCenterContentList
){
_studentStudyModule
(){
let
studentMyCenterContentList
=
$
(
'#studentMyCenterContentList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
4
,
function
(
_data
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
};
this
.
_studentCurriculumInfo
(
4
,
data
,
function
(
_data
){
if
(
_data
){
that
.
studentStudyList
(
studentMyCenterContentList
,
_data
.
returnData
.
data
);
}
...
...
@@ -670,12 +689,15 @@ class MyCenterApe extends Ape {
if
(
_data
[
i
]){
if
(
ClassDataProxy
.
getTimeDay
(
_data
[
i
].
meetingBeginTime
)){
let
j
=
(
i
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_id
:
_data
[
i
].
meetingId
,
_studyMsg
:
'进入学习'
,
_meetingNumber
:
_data
[
i
].
meetingNumber
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
_data
[
i
].
meeting_name
,
_create_user
:
_data
[
i
].
teacherName
,
_liveTimer
:
_data
[
i
].
meetingBeginTime
.
split
(
' '
)[
0
]
...
...
@@ -695,65 +717,85 @@ class MyCenterApe extends Ape {
}
//已学完
_studentStudyOverModule
(
studentMyCenterContentList
){
_studentStudyOverModule
(){
let
studentMyCenterContentList
=
$
(
'#studentMyCenterContentList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
4
,
function
(
_data
){
that
.
studentStudyOverList
(
studentMyCenterContentList
,
_data
.
returnData
.
data
);
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
};
this
.
_studentCurriculumInfo
(
4
,
data
,
function
(
_data
){
if
(
_data
){
that
.
studentStudyOverList
(
studentMyCenterContentList
,
_data
.
returnData
.
data
);
}
})
}
studentStudyOverList
(
studentMyCenterContentList
,
_data
){
studentMyCenterContentList
.
empty
();
$
(
'#courseMinutePageBox'
).
hide
();
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
){
if
(
_data
[
i
]){
if
(
!
ClassDataProxy
.
getTimeDay
(
_data
[
i
].
meetingBeginTime
)){
let
j
=
(
i
%
4
)
==
3
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_studyMsg
:
'继续学习'
,
_meetingNumber
:
_data
[
i
].
meetingNumber
,
_msgImg
:
'../images/u373.png'
,
_meetingName
:
_data
[
i
].
meeting_name
,
_create_user
:
_data
[
i
].
teacherName
,
_liveTimer
:
_data
[
i
].
meetingBeginTime
.
split
(
' '
)[
0
]
})
studentMyCenterContentList
.
append
(
_classifyList
)
if
(
_data
){
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
){
if
(
_data
[
i
]){
if
(
!
ClassDataProxy
.
getTimeDay
(
_data
[
i
].
meetingBeginTime
)){
let
j
=
(
i
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_id
:
_data
[
i
].
meetingId
,
_studyMsg
:
'继续学习'
,
_meetingNumber
:
_data
[
i
].
meetingNumber
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
_data
[
i
].
meeting_name
,
_create_user
:
_data
[
i
].
teacherName
,
_liveTimer
:
_data
[
i
].
meetingBeginTime
.
split
(
' '
)[
0
]
})
studentMyCenterContentList
.
append
(
_classifyList
)
}
}
else
{
console
.
error
(
'_gainClassData没数据'
)
}
}
else
{
console
.
error
(
'_gainClassData没数据'
)
}
}
}
_studenTcollectModule
(
studentMyCenterContentList
){
//收藏
_studenTcollectModule
(){
let
meetingId
=
$
(
'#lanclassBox'
).
attr
(
'data'
);
let
studentMyCenterContentList
=
$
(
'#studentMyCenterContentList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
4
,
function
(
_data
){
that
.
studentTcollectList
(
studentMyCenterContentList
,
_data
.
returnData
.
data
);
let
data
=
{
status
:
7
,
siteId
:
ClassDataProxy
.
siteId
,
id
:
ClassDataProxy
.
id
,
meetingId
:
meetingId
};
this
.
_studentCurriculumInfo
(
4
,
data
,
function
(
_data
){
if
(
_data
){
that
.
studentTcollectList
(
studentMyCenterContentList
,
_data
.
returnData
.
data
);
}
})
}
studentTcollectList
(
studentMyCenterContentList
,
_data
){
studentMyCenterContentList
.
empty
();
$
(
'#courseMinutePageBox'
).
hide
();
/* for(let i = 0;i<_data.length;i++){
if(_data[i]){
if(!ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){
let j = (i%4)==3;
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
_create_user : _data[i].teacherName,
_liveTimer : _data[i].meetingBeginTime.split(' ')[0]
})
studentMyCenterContentList.append(_classifyList)
}
}else{
console.error('_gainClassData没数据')
}
}*/
if
(
_data
){
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
){
if
(
_data
[
i
]){
if
(
!
ClassDataProxy
.
getTimeDay
(
_data
[
i
].
meetingBeginTime
)){
let
j
=
(
i
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
_data
[
i
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_studyMsg
:
'取消收藏'
,
_id
:
_data
[
i
].
meetingId
,
_meetingNumber
:
_data
[
i
].
meetingNumber
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
_data
[
i
].
meeting_name
,
_create_user
:
_data
[
i
].
teacherName
,
_liveTimer
:
_data
[
i
].
meetingBeginTime
.
split
(
' '
)[
0
]
})
studentMyCenterContentList
.
append
(
_classifyList
)
}
}
else
{
console
.
error
(
'_gainClassData没数据'
)
}
}
}
}
clearLocalStorage
(){
...
...
@@ -798,6 +840,7 @@ class MyCenterApe extends Ape {
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'
,
...
...
@@ -861,6 +904,7 @@ class MyCenterApe extends Ape {
_studentInfoListHandler
(
evt
){
this
.
commonality
(
evt
);
this
.
detailPageStudent
();
// this.defaultDateList()
}
//工具类
...
...
src/ape/MyChangeInfoApe.js
查看文件 @
6ab5905
...
...
@@ -54,7 +54,7 @@ class MyChangeInfoApe extends Ape {
let
_id
=
ClassDataProxy
.
id
;
let
data
=
new
FormData
(
$
(
'#personagePhotoForm'
)[
0
]);
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_id
+
'&category=1
'
let
_url
=
'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='
+
_id
+
'&category=1
&siteId='
+
ClassDataProxy
.
siteId
;
$
.
ajax
({
type
:
"POST"
,
...
...
src/ape/MyCoursesApe.js
查看文件 @
6ab5905
...
...
@@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS
<
span
class
=
"courseMinuteListTime"
>
{
_liveTimer
}
<
/span
>
<
span
class
=
"courseMinuteListWire"
><
/span
>
<
/div
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
>
<
div
class
=
"classifyListMyCenter {_classifyListR}"
data
=
"{_id}"
>
<
div
class
=
"myCenterContentMask accessLearningBtn"
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_meetingNumber}"
>
{
_studyMsg
}
<
/button
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_meetingNumber}"
value
=
"{_studyMsg}"
>
{
_studyMsg
}
<
/button
>
<
/div
>
<
div
class
=
"myCenterContentMask cancelReservation"
>
<
button
class
=
"myCenterContentMaskBtn btnHover"
data
=
"{_studentMeetingId}"
>
取消预约
<
/button
>
...
...
@@ -237,19 +237,18 @@ class MyCoursesApe extends Ape {
//学生端 我的课程 切换
studentCourses
(){
let
ind
=
$
(
'#courseInfoList .liveInfoLeftLiCheck'
).
attr
(
'data'
);
let
courseMinuteList
=
$
(
'#courseMinuteList'
);
switch
(
parseInt
(
ind
)){
case
0
:
//待学习
this
.
studentFutureModule
(
courseMinuteList
);
this
.
studentFutureModule
();
break
;
case
1
:
//已学完
this
.
studentFormerlyModule
(
courseMinuteList
);
this
.
studentFormerlyModule
();
break
;
case
2
:
//收藏
this
.
studentCollectModule
(
courseMinuteList
);
this
.
studentCollectModule
();
break
;
default
:
return
;
...
...
@@ -257,9 +256,11 @@ class MyCoursesApe extends Ape {
}
//学生端 我的课程 待学习
studentFutureModule
(
courseMinuteList
){
studentFutureModule
(){
let
courseMinuteList
=
$
(
'#courseMinuteList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
12
,
function
(
_data
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
}
this
.
_studentCurriculumInfo
(
12
,
data
,
function
(
_data
){
if
(
_data
){
that
.
_studentCourseRender
(
courseMinuteList
,
_data
.
returnData
.
data
)
}
...
...
@@ -297,12 +298,15 @@ class MyCoursesApe extends Ape {
if
(
arrList
){
for
(
let
n
=
0
;
n
<
arrList
.
length
;
n
++
){
let
j
=
(
n
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
arrList
[
n
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
n
==
0
?
'block'
:
'none'
,
_meetingNumber
:
arrList
[
n
].
meetingNumber
,
_id
:
arrList
[
n
].
meetingId
,
_studyMsg
:
'进入学习'
,
_msgImg
:
'../images/u373.png'
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
arrList
[
n
].
meeting_name
,
_create_user
:
arrList
[
n
].
teacherName
,
_liveTimer
:
key
...
...
@@ -320,9 +324,11 @@ class MyCoursesApe extends Ape {
}
//学生端 我的课程 已学完
studentFormerlyModule
(
courseMinuteList
){
studentFormerlyModule
(){
let
courseMinuteList
=
$
(
'#courseMinuteList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
12
,
function
(
_data
){
let
data
=
{
siteId
:
ClassDataProxy
.
siteId
}
this
.
_studentCurriculumInfo
(
12
,
data
,
function
(
_data
){
if
(
_data
){
that
.
_studentFormerlyRender
(
courseMinuteList
,
_data
.
returnData
.
data
)
}
...
...
@@ -331,56 +337,63 @@ class MyCoursesApe extends Ape {
//学生端课程数据 已学完
_studentFormerlyRender
(
courseMinuteList
,
_data
){
courseMinuteList
.
empty
();
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
;
this
.
pageNo
=
pagenum
;
// $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录');
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
;
this
.
pageNo
=
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
.
meetingBeginTime
.
split
(
' '
)[
0
]
if
(
!
this
.
dataList
[
temp
])
{
this
.
dataList
[
temp
]
=
[];
}
this
.
dataList
[
temp
].
push
(
item
)
if
(
count
<=
12
){
$
(
'#courseMinutePageBox'
).
hide
();
}
}
for
(
let
key
in
this
.
dataList
){
if
(
!
ClassDataProxy
.
getTimeDay
(
key
)){
let
arrList
=
this
.
dataList
[
key
];
if
(
arrList
){
for
(
let
n
=
0
;
n
<
arrList
.
length
;
n
++
){
let
j
=
(
n
%
4
)
==
3
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
n
==
0
?
'block'
:
'none'
,
_studyMsg
:
'继续学习'
,
_meetingNumber
:
arrList
[
n
].
meetingNumber
,
_msgImg
:
'../images/u373.png'
,
_meetingName
:
arrList
[
n
].
meeting_name
,
_create_user
:
arrList
[
n
].
teacherName
,
_liveTimer
:
key
})
courseMinuteList
.
append
(
_classifyList
)
//存储数据按日期分类
this
.
dataList
=
{};
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
item
=
_dataList
[
i
];
if
(
item
){
let
temp
=
item
.
meetingBeginTime
.
split
(
' '
)[
0
]
if
(
!
this
.
dataList
[
temp
])
{
this
.
dataList
[
temp
]
=
[];
}
this
.
dataList
[
temp
].
push
(
item
)
}
}
for
(
let
key
in
this
.
dataList
){
if
(
!
ClassDataProxy
.
getTimeDay
(
key
)){
let
arrList
=
this
.
dataList
[
key
];
if
(
arrList
){
for
(
let
n
=
0
;
n
<
arrList
.
length
;
n
++
){
let
j
=
(
n
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
arrList
[
n
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
n
==
0
?
'block'
:
'none'
,
_studyMsg
:
'继续学习'
,
_id
:
arrList
[
n
].
meetingId
,
_meetingNumber
:
arrList
[
n
].
meetingNumber
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
arrList
[
n
].
meeting_name
,
_create_user
:
arrList
[
n
].
teacherName
,
_liveTimer
:
key
})
courseMinuteList
.
append
(
_classifyList
)
}
}
}
}
}
}
//学生端 我的课程 收藏
studentCollectModule
(
courseMinuteList
){
studentCollectModule
(){
let
courseMinuteList
=
$
(
'#courseMinuteList'
);
let
that
=
this
;
this
.
_studentCurriculumInfo
(
12
,
function
(
_data
){
let
data
=
{
status
:
7
,
siteId
:
ClassDataProxy
.
siteId
,
id
:
ClassDataProxy
.
id
}
this
.
_studentCurriculumInfo
(
12
,
data
,
function
(
_data
){
if
(
_data
){
that
.
_studentCollectRender
(
courseMinuteList
,
_data
.
returnData
.
data
)
}
...
...
@@ -388,51 +401,54 @@ class MyCoursesApe extends Ape {
}
//学生端课程数据 收藏
_studentCollectRender
(
courseMinuteList
,
_data
){
loger
.
log
(
'收藏'
,
_data
)
courseMinuteList
.
empty
();
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
;
this
.
pageNo
=
pagenum
;
// $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录');
if
(
_data
){
let
count
=
_data
.
count
;
let
page
=
_data
.
page
;
let
pageno
=
_data
.
pageno
;
let
pagenum
=
Math
.
ceil
(
count
/
pageno
);
let
_dataList
=
_data
;
this
.
pageNo
=
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
.
meetingBeginTime
.
split
(
' '
)[
0
]
if
(
!
this
.
dataList
[
temp
])
{
this
.
dataList
[
temp
]
=
[];
if
(
count
<=
12
){
$
(
'#courseMinutePageBox'
).
hide
();
}
//存储数据按日期分类
this
.
dataList
=
{};
for
(
let
i
=
0
;
i
<
_dataList
.
length
;
i
++
){
let
item
=
_dataList
[
i
];
if
(
item
){
let
temp
=
item
.
meetingBeginTime
.
split
(
' '
)[
0
]
if
(
!
this
.
dataList
[
temp
])
{
this
.
dataList
[
temp
]
=
[];
}
this
.
dataList
[
temp
].
push
(
item
)
}
this
.
dataList
[
temp
].
push
(
item
)
}
}
// let arrList = this.dataList[key];
if
(
_dataList
){
for
(
let
n
=
0
;
n
<
_dataList
.
length
;
n
++
){
let
j
=
(
n
%
4
)
==
3
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_studyMsg
:
'取消收藏'
,
_meetingNumber
:
_dataList
[
n
].
meetingNumber
,
_msgImg
:
'../images/u373.png'
,
_meetingName
:
_dataList
[
n
].
meeting_name
,
_create_user
:
_dataList
[
n
].
teacherName
,
// _liveTimer : key
})
courseMinuteList
.
append
(
_classifyList
)
// let arrList = this.dataList[key];
if
(
_dataList
){
for
(
let
n
=
0
;
n
<
_dataList
.
length
;
n
++
){
let
j
=
(
n
%
4
)
==
3
;
let
defaultImg
=
'../images/u373.png'
;
let
_img
=
_dataList
[
n
].
meetingPhoto
;
let
_classifyList
=
this
.
_format
(
classifyList
,{
_classifyListR
:
j
?
'classifyListR'
:
''
,
_isShowTitle
:
'none'
,
_studyMsg
:
'取消收藏'
,
_id
:
_dataList
[
n
].
meetingId
,
_meetingNumber
:
_dataList
[
n
].
meetingNumber
,
_msgImg
:
_img
?
_img
:
defaultImg
,
_meetingName
:
_dataList
[
n
].
meeting_name
,
_create_user
:
_dataList
[
n
].
teacherName
,
_liveTimer
:
_dataList
[
n
].
meetingBeginTime
.
split
(
' '
)[
0
]
})
courseMinuteList
.
append
(
_classifyList
)
}
}
}
}
//学生端 我的课程
...
...
@@ -482,13 +498,14 @@ class MyCoursesApe extends Ape {
}
})
}
_studentCurriculumInfo
(
num
,
callback
){
_studentCurriculumInfo
(
num
,
_data
,
callback
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/studentMeeting/getStudentMeetingByStudentId/'
+
ClassDataProxy
.
id
;
let
that
=
this
;
$
.
ajax
({
type
:
"
GE
T"
,
type
:
"
POS
T"
,
url
:
_url
,
timeout
:
5000
,
data
:
_data
,
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
pageno
:
num
,
id
:
ClassDataProxy
.
id
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
...
...
src/ape/Slideshow.js
查看文件 @
6ab5905
...
...
@@ -6,7 +6,11 @@ import Loger from "../Loger";
import
Ape
from
"./Ape"
;
import
$
from
"jquery"
;
import
ClassDataProxy
from
"proxy/ClassDataProxy"
;
import
MessageTypes
from
"../MessageTypes"
;
const
SlideList
=
`
<
li
class
=
"slidesMap"
><
img
class
=
"slidesImg"
src
=
"{_imgList}"
data
=
"{_id}"
alt
=
""
><
/li
>
`
;
let
loger
=
Loger
.
getLoger
(
'PC-Slideshow'
);
class
Slideshow
extends
Ape
{
constructor
()
{
...
...
@@ -15,44 +19,138 @@ class Slideshow extends Ape {
this
.
windowWidth
=
0
;
this
.
num
=
0
;
this
.
len
=
0
;
this
.
defaultList
=
[
'images/xdybg.png'
,
'images/bg.jpg'
,
'images/xdybg.png'
,
'images/bg.jpg'
,
'images/xdybg.png'
];
this
.
dataList
=
[];
this
.
dataLength
=
0
;
this
.
isLocalStorage
();
this
.
addEvent
();
this
.
init
();
}
init
()
{
$
(
window
).
on
(
'resize'
,
this
.
_imgReload
.
bind
(
this
));
this
.
slideImg
();
this
.
_imgReload
();
$
(
".slidesImg"
).
on
(
'load'
,
this
.
_onLoadImage
.
bind
(
this
));
$
(
'#dots'
).
on
(
'mouseenter'
,
this
.
_mouseenterHandler
.
bind
(
this
));
$
(
'#dots'
).
on
(
'mouseleave'
,
this
.
_mouseleaveHandler
.
bind
(
this
));
$
(
'#motionMapBox'
).
on
(
'click'
,
'.slidesMap'
,
this
.
_slidesMapHandler
.
bind
(
this
));
}
addEvent
()
{
}
isLocalStorage
(){
let
that
=
this
;
this
.
detailPage
(
function
(
_data
)
{
if
(
_data
){
let
_dataList
=
_data
.
returnData
.
data
;
let
motionMapBox
=
$
(
'#motionMapBox'
);
if
(
_dataList
){
motionMapBox
.
empty
();
for
(
let
i
in
_dataList
){
let
_adminList
=
that
.
_format
(
SlideList
,{
_imgList
:
_dataList
[
i
].
path
,
_id
:
_dataList
[
i
].
businessId
})
motionMapBox
.
append
(
_adminList
)
}
that
.
dataLength
=
_dataList
.
length
;
}
else
{
motionMapBox
.
empty
();
for
(
let
i
=
0
;
i
<
that
.
defaultList
.
length
;
i
++
){
let
_adminList
=
that
.
_format
(
SlideList
,{
_imgList
:
_dataList
[
i
]
})
motionMapBox
.
append
(
_adminList
)
}
that
.
dataLength
=
that
.
defaultList
.
length
;
}
}
});
let
li
=
document
.
getElementById
(
'motionMapBox'
).
getElementsByTagName
(
"li"
);
console
.
log
(
li
,
'aaaaaaaa'
)
this
.
slideImg
();
}
detailPage
(
callback
){
let
_url
=
ClassDataProxy
.
locationProtocol
+
ClassDataProxy
.
locationProt
+
'/upload/getImgBySiteId'
;
let
that
=
this
;
$
.
ajax
({
type
:
"POST"
,
url
:
_url
,
data
:{
siteId
:
ClassDataProxy
.
siteId
},
headers
:
{
siteId
:
ClassDataProxy
.
siteId
,
'token'
:
ClassDataProxy
.
token
},
success
:
function
(
_data
){
/* if(_data && _data.code == 200){
loger.log('获取首页图片信息',_data)
}*/
if
(
_data
&&
_data
.
code
==
200
){
if
(
callback
){
callback
(
_data
);
}
}
else
{
if
(
callback
){
callback
(
null
);
}
}
},
error
:
function
(
error
){
// console.log(error,'获取首页图片信息失败')
if
(
callback
){
callback
(
null
);
}
}
})
}
_onLoadImage
(){
this
.
_imgReload
();
}
slideImg
(){
loger
.
log
(
'西三四速度快快快'
)
let
oli
=
document
.
getElementById
(
'dots'
).
getElementsByTagName
(
"li"
);
let
_num
=
0
;
let
clone
=
$
(
".slidesMap"
).
first
().
clone
();
$
(
"#motionMapBox"
).
append
(
clone
);
// let clone=$("#motionMapBox").find(".slidesMap").first().clone();
// $("#motionMapBox").append(clone);
let
li
=
document
.
getElementById
(
'motionMapBox'
).
getElementsByTagName
(
"li"
);
let
size
=
li
.
length
let
size
=
li
.
length
;
this
.
num
=
_num
;
this
.
len
=
size
;
clearInterval
(
this
.
_timer
);
let
that
=
this
;
this
.
_timer
=
setInterval
(
function
(){
li
[
_num
].
style
.
display
=
"none"
;
_num
=++
_num
==
size
?
0
:
_num
;
li
[
_num
].
style
.
display
=
"inline-block"
;
// $("#motionMapBox").stop().animate({left:-this.num*this.windowWidth},500);
// $("#dots li").eq(_num).addClass('active').siblings().removeClass('active');
$
(
'.slidesMap'
).
eq
(
_num
).
show
().
siblings
().
hide
();
_num
++
;
if
(
_num
>
that
.
dataLength
-
1
){
_num
=
0
;
}
/*console.log(_num,that.dataLength,'_num')
if(_num > that.dataLength - 1){
_num = -1;
}
let liItem=li[_num];
if(liItem){
liItem.style.display="none";
}
_num++;
liItem=li[_num];
if(liItem){
liItem.style.display="inline-block";
}*/
},
3000
);
//切换时间
}
...
...
@@ -62,16 +160,25 @@ class Slideshow extends Ape {
_mouseleaveHandler
(){
// setInterval(this._timer);
}
_slidesMapHandler
(
evt
){
let
_id
=
$
(
evt
.
currentTarget
).
find
(
'.slidesImg'
).
attr
(
'data'
);
loger
.
log
(
_id
)
this
.
_emit
(
MessageTypes
.
CLICK_IMGINFO
,{
id
:
_id
});
}
_imgReload
(){
let
_windowWidth
=
$
(
"body"
).
width
();
this
.
windowWidth
=
_windowWidth
;
$
(
'.slidesMap'
).
css
({
width
:
_windowWidth
+
"px"
});
$
(
'.slidesImg'
).
css
({
width
:
_windowWidth
+
"px"
});
$
(
'.slidesImg'
).
css
({
width
:
_windowWidth
+
"px"
,
"background-size"
:
'100%'
});
$
(
'#motionMapBox'
).
width
(
$
(
".slidesMap"
).
length
*
_windowWidth
)
}
//工具类
_format
(
str
,
obj
)
{
return
str
.
replace
(
/
\{(\w
+
)\}
/g
,
function
(
match
,
group
,
index
)
{
return
obj
[
group
];
});
};
}
export
default
new
Slideshow
;
\ No newline at end of file
export
default
Slideshow
;
\ No newline at end of file
...
...
src/main.js
查看文件 @
6ab5905
...
...
@@ -9,8 +9,9 @@ import UIControlApe from "ape/UIControlApe";
import
ErrorApe
from
'ape/ErrorApe'
;
import
Slideshow
from
'ape/Slideshow'
;
//图片轮播
import
LoginOrRegister
from
'ape/LoginOrRegister'
;
//登录注册
import
Slideshow
from
'ape/Slideshow'
;
//图片轮播
import
LanclassApe
from
'ape/LanclassApe'
;
//互动课堂
import
LiveClassApe
from
'ape/LiveClassApe'
;
//直播课堂
import
HomeApe
from
'ape/HomeApe'
;
//首页
...
...
@@ -63,12 +64,13 @@ let _myChangeInfoApe;//个人信息修改
let
_subscribeApe
;
let
_collectApe
;
let
_slideshow
;
let
_headSwitchTitleApe
;
class
Main
{
constructor
()
{
this
.
clientVersion
=
"v1.8.
7.20170928
"
;
this
.
clientVersion
=
"v1.8.
8.20170929
"
;
loger
.
warn
(
"clientVersion:"
+
this
.
clientVersion
);
let
locationProtocol
=
location
.
protocol
;
...
...
@@ -151,7 +153,9 @@ class Main {
_loginOrRegister
=
new
LoginOrRegister
();
_loginOrRegister
.
on
(
MessageTypes
.
LOGIN_OUT
,
this
.
loginOut
.
bind
(
this
));
_loginOrRegister
.
on
(
MessageTypes
.
LOGIN_IN
,
this
.
loginIn
.
bind
(
this
));
// _loginOrRegister.on(MessageTypes.LOGIN_MYCENTER,this.loginMycenter.bind(this));
_slideshow
=
new
Slideshow
();
_slideshow
.
on
(
MessageTypes
.
CLICK_IMGINFO
,
this
.
clickImgInfo
.
bind
(
this
));
//个人中心
_myCenterApe
=
new
MyCenterApe
();
...
...
@@ -162,6 +166,7 @@ class Main {
_myCoursesApe
=
new
MyCoursesApe
();
//个人中心 我的预约
_myBookingsApe
=
new
MyBookingsApe
();
_myBookingsApe
.
on
(
MessageTypes
.
COLLECT_BREAK
,
this
.
collectBreak
.
bind
(
this
));
//预约管理
_subscribeApe
=
new
SubscribeApe
();
...
...
@@ -237,10 +242,6 @@ class Main {
}
}
loginMycenter
(){
_myCenterApe
.
detailpage
();
loger
.
log
(
'1111111111'
)
}
homeSkip
(
_data
)
{
if
(
_data
&&
_data
.
userType
)
{
if
(
_data
.
userType
==
ClassDataProxy
.
USER_TYPE_1
)
{
...
...
@@ -260,6 +261,11 @@ class Main {
myBookings
(){
_myBookingsApe
.
myBookingsMessage
();
}
collectBreak
(){
_myCenterApe
.
_studenTcollectModule
();
_myCoursesApe
.
studentCollectModule
();
}
//是否收藏
isCollect
(
_data
){
if
(
_data
){
...
...
@@ -267,6 +273,12 @@ class Main {
}
}
clickImgInfo
(
_data
){
if
(
_data
){
console
.
log
(
'clickImgInfo'
,
_data
)
_listDetailsApe
.
_slideshowInfo
(
_data
.
id
);
}
}
//管理员左侧列表
switchClass
(
_data
){
let
ind
=
parseInt
(
_data
);
...
...
@@ -438,6 +450,7 @@ class Main {
$
(
'#teacherUI .recordLi'
).
eq
(
2
).
hide
();
$
(
'#liveContentAllBox'
).
hide
();
$
(
'#lanclassAllBox'
).
hide
();
$
(
'#lanclassBox'
).
hide
();
$
(
'#teacherIntroAllBox'
).
hide
();
}
_student
(){
...
...
请
注册
或
登录
后发表评论