正在显示
14 个修改的文件
包含
606 行增加
和
281 行删除
@@ -241,10 +241,14 @@ body{ | @@ -241,10 +241,14 @@ body{ | ||
241 | } | 241 | } |
242 | .slidesMap{ | 242 | .slidesMap{ |
243 | float: left; | 243 | float: left; |
244 | + width: 100%; | ||
244 | height:540px; | 245 | height:540px; |
245 | } | 246 | } |
246 | .slidesImg{ | 247 | .slidesImg{ |
247 | - height:540px; | 248 | + width:100%; |
249 | + height:100%; | ||
250 | + background-size: 100% 100%; | ||
251 | + cursor: pointer; | ||
248 | } | 252 | } |
249 | .dots{ | 253 | .dots{ |
250 | position: absolute; | 254 | position: absolute; |
@@ -1308,11 +1312,11 @@ body{ | @@ -1308,11 +1312,11 @@ body{ | ||
1308 | 1312 | ||
1309 | } | 1313 | } |
1310 | .usersignInput{ | 1314 | .usersignInput{ |
1315 | + width: 260px; | ||
1311 | padding-left:20px; | 1316 | padding-left:20px; |
1312 | border:none; | 1317 | border:none; |
1313 | background: none; | 1318 | background: none; |
1314 | outline: none; | 1319 | outline: none; |
1315 | - | ||
1316 | border-radius: 2px; | 1320 | border-radius: 2px; |
1317 | } | 1321 | } |
1318 | .userVerifyLiInputBtn{ | 1322 | .userVerifyLiInputBtn{ |
@@ -43,11 +43,11 @@ | @@ -43,11 +43,11 @@ | ||
43 | <!--图片轮播--> | 43 | <!--图片轮播--> |
44 | <div class="slideshow" id="slideshow"> | 44 | <div class="slideshow" id="slideshow"> |
45 | <ul class="motionMapBox" id="motionMapBox"> | 45 | <ul class="motionMapBox" id="motionMapBox"> |
46 | - <li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li> | 46 | + <!--<li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li> |
47 | <li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li> | 47 | <li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li> |
48 | <li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li> | 48 | <li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li> |
49 | <li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li> | 49 | <li class="slidesMap"><img class="slidesImg" src="images/bg.jpg" alt=""></li> |
50 | - <li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li> | 50 | + <li class="slidesMap"><img class="slidesImg" src="images/xdybg.png" alt=""></li>--> |
51 | </ul> | 51 | </ul> |
52 | <ol class="dots" id="dots"> | 52 | <ol class="dots" id="dots"> |
53 | </ol> | 53 | </ol> |
@@ -1657,7 +1657,7 @@ | @@ -1657,7 +1657,7 @@ | ||
1657 | <button class="userVerifyLiInputBtn btnHover">发送验证码</button> | 1657 | <button class="userVerifyLiInputBtn btnHover">发送验证码</button> |
1658 | </li> | 1658 | </li> |
1659 | <li class="permitSign usersignLi"> | 1659 | <li class="permitSign usersignLi"> |
1660 | - <input id="permitSign" class="permitSignIcon" type="checkbox"> | 1660 | + <input id="permitSign" class="permitSignIcon" type="checkbox" checked> |
1661 | <label for="permitSign"></label> | 1661 | <label for="permitSign"></label> |
1662 | <span class="permitSignMsg">我已阅读并接受用户协议</span> | 1662 | <span class="permitSignMsg">我已阅读并接受用户协议</span> |
1663 | <p class="errorTit" id="errorTitLogin"></p> | 1663 | <p class="errorTit" id="errorTitLogin"></p> |
@@ -2523,7 +2523,7 @@ | @@ -2523,7 +2523,7 @@ | ||
2523 | <!-- <span class="addUserBtn updataPhotoBtn">上传封面--> | 2523 | <!-- <span class="addUserBtn updataPhotoBtn">上传封面--> |
2524 | <input class="updataPhotoInput" id="updataPhotoInput" type="file" name="file"/> | 2524 | <input class="updataPhotoInput" id="updataPhotoInput" type="file" name="file"/> |
2525 | <!--</span>--> | 2525 | <!--</span>--> |
2526 | - <div class="updataPhotoImg" id="updataPhotoImg"></div> | 2526 | + <img src="" class="updataPhotoImg" id="updataPhotoImg" alt=""> |
2527 | <span class="addUserBtn updataPhotoBtn" id="updataPhotoBtn">上传</span> | 2527 | <span class="addUserBtn updataPhotoBtn" id="updataPhotoBtn">上传</span> |
2528 | </form> | 2528 | </form> |
2529 | </div> | 2529 | </div> |
@@ -35,5 +35,10 @@ MessageTypes.ROLE_MESSAGE= "role_message"; //我的信息 | @@ -35,5 +35,10 @@ MessageTypes.ROLE_MESSAGE= "role_message"; //我的信息 | ||
35 | 35 | ||
36 | MessageTypes.IS_COLLECT= "is_collect"; //是否收藏 | 36 | MessageTypes.IS_COLLECT= "is_collect"; //是否收藏 |
37 | 37 | ||
38 | +MessageTypes.COLLECT_BREAK= "collect_break"; //刷新收藏数据 | ||
39 | + | ||
40 | + | ||
41 | +//首页图片数据详情 | ||
42 | +MessageTypes.CLICK_IMGINFO= "click_imginfo"; //刷新收藏数据 | ||
38 | export default MessageTypes; | 43 | export default MessageTypes; |
39 | 44 |
@@ -39,6 +39,7 @@ class CollectApe extends Ape { | @@ -39,6 +39,7 @@ class CollectApe extends Ape { | ||
39 | this.detailPage(_url,data,function(_data){ | 39 | this.detailPage(_url,data,function(_data){ |
40 | if(_data && _data.code == 200){ | 40 | if(_data && _data.code == 200){ |
41 | that._collectNoClick(); | 41 | that._collectNoClick(); |
42 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
42 | ErrorApe.showWarnError('收藏成功'); | 43 | ErrorApe.showWarnError('收藏成功'); |
43 | loger.log('收藏数据信息',_data) | 44 | loger.log('收藏数据信息',_data) |
44 | } | 45 | } |
@@ -49,16 +50,16 @@ class CollectApe extends Ape { | @@ -49,16 +50,16 @@ class CollectApe extends Ape { | ||
49 | let that = this; | 50 | let that = this; |
50 | 51 | ||
51 | let id = $('#lanclassBox').attr('data'); | 52 | let id = $('#lanclassBox').attr('data'); |
52 | - let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/updateStudentMeetingBySite/'+id; | 53 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/delStudentMeetingBySite/'+id+'/'+ClassDataProxy.siteId; |
53 | $.ajax({ | 54 | $.ajax({ |
54 | - type: "PUT", | 55 | + type: "delete", |
55 | url: _url, | 56 | url: _url, |
56 | timeout:5000, | 57 | timeout:5000, |
57 | headers: { | 58 | headers: { |
58 | siteId:ClassDataProxy.siteId, | 59 | siteId:ClassDataProxy.siteId, |
59 | 'token':ClassDataProxy.token | 60 | 'token':ClassDataProxy.token |
60 | }, | 61 | }, |
61 | - data:{status:parseInt(status)}, | 62 | + data:{siteId:ClassDataProxy.siteId,id:ClassDataProxy.id}, |
62 | success:function(_data){ | 63 | success:function(_data){ |
63 | //获取课堂数据 | 64 | //获取课堂数据 |
64 | if(_data && _data.code == 200){ | 65 | if(_data && _data.code == 200){ |
@@ -101,21 +102,6 @@ class CollectApe extends Ape { | @@ -101,21 +102,6 @@ class CollectApe extends Ape { | ||
101 | } | 102 | } |
102 | }) | 103 | }) |
103 | } | 104 | } |
104 | - isCollect(id){ | ||
105 | - let that = this; | ||
106 | - let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/addStudentMeeting'; | ||
107 | - let data = {siteId:ClassDataProxy.siteId, | ||
108 | - "studentId":ClassDataProxy.id, | ||
109 | - "status":6, | ||
110 | - "meetingId":id | ||
111 | - } | ||
112 | - this.detailPage(_url,data,function(_data){ | ||
113 | - loger.log('您已收藏这堂课',_data) | ||
114 | - if(_data.returnData.data.msg == '您已收藏这堂课'){ | ||
115 | - that._collectNoClick(); | ||
116 | - } | ||
117 | - }) | ||
118 | - } | ||
119 | toLogin(){ | 105 | toLogin(){ |
120 | $('#userLoginBox').show(); | 106 | $('#userLoginBox').show(); |
121 | } | 107 | } |
@@ -93,11 +93,11 @@ class HomeApe extends Ape { | @@ -93,11 +93,11 @@ class HomeApe extends Ape { | ||
93 | //直播信息 | 93 | //直播信息 |
94 | liveModule(){ | 94 | liveModule(){ |
95 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; | 95 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; |
96 | - let data = {siteId:ClassDataProxy.siteId,meetingStatus:2} | 96 | + let data = {siteId:ClassDataProxy.siteId,meetingStatus:2}; |
97 | let that = this; | 97 | let that = this; |
98 | this.detailPage(_url,data,8,1,function(_data){ | 98 | this.detailPage(_url,data,8,1,function(_data){ |
99 | if(_data){ | 99 | if(_data){ |
100 | - //loger.log('首页直播信息',_data) | 100 | + // loger.log('首页直播信息',_data) |
101 | that._liveClassData(_data.returnData.data.meetingInfo); | 101 | that._liveClassData(_data.returnData.data.meetingInfo); |
102 | } | 102 | } |
103 | }) | 103 | }) |
@@ -105,7 +105,7 @@ class HomeApe extends Ape { | @@ -105,7 +105,7 @@ class HomeApe extends Ape { | ||
105 | //互动信息 | 105 | //互动信息 |
106 | interactModule(){ | 106 | interactModule(){ |
107 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; | 107 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; |
108 | - let data = {siteId:ClassDataProxy.siteId,meetingStatus:1} | 108 | + let data = {siteId:ClassDataProxy.siteId,meetingStatus:1}; |
109 | let that = this; | 109 | let that = this; |
110 | this.detailPage(_url,data,8,1,function(_data){ | 110 | this.detailPage(_url,data,8,1,function(_data){ |
111 | if(_data){ | 111 | if(_data){ |
@@ -166,7 +166,7 @@ class HomeApe extends Ape { | @@ -166,7 +166,7 @@ class HomeApe extends Ape { | ||
166 | let j = (i%4)==3; | 166 | let j = (i%4)==3; |
167 | let _getTime = ClassDataProxy.getTimeDifference(_data[i].beginTime,_data[i].endTime) | 167 | let _getTime = ClassDataProxy.getTimeDifference(_data[i].beginTime,_data[i].endTime) |
168 | let _img = '../images/u373.png'; | 168 | let _img = '../images/u373.png'; |
169 | - let _classImg = _data[i].meetingPhoto | 169 | + let _classImg = _data[i].meetingPhoto; |
170 | let _classifyList = this._format(classifyList,{ | 170 | let _classifyList = this._format(classifyList,{ |
171 | _classifyListR : j?'classifyListR':'', | 171 | _classifyListR : j?'classifyListR':'', |
172 | _id : _data[i].id, | 172 | _id : _data[i].id, |
@@ -50,6 +50,7 @@ class ListDetailsApe extends Ape { | @@ -50,6 +50,7 @@ class ListDetailsApe extends Ape { | ||
50 | let _id = $(evt.currentTarget).attr('data'); | 50 | let _id = $(evt.currentTarget).attr('data'); |
51 | this._id = _id; | 51 | this._id = _id; |
52 | this.liveInfoDetail(_id); | 52 | this.liveInfoDetail(_id); |
53 | + this.collectInfoDetail(_id); | ||
53 | this.commonalityClass(); | 54 | this.commonalityClass(); |
54 | } | 55 | } |
55 | commonalityClass(){ | 56 | commonalityClass(){ |
@@ -65,6 +66,21 @@ class ListDetailsApe extends Ape { | @@ -65,6 +66,21 @@ class ListDetailsApe extends Ape { | ||
65 | this.teacherInfoDetail(_id); | 66 | this.teacherInfoDetail(_id); |
66 | this.commonalityClass(); | 67 | this.commonalityClass(); |
67 | } | 68 | } |
69 | + _slideshowInfo(_id){ | ||
70 | + let that = this; | ||
71 | + let data = { | ||
72 | + id: _id, | ||
73 | + siteId:ClassDataProxy.siteId | ||
74 | + } | ||
75 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; | ||
76 | + this.detailPage(_url,data,function(_data){ | ||
77 | + if(_data){ | ||
78 | + loger.log('detailPage',_data) | ||
79 | + that._gainClassData(_data.returnData.data); | ||
80 | + } | ||
81 | + }) | ||
82 | + this.commonalityClass(); | ||
83 | + } | ||
68 | classInfoDetail(_id){ | 84 | classInfoDetail(_id){ |
69 | let that = this; | 85 | let that = this; |
70 | let data = { | 86 | let data = { |
@@ -93,6 +109,27 @@ class ListDetailsApe extends Ape { | @@ -93,6 +109,27 @@ class ListDetailsApe extends Ape { | ||
93 | } | 109 | } |
94 | }) | 110 | }) |
95 | } | 111 | } |
112 | + collectInfoDetail(_id){ | ||
113 | + let that = this; | ||
114 | + let data = { | ||
115 | + studentId:ClassDataProxy.id, | ||
116 | + meetingId:_id, | ||
117 | + siteId:ClassDataProxy.siteId | ||
118 | + } | ||
119 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/isAppointment'; | ||
120 | + this.detailPage(_url,data,function(_data){ | ||
121 | + if(_data && _data.code == 200){ | ||
122 | + let _dataList = _data.returnData.data; | ||
123 | + if(_dataList && _dataList.length > 0 ){ | ||
124 | + loger.log('收藏',_data) | ||
125 | + that._collectNoClick(); | ||
126 | + }else{ | ||
127 | + loger.log('未收藏') | ||
128 | + that._collectYesClick(); | ||
129 | + } | ||
130 | + } | ||
131 | + }) | ||
132 | + } | ||
96 | teacherInfoDetail(_id){ | 133 | teacherInfoDetail(_id){ |
97 | let that = this; | 134 | let that = this; |
98 | let data = { | 135 | let data = { |
@@ -119,57 +156,66 @@ class ListDetailsApe extends Ape { | @@ -119,57 +156,66 @@ class ListDetailsApe extends Ape { | ||
119 | if(_data){ | 156 | if(_data){ |
120 | let teacherList = _data.users; | 157 | let teacherList = _data.users; |
121 | if(teacherList){ | 158 | if(teacherList){ |
122 | - loger.log('老师1111',teacherList) | ||
123 | this._lanclassRender(teacherList[0]); | 159 | this._lanclassRender(teacherList[0]); |
124 | } | 160 | } |
125 | } | 161 | } |
126 | } | 162 | } |
127 | //老师 | 163 | //老师 |
128 | _lanclassRender(_dataList){ | 164 | _lanclassRender(_dataList){ |
129 | - $('#defaultBox').hide(); | ||
130 | - $('.curriculumBox').hide(); | ||
131 | - $('#teacherDetailBox').show(); | ||
132 | - $('#teacherDetailBox').attr('data',this._id); | ||
133 | - let _img = _dataList.userPhoto; | ||
134 | - let defaultImg = 'images/u373.png' | ||
135 | - $('#teacherDetailInfoImg').attr('src',_img?_img:defaultImg);//老师授课标题图片 | ||
136 | - $('#teacherDetailInfoDetailName').text(_dataList.userName);//老师名字 | ||
137 | - $('#teacherDetailInfoDetailSex').text();//老师性别 | ||
138 | - $('#teacherDetailInfoDetailPoint').text();//老师专长 | ||
139 | - $('#teacherDetailInfoDetailAge').text(3+'年');//老师教龄 | ||
140 | - $('#teacherDetailInfoDetailGrade').text();//老师评分 | ||
141 | - $('#teacherDetailReferralContent').text();//老师授课内容 | ||
142 | - $('#teacherDetailPost').text();//老师职称 | ||
143 | - $('#teacherDetailEducation').text();//老师学历 | ||
144 | - $('#teacherDetailAcademy').text();//老师院校 | ||
145 | - $('#teacherDetailWay').text();//老师授课方式 | ||
146 | - $('#teacherDetailArea').text();//老师授课地区 | ||
147 | - $('#teacherDetailSynopsis').text();//老师授课简介 | 165 | + if(_dataList){ |
166 | + $('#defaultBox').hide(); | ||
167 | + $('.curriculumBox').hide(); | ||
168 | + $('#teacherDetailBox').show(); | ||
169 | + $('#teacherDetailBox').attr('data',this._id); | ||
170 | + let _img = _dataList.userPhoto; | ||
171 | + let defaultImg = 'images/u373.png' | ||
172 | + $('#teacherDetailInfoImg').attr('src',_img?_img:defaultImg);//老师授课标题图片 | ||
173 | + $('#teacherDetailInfoDetailName').text(_dataList.userName);//老师名字 | ||
174 | + $('#teacherDetailInfoDetailSex').text();//老师性别 | ||
175 | + $('#teacherDetailInfoDetailPoint').text();//老师专长 | ||
176 | + $('#teacherDetailInfoDetailAge').text(3+'年');//老师教龄 | ||
177 | + $('#teacherDetailInfoDetailGrade').text();//老师评分 | ||
178 | + $('#teacherDetailReferralContent').text();//老师授课内容 | ||
179 | + $('#teacherDetailPost').text();//老师职称 | ||
180 | + $('#teacherDetailEducation').text();//老师学历 | ||
181 | + $('#teacherDetailAcademy').text();//老师院校 | ||
182 | + $('#teacherDetailWay').text();//老师授课方式 | ||
183 | + $('#teacherDetailArea').text();//老师授课地区 | ||
184 | + $('#teacherDetailSynopsis').text();//老师授课简介 | ||
185 | + } | ||
148 | 186 | ||
149 | } | 187 | } |
150 | //课堂 | 188 | //课堂 |
151 | _liveRender(_dataList){ | 189 | _liveRender(_dataList){ |
152 | - $('#defaultBox').hide(); | ||
153 | - $('.curriculumBox').hide(); | ||
154 | - $('#lanclassBox').show(); | ||
155 | - $('#lanclassBox').attr('data',this._id); | ||
156 | - let _img = _dataList.meetingPhoto; | ||
157 | - let defaultImg = 'images/u373.png' | ||
158 | - $('#lanclassContentCover').attr('src',_img?_img:defaultImg);//老师授课标题图片 | ||
159 | - $('#lanclassContentTitle').text(_dataList.meetingName);//老师授课标题 | 190 | + if(_dataList){ |
191 | + $('#defaultBox').hide(); | ||
192 | + $('.curriculumBox').hide(); | ||
193 | + $('#lanclassBox').show(); | ||
194 | + $('#lanclassBox').attr('data',this._id); | ||
195 | + let _img = _dataList.meetingPhoto; | ||
196 | + let classImg; | ||
197 | + if(_img){ | ||
198 | + classImg = _img; | ||
199 | + }else { | ||
200 | + classImg = null; | ||
201 | + } | ||
202 | + let defaultImg = 'images/u373.png' | ||
203 | + $('#lanclassContentCover').attr('src',_img?_img:defaultImg);//老师授课标题图片 | ||
204 | + $('#lanclassContentTitle').text(_dataList.meetingName);//老师授课标题 | ||
160 | 205 | ||
161 | - let _teacherImg = _dataList.teacherPhoto; | ||
162 | - let teacherDefault = 'images/u293.png'; | ||
163 | - $('#lanclassContentInfoPortrait').attr('src',_teacherImg?_teacherImg:teacherDefault);//老师授课老师头像 | ||
164 | - $('#lanclassContentInfoName').text(_dataList.create_user);//老师授课老师名字 | ||
165 | - $('#teacherInfoName').text(_dataList.create_user);//老师授课老师名字 | ||
166 | - $('#lanclassContentInfoTimeStart').text(_dataList.beginTime);//老师授课开始时间 | ||
167 | - $('#lanclassContentInfoTimeEnd').text(_dataList.endTime);//老师授课结束时间 | ||
168 | - $('#collectYes');//老师授课是否收藏 | ||
169 | - $('#collectNo');//老师授课是否收藏 | ||
170 | - $('#lanclassIntroduceDescription').text();//老师授课课程介绍 | ||
171 | - $('#teacherInfoSchool').text();//老师学院 | ||
172 | - $('#teacherInfoContent').text();//老师专业等级信息 | 206 | + let _teacherImg = _dataList.teacherPhoto; |
207 | + let teacherDefault = 'images/u293.png'; | ||
208 | + $('#lanclassContentInfoPortrait').attr('src',_teacherImg?_teacherImg:teacherDefault);//老师授课老师头像 | ||
209 | + $('#lanclassContentInfoName').text(_dataList.create_user);//老师授课老师名字 | ||
210 | + $('#teacherInfoName').text(_dataList.create_user);//老师授课老师名字 | ||
211 | + $('#lanclassContentInfoTimeStart').text(_dataList.beginTime);//老师授课开始时间 | ||
212 | + $('#lanclassContentInfoTimeEnd').text(_dataList.endTime);//老师授课结束时间 | ||
213 | + $('#collectYes');//老师授课是否收藏 | ||
214 | + $('#collectNo');//老师授课是否收藏 | ||
215 | + $('#lanclassIntroduceDescription').text();//老师授课课程介绍 | ||
216 | + $('#teacherInfoSchool').text();//老师学院 | ||
217 | + $('#teacherInfoContent').text();//老师专业等级信息 | ||
218 | + } | ||
173 | } | 219 | } |
174 | 220 | ||
175 | detailPage(url,data,callback){ | 221 | detailPage(url,data,callback){ |
@@ -200,5 +246,13 @@ class ListDetailsApe extends Ape { | @@ -200,5 +246,13 @@ class ListDetailsApe extends Ape { | ||
200 | } | 246 | } |
201 | }) | 247 | }) |
202 | } | 248 | } |
249 | + _collectYesClick(){ | ||
250 | + $('#collectYes ').hide(); | ||
251 | + $('#collectNo ').show(); | ||
252 | + } | ||
253 | + _collectNoClick(){ | ||
254 | + $('#collectYes ').show(); | ||
255 | + $('#collectNo ').hide(); | ||
256 | + } | ||
203 | } | 257 | } |
204 | export default ListDetailsApe; | 258 | export default ListDetailsApe; |
@@ -64,10 +64,23 @@ class LoginOrRegister extends Ape { | @@ -64,10 +64,23 @@ class LoginOrRegister extends Ape { | ||
64 | //关闭注册界面 | 64 | //关闭注册界面 |
65 | _usersignAHandler(){ | 65 | _usersignAHandler(){ |
66 | $('#userSignBox').hide(); | 66 | $('#userSignBox').hide(); |
67 | + this._clearSignData(); | ||
68 | + } | ||
69 | + _clearSignData(){ | ||
70 | + $('#signName').val(''); | ||
71 | + $('#signPhone').val(''); | ||
72 | + $('#signMail').val(''); | ||
73 | + $('#signPassWord').val(''); | ||
74 | + $('#securityCode').val(''); | ||
75 | + } | ||
76 | + _clearLoginData(){ | ||
77 | + $('#loginName').val(''); | ||
78 | + $('#loginPassWord').val(''); | ||
67 | } | 79 | } |
68 | //关闭登录界面 | 80 | //关闭登录界面 |
69 | _userLoginAHandler(){ | 81 | _userLoginAHandler(){ |
70 | $('#userLoginBox').hide(); | 82 | $('#userLoginBox').hide(); |
83 | + this._clearLoginData(); | ||
71 | } | 84 | } |
72 | //注册跳转登录界面 | 85 | //注册跳转登录界面 |
73 | _skipLoginBtnHandler(){ | 86 | _skipLoginBtnHandler(){ |
@@ -75,6 +88,7 @@ class LoginOrRegister extends Ape { | @@ -75,6 +88,7 @@ class LoginOrRegister extends Ape { | ||
75 | $('#userSignBox').hide(); | 88 | $('#userSignBox').hide(); |
76 | $('#userLoginBox').show(); | 89 | $('#userLoginBox').show(); |
77 | $('#loginName').focus(); | 90 | $('#loginName').focus(); |
91 | + this._clearSignData(); | ||
78 | } | 92 | } |
79 | //新用户注册 | 93 | //新用户注册 |
80 | _nowUserSignHandler(){ | 94 | _nowUserSignHandler(){ |
@@ -82,6 +96,7 @@ class LoginOrRegister extends Ape { | @@ -82,6 +96,7 @@ class LoginOrRegister extends Ape { | ||
82 | $('#userLoginBox').hide(); | 96 | $('#userLoginBox').hide(); |
83 | $('#userSignBox').show(); | 97 | $('#userSignBox').show(); |
84 | $('#signName').focus(); | 98 | $('#signName').focus(); |
99 | + this._clearLoginData(); | ||
85 | } | 100 | } |
86 | //首页用户登录 | 101 | //首页用户登录 |
87 | _homeUserLoginBtnHandler(){ | 102 | _homeUserLoginBtnHandler(){ |
@@ -142,6 +157,11 @@ class LoginOrRegister extends Ape { | @@ -142,6 +157,11 @@ class LoginOrRegister extends Ape { | ||
142 | ErrorApe.showWarnError('用户名不能为空'); | 157 | ErrorApe.showWarnError('用户名不能为空'); |
143 | _name.focus(); | 158 | _name.focus(); |
144 | return false; | 159 | return false; |
160 | + }else if(_name.value.length >12 || _name.value.length <6){ | ||
161 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
162 | + ErrorApe.showWarnError('请输入4位以上字符'); | ||
163 | + _name.focus(); | ||
164 | + return false; | ||
145 | } | 165 | } |
146 | } | 166 | } |
147 | _signPhone(phone){ | 167 | _signPhone(phone){ |
@@ -158,6 +178,8 @@ class LoginOrRegister extends Ape { | @@ -158,6 +178,8 @@ class LoginOrRegister extends Ape { | ||
158 | } else { | 178 | } else { |
159 | $('#signPhone').val('手机号输入不合法') | 179 | $('#signPhone').val('手机号输入不合法') |
160 | .css('color','#d95136'); | 180 | .css('color','#d95136'); |
181 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
182 | + ErrorApe.showWarnError('手机号输入不合法'); | ||
161 | phone.focus(); | 183 | phone.focus(); |
162 | return false; | 184 | return false; |
163 | } | 185 | } |
@@ -176,27 +198,31 @@ class LoginOrRegister extends Ape { | @@ -176,27 +198,31 @@ class LoginOrRegister extends Ape { | ||
176 | else { | 198 | else { |
177 | $('#signMail').val('电子邮箱输入不合法') | 199 | $('#signMail').val('电子邮箱输入不合法') |
178 | .css('color','#d95136'); | 200 | .css('color','#d95136'); |
201 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
202 | + ErrorApe.showWarnError('电子邮箱输入不合法'); | ||
179 | mail.focus(); | 203 | mail.focus(); |
180 | return false; | 204 | return false; |
181 | } | 205 | } |
182 | } | 206 | } |
183 | //判断密码 | 207 | //判断密码 |
184 | _signPassWord(_passWord){ | 208 | _signPassWord(_passWord){ |
185 | - let reg = /^[0-9a-zA-Z]{8,12}$/;//密码正则 | 209 | + let reg = /^[0-9a-zA-Z]{6,12}$/;//密码正则 |
186 | if(_passWord.value == ''){ | 210 | if(_passWord.value == ''){ |
187 | _passWord.focus(); | 211 | _passWord.focus(); |
188 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | 212 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); |
189 | ErrorApe.showWarnError('密码不能为空'); | 213 | ErrorApe.showWarnError('密码不能为空'); |
190 | return false; | 214 | return false; |
191 | - } | ||
192 | - if(reg.test(_passWord.value)){ | ||
193 | - $('#signPassWord').css('color','#000'); | ||
194 | - }else{ | 215 | + }else if(_passWord.value.length >12 || _passWord.value.length <6){ |
195 | $('#signPassWord').val('密码长度不够或太长') | 216 | $('#signPassWord').val('密码长度不够或太长') |
196 | .css('color','#d95136'); | 217 | .css('color','#d95136'); |
218 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
219 | + ErrorApe.showWarnError('请输入6-12位密码'); | ||
197 | _passWord.focus(); | 220 | _passWord.focus(); |
198 | return false; | 221 | return false; |
199 | } | 222 | } |
223 | + if(reg.test(_passWord.value)){ | ||
224 | + $('#signPassWord').css('color','#000'); | ||
225 | + } | ||
200 | } | 226 | } |
201 | //判断验证码 | 227 | //判断验证码 |
202 | _securityCode(securityCode){ | 228 | _securityCode(securityCode){ |
@@ -212,6 +238,8 @@ class LoginOrRegister extends Ape { | @@ -212,6 +238,8 @@ class LoginOrRegister extends Ape { | ||
212 | }else{ | 238 | }else{ |
213 | $('#securityCode').val('验证码不正确') | 239 | $('#securityCode').val('验证码不正确') |
214 | .css('color','#d95136'); | 240 | .css('color','#d95136'); |
241 | + ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | ||
242 | + ErrorApe.showWarnError('验证码不正确'); | ||
215 | securityCode.focus(); | 243 | securityCode.focus(); |
216 | return false; | 244 | return false; |
217 | } | 245 | } |
@@ -257,6 +285,7 @@ class LoginOrRegister extends Ape { | @@ -257,6 +285,7 @@ class LoginOrRegister extends Ape { | ||
257 | }else{ | 285 | }else{ |
258 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | 286 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); |
259 | ErrorApe.showWarnError(_data.returnData.data.msg); | 287 | ErrorApe.showWarnError(_data.returnData.data.msg); |
288 | + loger.log('注册失败',_data) | ||
260 | // alert(_data.returnData.data.msg) | 289 | // alert(_data.returnData.data.msg) |
261 | } | 290 | } |
262 | }, | 291 | }, |
@@ -350,8 +379,9 @@ class LoginOrRegister extends Ape { | @@ -350,8 +379,9 @@ class LoginOrRegister extends Ape { | ||
350 | that.updateChangeUser(_data); | 379 | that.updateChangeUser(_data); |
351 | 380 | ||
352 | }else{ | 381 | }else{ |
382 | + loger.log('登录错误',_data) | ||
353 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); | 383 | ClassDataProxy.getMarginTopHandler($('#warnHintBox')); |
354 | - ErrorApe.showWarnError(_data.returnData.data.msg); | 384 | + ErrorApe.showWarnError('登录错误'); |
355 | // alert(_data.returnData.data.msg) | 385 | // alert(_data.returnData.data.msg) |
356 | } | 386 | } |
357 | }, | 387 | }, |
@@ -402,9 +432,13 @@ class LoginOrRegister extends Ape { | @@ -402,9 +432,13 @@ class LoginOrRegister extends Ape { | ||
402 | let setPassWord = $('#setPassWord');//密码 | 432 | let setPassWord = $('#setPassWord');//密码 |
403 | let setMail = $('#setMail');//邮箱 | 433 | let setMail = $('#setMail');//邮箱 |
404 | let setPhone = $('#setPhone');//手机号 | 434 | let setPhone = $('#setPhone');//手机号 |
405 | - | ||
406 | - myCenterImg.attr('src',_dataList.userPhoto) | ||
407 | - personagePortrait.attr('src',_dataList.userPhoto) | 435 | + if(_dataList.userPhoto){ |
436 | + myCenterImg.attr('src',_dataList.userPhoto) | ||
437 | + personagePortrait.attr('src',_dataList.userPhoto) | ||
438 | + }else{ | ||
439 | + myCenterImg.attr('src','../images/u373.png') | ||
440 | + personagePortrait.attr('src','../images/u373.png') | ||
441 | + } | ||
408 | oneselfInfoLoginName.val(_dataList.loginName); | 442 | oneselfInfoLoginName.val(_dataList.loginName); |
409 | oneselfInfoUserName.val(_dataList.userName); | 443 | oneselfInfoUserName.val(_dataList.userName); |
410 | 444 |
@@ -45,30 +45,18 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor= | @@ -45,30 +45,18 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor= | ||
45 | <td width="18%" class="tr_main">{_time}</td> | 45 | <td width="18%" class="tr_main">{_time}</td> |
46 | <td width="6%" class="tr_main">{_onlineLen}</td> | 46 | <td width="6%" class="tr_main">{_onlineLen}</td> |
47 | <td width="21%" class="tr_main tr_mainRight" align="center" data="{_esenglish}"> | 47 | <td width="21%" class="tr_main tr_mainRight" align="center" data="{_esenglish}"> |
48 | - <a id="{_DocInd}" class="classHandlePort" href="###">文档</a> | ||
49 | - <a id="{_mediaInd}" class="classHandlePort" href="###">多媒体</a> | ||
50 | - <a id="{_musicInd}" class="classHandlePort" href="###">伴音</a> | 48 | + <a id="{_DocInd}" class="classHandlePort" href="###">课件</a> |
51 | <a id="{_updateInd}" class="classHandlePort" href="###">修改</a> | 49 | <a id="{_updateInd}" class="classHandlePort" href="###">修改</a> |
52 | <a data="{_removeInd}" class="classHandlePort deleteClass" href="#">删除</a> | 50 | <a data="{_removeInd}" class="classHandlePort deleteClass" href="#">删除</a> |
53 | <a data="{_joinInd}" class="classHandlePort joinClass" href="#">加入课堂</a> | 51 | <a data="{_joinInd}" class="classHandlePort joinClass" href="#">加入课堂</a> |
54 | - <a data="{_removeInd}" class="classHandlePort updatacover" href="###">上传封面 | ||
55 | - <!--<input type="file" id="{_updatacover}" class="updatacoverFile"/>--> | ||
56 | - </a> | 52 | + <a data="{_removeInd}" class="classHandlePort updatacover" value="{_value}" href="javascript:void(0);">上传封面</a> |
53 | + <a data="{_removeInd}" class="classHandlePort generalize" value="{_value}" href="javascript:void(0);">推广</a> | ||
54 | + | ||
57 | </td> | 55 | </td> |
58 | </tr> | 56 | </tr> |
59 | `; | 57 | `; |
60 | const adminListEnd = `</tbody></table>`; | 58 | const adminListEnd = `</tbody></table>`; |
61 | 59 | ||
62 | -const form = ` | ||
63 | - <form action="{_action}" method="post" enctype="multipart/form-data"> | ||
64 | - <input class="updataPhotoInput" id="updataPhotoInput" type="file" name="file"/> | ||
65 | - <div class="updataPhotoImg" id="updataPhotoImg"> | ||
66 | - | ||
67 | - </div> | ||
68 | - <div class="updataPhotoInfo" id="updataPhotoInfo"></div> | ||
69 | - <input class="addUserBtn updataPhotoBtn" id="updataPhotoBtn" type="submit" value="上传"/> | ||
70 | - </form> | ||
71 | -` | ||
72 | class ManagementHomePageApe extends Ape { | 60 | class ManagementHomePageApe extends Ape { |
73 | constructor() { | 61 | constructor() { |
74 | super(); | 62 | super(); |
@@ -93,11 +81,11 @@ class ManagementHomePageApe extends Ape { | @@ -93,11 +81,11 @@ class ManagementHomePageApe extends Ape { | ||
93 | $('#courseContent0').on('click','.joinClass',this._joinClass.bind(this));//加入课堂 | 81 | $('#courseContent0').on('click','.joinClass',this._joinClass.bind(this));//加入课堂 |
94 | 82 | ||
95 | $('#courseContent0').on('click','.updatacover',this._updatacover.bind(this));//上传课堂封面 | 83 | $('#courseContent0').on('click','.updatacover',this._updatacover.bind(this));//上传课堂封面 |
96 | - $('#updataPhotoA').on('click',this._closeUpdatacover.bind(this));//上传课堂封面 取消 | ||
97 | - | ||
98 | - $('#updataPhotoInput').on('change',this._updataPhotoBtnHandler.bind(this));//上传课堂封面 取消 | 84 | + $('#courseContent0').on('click','.generalize',this._generalize.bind(this));//上传课堂封面 推广 |
99 | 85 | ||
100 | - $('#updataPhotoBtn').on('click',this._submitBtnHandler.bind(this));//上传课堂封面 | 86 | + $('#updataPhotoA').on('click',this._closeUpdatacover.bind(this));//上传课堂封面 取消 |
87 | + $('#updataPhotoInput').on('change',this._updataPhotoBtnHandler.bind(this));//上传课堂封面 | ||
88 | + $('#updataPhotoBtn').on('click',this._submitBtnHandler.bind(this));//上传课堂封面 上传按钮 | ||
101 | 89 | ||
102 | } | 90 | } |
103 | 91 | ||
@@ -196,6 +184,7 @@ class ManagementHomePageApe extends Ape { | @@ -196,6 +184,7 @@ class ManagementHomePageApe extends Ape { | ||
196 | _updateInd : 'classUpdate'+i, | 184 | _updateInd : 'classUpdate'+i, |
197 | _updatacover : 'updatacover'+i, | 185 | _updatacover : 'updatacover'+i, |
198 | _removeInd : _dataList[i].id, | 186 | _removeInd : _dataList[i].id, |
187 | + _value : _dataList[i].meetingPhoto ? _dataList[i].meetingPhoto : '', | ||
199 | _joinInd : _dataList[i].meetingNumber | 188 | _joinInd : _dataList[i].meetingNumber |
200 | }) | 189 | }) |
201 | courseContent.append(_adminList); | 190 | courseContent.append(_adminList); |
@@ -240,14 +229,36 @@ class ManagementHomePageApe extends Ape { | @@ -240,14 +229,36 @@ class ManagementHomePageApe extends Ape { | ||
240 | } | 229 | } |
241 | _updatacover(evt){ | 230 | _updatacover(evt){ |
242 | ClassDataProxy.getMarginTopHandler($('#updataPhoto')); | 231 | ClassDataProxy.getMarginTopHandler($('#updataPhoto')); |
232 | + $('#updataPhotoBox').attr('data',1);//上传图片 | ||
233 | + $('#updataPhotoBox').show(); | ||
234 | + $('#updataPhotoImg').css({ | ||
235 | + 'width':'120px', | ||
236 | + "margin-left":'80px' | ||
237 | + }) | ||
238 | + let _data = $(evt.target).attr('data'); | ||
239 | + this.dataId = _data; | ||
240 | + | ||
241 | + let _value = $(evt.target).attr('value'); | ||
242 | + $("#updataPhotoImg").attr('src',_value) | ||
243 | + } | ||
244 | + _generalize(evt){ | ||
245 | + ClassDataProxy.getMarginTopHandler($('#updataPhoto')); | ||
243 | $('#updataPhotoBox').show(); | 246 | $('#updataPhotoBox').show(); |
247 | + $('#updataPhotoImg').css({ | ||
248 | + 'width':'230px', | ||
249 | + "margin-left":'20px' | ||
250 | + }) | ||
251 | + $('#updataPhotoBox').attr('data',2);//上传推广图片 | ||
244 | let _data = $(evt.target).attr('data'); | 252 | let _data = $(evt.target).attr('data'); |
245 | this.dataId = _data; | 253 | this.dataId = _data; |
254 | + | ||
255 | + let _value = $(evt.target).attr('value'); | ||
256 | + $("#updataPhotoImg").attr('src',_value) | ||
246 | } | 257 | } |
247 | _closeUpdatacover(){ | 258 | _closeUpdatacover(){ |
248 | $('#updataPhotoBox').hide(); | 259 | $('#updataPhotoBox').hide(); |
249 | $("#updataPhotoInput").val(''); | 260 | $("#updataPhotoInput").val(''); |
250 | - $("#updataPhotoImg")[0].style.backgroundImage = ''; | 261 | + $("#updataPhotoImg").attr('src','') |
251 | } | 262 | } |
252 | _updataPhotoBtnHandler() { | 263 | _updataPhotoBtnHandler() { |
253 | let fileInput = document.getElementById('updataPhotoInput'); | 264 | let fileInput = document.getElementById('updataPhotoInput'); |
@@ -273,7 +284,7 @@ class ManagementHomePageApe extends Ape { | @@ -273,7 +284,7 @@ class ManagementHomePageApe extends Ape { | ||
273 | let reader = new FileReader(); | 284 | let reader = new FileReader(); |
274 | reader.onload = function(e){ | 285 | reader.onload = function(e){ |
275 | let data = e.target.result; | 286 | let data = e.target.result; |
276 | - preview.style.backgroundImage = 'url(' + data + ')'; | 287 | + $(preview).attr('src',data ) |
277 | } | 288 | } |
278 | reader.readAsDataURL(file); | 289 | reader.readAsDataURL(file); |
279 | 290 | ||
@@ -281,8 +292,10 @@ class ManagementHomePageApe extends Ape { | @@ -281,8 +292,10 @@ class ManagementHomePageApe extends Ape { | ||
281 | this.files = data; | 292 | this.files = data; |
282 | } | 293 | } |
283 | _submitBtnHandler(){ | 294 | _submitBtnHandler(){ |
295 | + let genre = $('#updataPhotoBox').attr('data'); | ||
296 | + loger.log('上传类型',genre) | ||
284 | let _dataId = this.dataId; | 297 | let _dataId = this.dataId; |
285 | - let _url = 'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='+_dataId+'&category=1' | 298 | + let _url = 'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='+_dataId+'&category='+parseInt(genre)+'&siteId='+ClassDataProxy.siteId; |
286 | let files = this.files; | 299 | let files = this.files; |
287 | let that = this; | 300 | let that = this; |
288 | 301 |
@@ -13,7 +13,7 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | @@ -13,7 +13,7 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | ||
13 | <span class="courseMinuteListTime">{_liveTimer}</span> | 13 | <span class="courseMinuteListTime">{_liveTimer}</span> |
14 | <span class="courseMinuteListWire"></span> | 14 | <span class="courseMinuteListWire"></span> |
15 | </div> | 15 | </div> |
16 | - <div class="classifyListMyCenter {_classifyListR}"> | 16 | + <div class="classifyListMyCenter {_classifyListR}" data="{_id}"> |
17 | <div class="myCenterContentMask accessLearningBtn"> | 17 | <div class="myCenterContentMask accessLearningBtn"> |
18 | <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">进入学习</button> | 18 | <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">进入学习</button> |
19 | </div> | 19 | </div> |
@@ -55,6 +55,7 @@ class MyBookingsApe extends Ape { | @@ -55,6 +55,7 @@ class MyBookingsApe extends Ape { | ||
55 | this.presentInd = 1;//点击翻页默认为第一页 | 55 | this.presentInd = 1;//点击翻页默认为第一页 |
56 | this.pageNo = 0; | 56 | this.pageNo = 0; |
57 | this.orderId = 0; | 57 | this.orderId = 0; |
58 | + this.collectId = 0; | ||
58 | this.addEvent(); | 59 | this.addEvent(); |
59 | this.init(); | 60 | this.init(); |
60 | } | 61 | } |
@@ -145,7 +146,9 @@ class MyBookingsApe extends Ape { | @@ -145,7 +146,9 @@ class MyBookingsApe extends Ape { | ||
145 | let data = $('#subscribeList').find('.liveInfoLeftLiCheck').attr('data'); | 146 | let data = $('#subscribeList').find('.liveInfoLeftLiCheck').attr('data'); |
146 | if(parseInt(data) == 1){ | 147 | if(parseInt(data) == 1){ |
147 | this._studentCurriculumInfo(32,ind,function(_data){ | 148 | this._studentCurriculumInfo(32,ind,function(_data){ |
148 | - that._studentSubscribeTeacher(_data.returnData.data) | 149 | + if(_data){ |
150 | + that._studentSubscribeTeacher(_data.returnData.data) | ||
151 | + } | ||
149 | }) | 152 | }) |
150 | }else{ | 153 | }else{ |
151 | this._studentCurriculumInfo(12,ind,function(_data){ | 154 | this._studentCurriculumInfo(12,ind,function(_data){ |
@@ -174,6 +177,7 @@ class MyBookingsApe extends Ape { | @@ -174,6 +177,7 @@ class MyBookingsApe extends Ape { | ||
174 | let _classifyList = this._format(classifyList,{ | 177 | let _classifyList = this._format(classifyList,{ |
175 | _classifyListR : j?'classifyListR':'', | 178 | _classifyListR : j?'classifyListR':'', |
176 | _isShowTitle : 'none', | 179 | _isShowTitle : 'none', |
180 | + _id:_data[i].meetingId, | ||
177 | _meetingNumber : _data[i].meetingNumber, | 181 | _meetingNumber : _data[i].meetingNumber, |
178 | _msgImg : '../images/u373.png', | 182 | _msgImg : '../images/u373.png', |
179 | _meetingName : _data[i].meeting_name, | 183 | _meetingName : _data[i].meeting_name, |
@@ -234,12 +238,18 @@ class MyBookingsApe extends Ape { | @@ -234,12 +238,18 @@ class MyBookingsApe extends Ape { | ||
234 | ClassDataProxy.getMarginTopHandler($('#removeHandler')); | 238 | ClassDataProxy.getMarginTopHandler($('#removeHandler')); |
235 | $("#removeHandlerBox").show(); | 239 | $("#removeHandlerBox").show(); |
236 | $('#removeHandlerContent').html('确定要取消预约吗?'); | 240 | $('#removeHandlerContent').html('确定要取消预约吗?'); |
241 | + $('#removeConfirm').attr('data',1); | ||
237 | } | 242 | } |
238 | _removeCancelHandler(){ | 243 | _removeCancelHandler(){ |
239 | this._hideRemoveBox(); | 244 | this._hideRemoveBox(); |
240 | } | 245 | } |
241 | - _removeConfirmHandler(){ | ||
242 | - this._cancelSubscribeHandler(this.orderId); | 246 | + _removeConfirmHandler(evt){ |
247 | + let ind = $(evt.target).attr('data') | ||
248 | + if(parseInt(ind) == 7){ | ||
249 | + this.classCancelCollect(this.collectId); | ||
250 | + }else if(parseInt(ind) == 1){ | ||
251 | + this._cancelSubscribeHandler(this.orderId); | ||
252 | + } | ||
243 | this._hideRemoveBox(); | 253 | this._hideRemoveBox(); |
244 | } | 254 | } |
245 | _hideRemoveBox(){ | 255 | _hideRemoveBox(){ |
@@ -334,14 +344,52 @@ class MyBookingsApe extends Ape { | @@ -334,14 +344,52 @@ class MyBookingsApe extends Ape { | ||
334 | $(evt.currentTarget).find('.accessLearningBtn').hide(); | 344 | $(evt.currentTarget).find('.accessLearningBtn').hide(); |
335 | } | 345 | } |
336 | _enterClassRoomHandler(evt){ | 346 | _enterClassRoomHandler(evt){ |
337 | - let ind = $(evt.target).attr('data'); | ||
338 | - window.open('http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber=' + ind); | 347 | + let val = $(evt.currentTarget).find('.myCenterContentMaskBtn').attr('value'); |
348 | + let _id = $(evt.currentTarget).parents('.classifyListMyCenter').attr('data'); | ||
349 | + this.collectId = _id; | ||
350 | + if(val == '取消收藏'){ | ||
351 | + this.showcancelBox(); | ||
352 | + }else{ | ||
353 | + let ind = $(evt.target).attr('data'); | ||
354 | + window.open('http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber=' + ind); | ||
355 | + } | ||
356 | + } | ||
357 | + showcancelBox(_id){ | ||
358 | + ClassDataProxy.getMarginTopHandler($('#removeHandler')); | ||
359 | + $("#removeHandlerBox").show(); | ||
360 | + $('#removeHandlerContent').html('确定要取消收藏吗?'); | ||
361 | + $('#removeConfirm').attr('data',7) | ||
362 | + } | ||
363 | + //课堂取消收藏 | ||
364 | + classCancelCollect(_id){ | ||
365 | + let that = this; | ||
366 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/delStudentMeetingBySite/'+_id+'/'+ClassDataProxy.siteId; | ||
367 | + $.ajax({ | ||
368 | + type: "delete", | ||
369 | + url: _url, | ||
370 | + timeout:5000, | ||
371 | + headers: { | ||
372 | + siteId:ClassDataProxy.siteId, | ||
373 | + 'token':ClassDataProxy.token | ||
374 | + }, | ||
375 | + data:{siteId:ClassDataProxy.siteId,id:ClassDataProxy.id}, | ||
376 | + success:function(_data){ | ||
377 | + //获取课堂数据 | ||
378 | + if(_data && _data.code == 200){ | ||
379 | + console.log(_data,'课堂取消收藏成功') | ||
380 | + this._emit(MessageTypes.COLLECT_BREAK); | ||
381 | + } | ||
382 | + }, | ||
383 | + error:function(error){ | ||
384 | + console.log(error,'课堂取消收藏失败') | ||
385 | + } | ||
386 | + }) | ||
339 | } | 387 | } |
340 | _studentCurriculumInfo(num,ind,callback){ | 388 | _studentCurriculumInfo(num,ind,callback){ |
341 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; | 389 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; |
342 | let that = this; | 390 | let that = this; |
343 | $.ajax({ | 391 | $.ajax({ |
344 | - type: "GET", | 392 | + type: "POST", |
345 | url: _url, | 393 | url: _url, |
346 | timeout:5000, | 394 | timeout:5000, |
347 | headers: {siteId:ClassDataProxy.siteId,pageno:num,page:ind,id:ClassDataProxy.id, | 395 | headers: {siteId:ClassDataProxy.siteId,pageno:num,page:ind,id:ClassDataProxy.id, |
@@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | @@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | ||
13 | <span class="courseMinuteListTime">{_liveTimer}</span> | 13 | <span class="courseMinuteListTime">{_liveTimer}</span> |
14 | <span class="courseMinuteListWire"></span> | 14 | <span class="courseMinuteListWire"></span> |
15 | </div> | 15 | </div> |
16 | - <div class="classifyListMyCenter {_classifyListR}"> | 16 | + <div class="classifyListMyCenter {_classifyListR}" data="{_id}"> |
17 | <div class="myCenterContentMask accessLearningBtn"> | 17 | <div class="myCenterContentMask accessLearningBtn"> |
18 | - <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">{_studyMsg}</button> | 18 | + <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}" value="{_studyMsg}">{_studyMsg}</button> |
19 | </div> | 19 | </div> |
20 | <div class="myCenterContentMask cancelReservation"> | 20 | <div class="myCenterContentMask cancelReservation"> |
21 | <button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button> | 21 | <button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button> |
@@ -108,6 +108,11 @@ class MyCenterApe extends Ape { | @@ -108,6 +108,11 @@ class MyCenterApe extends Ape { | ||
108 | 108 | ||
109 | addEvent() { | 109 | addEvent() { |
110 | } | 110 | } |
111 | + defaultDateList(){ | ||
112 | + let studentInfoList = $('#studentInfoList'); | ||
113 | + this._anewLoad(studentInfoList)//默认显示第一个列表 | ||
114 | + this._studentStudyModule(); | ||
115 | + } | ||
111 | //首页 | 116 | //首页 |
112 | _homePageHandler(){ | 117 | _homePageHandler(){ |
113 | this.presentInd = 1; | 118 | this.presentInd = 1; |
@@ -207,6 +212,7 @@ class MyCenterApe extends Ape { | @@ -207,6 +212,7 @@ class MyCenterApe extends Ape { | ||
207 | } | 212 | } |
208 | detailpage(){ | 213 | detailpage(){ |
209 | this._showStatus(); | 214 | this._showStatus(); |
215 | + this.defaultDateList(); | ||
210 | } | 216 | } |
211 | //首页 | 217 | //首页 |
212 | _homePageHandler(){ | 218 | _homePageHandler(){ |
@@ -357,13 +363,14 @@ class MyCenterApe extends Ape { | @@ -357,13 +363,14 @@ class MyCenterApe extends Ape { | ||
357 | } | 363 | } |
358 | }) | 364 | }) |
359 | } | 365 | } |
360 | - _studentCurriculumInfo(num,callback){ | 366 | + _studentCurriculumInfo(num,_data,callback){ |
361 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; | 367 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; |
362 | let that = this; | 368 | let that = this; |
363 | $.ajax({ | 369 | $.ajax({ |
364 | - type: "GET", | 370 | + type: "POST", |
365 | url: _url, | 371 | url: _url, |
366 | timeout:5000, | 372 | timeout:5000, |
373 | + data:_data, | ||
367 | headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id, | 374 | headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id, |
368 | 'token':ClassDataProxy.token}, | 375 | 'token':ClassDataProxy.token}, |
369 | success:function(_data){ | 376 | success:function(_data){ |
@@ -396,28 +403,30 @@ class MyCenterApe extends Ape { | @@ -396,28 +403,30 @@ class MyCenterApe extends Ape { | ||
396 | this.teacherListSwitch(); | 403 | this.teacherListSwitch(); |
397 | } | 404 | } |
398 | detailPageStudent(){ | 405 | detailPageStudent(){ |
399 | - this._studentCourseModule(); | ||
400 | //首页课程 | 406 | //首页课程 |
401 | let ind = $('#studentInfoList .liveInfoLeftLiCheck').attr('data'); | 407 | let ind = $('#studentInfoList .liveInfoLeftLiCheck').attr('data'); |
402 | - let studentMyCenterContentList = $('#studentMyCenterContentList'); | 408 | + this._studentStudyModule(); |
403 | switch (parseInt(ind)){ | 409 | switch (parseInt(ind)){ |
404 | case 0: | 410 | case 0: |
405 | //待学习 | 411 | //待学习 |
406 | - this._studentStudyModule(studentMyCenterContentList); | 412 | + this._studentStudyModule(); |
407 | break; | 413 | break; |
408 | case 1: | 414 | case 1: |
409 | //已学完 | 415 | //已学完 |
410 | - this._studentStudyOverModule(studentMyCenterContentList); | 416 | + this._studentStudyOverModule(); |
411 | break; | 417 | break; |
412 | case 2: | 418 | case 2: |
413 | //收藏 | 419 | //收藏 |
414 | - this._studenTcollectModule(studentMyCenterContentList); | 420 | + this._studenTcollectModule(); |
415 | break; | 421 | break; |
416 | default: | 422 | default: |
417 | return; | 423 | return; |
418 | } | 424 | } |
419 | 425 | ||
420 | } | 426 | } |
427 | + _anewLoad(ele){ | ||
428 | + ele.find('.liveInfoLeftLi').eq(0).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck') | ||
429 | + } | ||
421 | _showStatus(){ | 430 | _showStatus(){ |
422 | let newDate = new Date(); | 431 | let newDate = new Date(); |
423 | let newHours = newDate.getHours(); | 432 | let newHours = newDate.getHours(); |
@@ -447,8 +456,13 @@ class MyCenterApe extends Ape { | @@ -447,8 +456,13 @@ class MyCenterApe extends Ape { | ||
447 | 456 | ||
448 | $('#lanclassBox').hide(); | 457 | $('#lanclassBox').hide(); |
449 | loger.log('显示头像数据',ClassDataProxy.userPhoto) | 458 | loger.log('显示头像数据',ClassDataProxy.userPhoto) |
450 | - $('#myCenterImg').attr('src',ClassDataProxy.userPhoto);//个人信息首页 | ||
451 | - $('#personagePortrait').attr('src',ClassDataProxy.userPhoto);//个人信息 | 459 | + if(ClassDataProxy.userPhoto == null || ClassDataProxy.userPhoto == ''){ |
460 | + $('#myCenterImg').attr('src',ClassDataProxy.userPhoto)//个人信息首页 | ||
461 | + $('#personagePortrait').attr('src',ClassDataProxy.userPhoto)//个人信息 | ||
462 | + }else{ | ||
463 | + $('#myCenterImg').attr('src','../images/u373.png')//个人信息首页 | ||
464 | + $('#personagePortrait').attr('src','../images/u373.png')//个人信息 | ||
465 | + } | ||
452 | $('#oneselfInfoLoginName').val( ClassDataProxy.loginName);//登录名 | 466 | $('#oneselfInfoLoginName').val( ClassDataProxy.loginName);//登录名 |
453 | $('#oneselfInfoUserName').val(ClassDataProxy.monicker);//用户名 | 467 | $('#oneselfInfoUserName').val(ClassDataProxy.monicker);//用户名 |
454 | let setMail = $('#setMail');//邮箱 | 468 | let setMail = $('#setMail');//邮箱 |
@@ -621,8 +635,11 @@ class MyCenterApe extends Ape { | @@ -621,8 +635,11 @@ class MyCenterApe extends Ape { | ||
621 | //学生端首页課程显示 | 635 | //学生端首页課程显示 |
622 | _studentCourseModule(){ | 636 | _studentCourseModule(){ |
623 | let that = this; | 637 | let that = this; |
624 | - this._studentCurriculumInfo(3,function(_data){ | ||
625 | - that.studentCourseList(_data.returnData.data); | 638 | + let data = {siteId:ClassDataProxy.siteId}; |
639 | + this._studentCurriculumInfo(3,data,function(_data){ | ||
640 | + if(_data){ | ||
641 | + that.studentCourseList(_data.returnData.data); | ||
642 | + } | ||
626 | }) | 643 | }) |
627 | } | 644 | } |
628 | studentCourseList(_data){ | 645 | studentCourseList(_data){ |
@@ -653,9 +670,11 @@ class MyCenterApe extends Ape { | @@ -653,9 +670,11 @@ class MyCenterApe extends Ape { | ||
653 | } | 670 | } |
654 | } | 671 | } |
655 | //学生端首页学习数据 | 672 | //学生端首页学习数据 |
656 | - _studentStudyModule(studentMyCenterContentList){ | 673 | + _studentStudyModule(){ |
674 | + let studentMyCenterContentList = $('#studentMyCenterContentList'); | ||
657 | let that = this; | 675 | let that = this; |
658 | - this._studentCurriculumInfo(4,function(_data){ | 676 | + let data = {siteId:ClassDataProxy.siteId}; |
677 | + this._studentCurriculumInfo(4,data,function(_data){ | ||
659 | if(_data){ | 678 | if(_data){ |
660 | that.studentStudyList(studentMyCenterContentList,_data.returnData.data); | 679 | that.studentStudyList(studentMyCenterContentList,_data.returnData.data); |
661 | } | 680 | } |
@@ -670,12 +689,15 @@ class MyCenterApe extends Ape { | @@ -670,12 +689,15 @@ class MyCenterApe extends Ape { | ||
670 | if(_data[i]){ | 689 | if(_data[i]){ |
671 | if(ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ | 690 | if(ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ |
672 | let j = (i%4)==3; | 691 | let j = (i%4)==3; |
692 | + let defaultImg = '../images/u373.png'; | ||
693 | + let _img = _data[i].meetingPhoto; | ||
673 | let _classifyList = this._format(classifyList,{ | 694 | let _classifyList = this._format(classifyList,{ |
674 | _classifyListR : j?'classifyListR':'', | 695 | _classifyListR : j?'classifyListR':'', |
675 | _isShowTitle : 'none', | 696 | _isShowTitle : 'none', |
697 | + _id:_data[i].meetingId, | ||
676 | _studyMsg:'进入学习', | 698 | _studyMsg:'进入学习', |
677 | _meetingNumber : _data[i].meetingNumber, | 699 | _meetingNumber : _data[i].meetingNumber, |
678 | - _msgImg : '../images/u373.png', | 700 | + _msgImg : _img?_img:defaultImg, |
679 | _meetingName : _data[i].meeting_name, | 701 | _meetingName : _data[i].meeting_name, |
680 | _create_user : _data[i].teacherName, | 702 | _create_user : _data[i].teacherName, |
681 | _liveTimer : _data[i].meetingBeginTime.split(' ')[0] | 703 | _liveTimer : _data[i].meetingBeginTime.split(' ')[0] |
@@ -695,65 +717,85 @@ class MyCenterApe extends Ape { | @@ -695,65 +717,85 @@ class MyCenterApe extends Ape { | ||
695 | 717 | ||
696 | } | 718 | } |
697 | //已学完 | 719 | //已学完 |
698 | - _studentStudyOverModule(studentMyCenterContentList){ | 720 | + _studentStudyOverModule(){ |
721 | + let studentMyCenterContentList = $('#studentMyCenterContentList'); | ||
699 | let that = this; | 722 | let that = this; |
700 | - this._studentCurriculumInfo(4,function(_data){ | ||
701 | - that.studentStudyOverList(studentMyCenterContentList,_data.returnData.data); | 723 | + let data = {siteId:ClassDataProxy.siteId}; |
724 | + this._studentCurriculumInfo(4,data,function(_data){ | ||
725 | + if(_data){ | ||
726 | + that.studentStudyOverList(studentMyCenterContentList,_data.returnData.data); | ||
727 | + } | ||
702 | }) | 728 | }) |
703 | } | 729 | } |
704 | studentStudyOverList(studentMyCenterContentList,_data){ | 730 | studentStudyOverList(studentMyCenterContentList,_data){ |
705 | studentMyCenterContentList.empty(); | 731 | studentMyCenterContentList.empty(); |
706 | $('#courseMinutePageBox').hide(); | 732 | $('#courseMinutePageBox').hide(); |
707 | - for(let i = 0;i<_data.length;i++){ | ||
708 | - if(_data[i]){ | ||
709 | - if(!ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ | ||
710 | - let j = (i%4)==3; | ||
711 | - let _classifyList = this._format(classifyList,{ | ||
712 | - _classifyListR : j?'classifyListR':'', | ||
713 | - _isShowTitle : 'none', | ||
714 | - _studyMsg:'继续学习', | ||
715 | - _meetingNumber : _data[i].meetingNumber, | ||
716 | - _msgImg : '../images/u373.png', | ||
717 | - _meetingName : _data[i].meeting_name, | ||
718 | - _create_user : _data[i].teacherName, | ||
719 | - _liveTimer : _data[i].meetingBeginTime.split(' ')[0] | ||
720 | - }) | ||
721 | - studentMyCenterContentList.append(_classifyList) | 733 | + if(_data){ |
734 | + for(let i = 0;i<_data.length;i++){ | ||
735 | + if(_data[i]){ | ||
736 | + if(!ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ | ||
737 | + let j = (i%4)==3; | ||
738 | + let defaultImg = '../images/u373.png'; | ||
739 | + let _img = _data[i].meetingPhoto; | ||
740 | + let _classifyList = this._format(classifyList,{ | ||
741 | + _classifyListR : j?'classifyListR':'', | ||
742 | + _isShowTitle : 'none', | ||
743 | + _id:_data[i].meetingId, | ||
744 | + _studyMsg:'继续学习', | ||
745 | + _meetingNumber : _data[i].meetingNumber, | ||
746 | + _msgImg : _img?_img:defaultImg, | ||
747 | + _meetingName : _data[i].meeting_name, | ||
748 | + _create_user : _data[i].teacherName, | ||
749 | + _liveTimer : _data[i].meetingBeginTime.split(' ')[0] | ||
750 | + }) | ||
751 | + studentMyCenterContentList.append(_classifyList) | ||
752 | + } | ||
753 | + }else{ | ||
754 | + console.error('_gainClassData没数据') | ||
722 | } | 755 | } |
723 | - }else{ | ||
724 | - console.error('_gainClassData没数据') | ||
725 | } | 756 | } |
726 | } | 757 | } |
727 | - | ||
728 | } | 758 | } |
729 | - _studenTcollectModule(studentMyCenterContentList){ | 759 | + //收藏 |
760 | + _studenTcollectModule(){ | ||
761 | + let meetingId = $('#lanclassBox').attr('data'); | ||
762 | + let studentMyCenterContentList = $('#studentMyCenterContentList'); | ||
730 | let that = this; | 763 | let that = this; |
731 | - this._studentCurriculumInfo(4,function(_data){ | ||
732 | - that.studentTcollectList(studentMyCenterContentList,_data.returnData.data); | 764 | + let data = {status:7,siteId:ClassDataProxy.siteId,id:ClassDataProxy.id,meetingId:meetingId}; |
765 | + this._studentCurriculumInfo(4,data,function(_data){ | ||
766 | + if(_data){ | ||
767 | + that.studentTcollectList(studentMyCenterContentList,_data.returnData.data); | ||
768 | + } | ||
733 | }) | 769 | }) |
734 | } | 770 | } |
735 | studentTcollectList(studentMyCenterContentList,_data){ | 771 | studentTcollectList(studentMyCenterContentList,_data){ |
736 | studentMyCenterContentList.empty(); | 772 | studentMyCenterContentList.empty(); |
737 | $('#courseMinutePageBox').hide(); | 773 | $('#courseMinutePageBox').hide(); |
738 | - /* for(let i = 0;i<_data.length;i++){ | ||
739 | - if(_data[i]){ | ||
740 | - if(!ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ | ||
741 | - let j = (i%4)==3; | ||
742 | - let _classifyList = this._format(classifyList,{ | ||
743 | - _classifyListR : j?'classifyListR':'', | ||
744 | - _isShowTitle : 'none', | ||
745 | - _meetingNumber : _data[i].meetingNumber, | ||
746 | - _msgImg : '../images/u373.png', | ||
747 | - _meetingName : _data[i].meeting_name, | ||
748 | - _create_user : _data[i].teacherName, | ||
749 | - _liveTimer : _data[i].meetingBeginTime.split(' ')[0] | ||
750 | - }) | ||
751 | - studentMyCenterContentList.append(_classifyList) | ||
752 | - } | ||
753 | - }else{ | ||
754 | - console.error('_gainClassData没数据') | ||
755 | - } | ||
756 | - }*/ | 774 | + if(_data){ |
775 | + for(let i = 0;i<_data.length;i++){ | ||
776 | + if(_data[i]){ | ||
777 | + if(!ClassDataProxy.getTimeDay(_data[i].meetingBeginTime)){ | ||
778 | + let j = (i%4)==3; | ||
779 | + let defaultImg = '../images/u373.png'; | ||
780 | + let _img = _data[i].meetingPhoto; | ||
781 | + let _classifyList = this._format(classifyList,{ | ||
782 | + _classifyListR : j?'classifyListR':'', | ||
783 | + _isShowTitle : 'none', | ||
784 | + _studyMsg:'取消收藏', | ||
785 | + _id:_data[i].meetingId, | ||
786 | + _meetingNumber : _data[i].meetingNumber, | ||
787 | + _msgImg : _img?_img:defaultImg, | ||
788 | + _meetingName : _data[i].meeting_name, | ||
789 | + _create_user : _data[i].teacherName, | ||
790 | + _liveTimer : _data[i].meetingBeginTime.split(' ')[0] | ||
791 | + }) | ||
792 | + studentMyCenterContentList.append(_classifyList) | ||
793 | + } | ||
794 | + }else{ | ||
795 | + console.error('_gainClassData没数据') | ||
796 | + } | ||
797 | + } | ||
798 | + } | ||
757 | 799 | ||
758 | } | 800 | } |
759 | clearLocalStorage(){ | 801 | clearLocalStorage(){ |
@@ -798,6 +840,7 @@ class MyCenterApe extends Ape { | @@ -798,6 +840,7 @@ class MyCenterApe extends Ape { | ||
798 | let arrList = this.dataList[key]; | 840 | let arrList = this.dataList[key]; |
799 | if(arrList){ | 841 | if(arrList){ |
800 | for(let n = 0;n<arrList.length;n++){ | 842 | for(let n = 0;n<arrList.length;n++){ |
843 | + | ||
801 | let _classifyList = this._format(classifyList,{ | 844 | let _classifyList = this._format(classifyList,{ |
802 | _classifyListR : j?'classifyListR':'', | 845 | _classifyListR : j?'classifyListR':'', |
803 | _isShowTitle : n == 0 ?'block':'none', | 846 | _isShowTitle : n == 0 ?'block':'none', |
@@ -861,6 +904,7 @@ class MyCenterApe extends Ape { | @@ -861,6 +904,7 @@ class MyCenterApe extends Ape { | ||
861 | _studentInfoListHandler(evt){ | 904 | _studentInfoListHandler(evt){ |
862 | this.commonality(evt); | 905 | this.commonality(evt); |
863 | this.detailPageStudent(); | 906 | this.detailPageStudent(); |
907 | + // this.defaultDateList() | ||
864 | } | 908 | } |
865 | 909 | ||
866 | //工具类 | 910 | //工具类 |
@@ -54,7 +54,7 @@ class MyChangeInfoApe extends Ape { | @@ -54,7 +54,7 @@ class MyChangeInfoApe extends Ape { | ||
54 | 54 | ||
55 | let _id = ClassDataProxy.id; | 55 | let _id = ClassDataProxy.id; |
56 | let data = new FormData($('#personagePhotoForm')[0]); | 56 | let data = new FormData($('#personagePhotoForm')[0]); |
57 | - let _url = 'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='+_id+'&category=1' | 57 | + let _url = 'http://networkschool.xuedianyun.com:3001/upload/upLoadDoc?businessId='+_id+'&category=1&siteId='+ClassDataProxy.siteId; |
58 | 58 | ||
59 | $.ajax({ | 59 | $.ajax({ |
60 | type: "POST", | 60 | type: "POST", |
@@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | @@ -13,9 +13,9 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS | ||
13 | <span class="courseMinuteListTime">{_liveTimer}</span> | 13 | <span class="courseMinuteListTime">{_liveTimer}</span> |
14 | <span class="courseMinuteListWire"></span> | 14 | <span class="courseMinuteListWire"></span> |
15 | </div> | 15 | </div> |
16 | - <div class="classifyListMyCenter {_classifyListR}"> | 16 | + <div class="classifyListMyCenter {_classifyListR}" data="{_id}"> |
17 | <div class="myCenterContentMask accessLearningBtn"> | 17 | <div class="myCenterContentMask accessLearningBtn"> |
18 | - <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">{_studyMsg}</button> | 18 | + <button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}" value="{_studyMsg}">{_studyMsg}</button> |
19 | </div> | 19 | </div> |
20 | <div class="myCenterContentMask cancelReservation"> | 20 | <div class="myCenterContentMask cancelReservation"> |
21 | <button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button> | 21 | <button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button> |
@@ -237,19 +237,18 @@ class MyCoursesApe extends Ape { | @@ -237,19 +237,18 @@ class MyCoursesApe extends Ape { | ||
237 | //学生端 我的课程 切换 | 237 | //学生端 我的课程 切换 |
238 | studentCourses(){ | 238 | studentCourses(){ |
239 | let ind = $('#courseInfoList .liveInfoLeftLiCheck').attr('data'); | 239 | let ind = $('#courseInfoList .liveInfoLeftLiCheck').attr('data'); |
240 | - let courseMinuteList = $('#courseMinuteList'); | ||
241 | switch (parseInt(ind)){ | 240 | switch (parseInt(ind)){ |
242 | case 0: | 241 | case 0: |
243 | //待学习 | 242 | //待学习 |
244 | - this.studentFutureModule(courseMinuteList); | 243 | + this.studentFutureModule(); |
245 | break; | 244 | break; |
246 | case 1: | 245 | case 1: |
247 | //已学完 | 246 | //已学完 |
248 | - this.studentFormerlyModule(courseMinuteList); | 247 | + this.studentFormerlyModule(); |
249 | break; | 248 | break; |
250 | case 2: | 249 | case 2: |
251 | //收藏 | 250 | //收藏 |
252 | - this.studentCollectModule(courseMinuteList); | 251 | + this.studentCollectModule(); |
253 | break; | 252 | break; |
254 | default: | 253 | default: |
255 | return; | 254 | return; |
@@ -257,9 +256,11 @@ class MyCoursesApe extends Ape { | @@ -257,9 +256,11 @@ class MyCoursesApe extends Ape { | ||
257 | 256 | ||
258 | } | 257 | } |
259 | //学生端 我的课程 待学习 | 258 | //学生端 我的课程 待学习 |
260 | - studentFutureModule(courseMinuteList){ | 259 | + studentFutureModule(){ |
260 | + let courseMinuteList = $('#courseMinuteList'); | ||
261 | let that = this; | 261 | let that = this; |
262 | - this._studentCurriculumInfo(12,function(_data){ | 262 | + let data = {siteId:ClassDataProxy.siteId} |
263 | + this._studentCurriculumInfo(12,data,function(_data){ | ||
263 | if(_data){ | 264 | if(_data){ |
264 | that._studentCourseRender(courseMinuteList,_data.returnData.data) | 265 | that._studentCourseRender(courseMinuteList,_data.returnData.data) |
265 | } | 266 | } |
@@ -297,12 +298,15 @@ class MyCoursesApe extends Ape { | @@ -297,12 +298,15 @@ class MyCoursesApe extends Ape { | ||
297 | if(arrList){ | 298 | if(arrList){ |
298 | for(let n = 0;n<arrList.length;n++){ | 299 | for(let n = 0;n<arrList.length;n++){ |
299 | let j = (n%4) == 3; | 300 | let j = (n%4) == 3; |
301 | + let defaultImg = '../images/u373.png'; | ||
302 | + let _img = arrList[n].meetingPhoto; | ||
300 | let _classifyList = this._format(classifyList,{ | 303 | let _classifyList = this._format(classifyList,{ |
301 | _classifyListR : j ?'classifyListR':'', | 304 | _classifyListR : j ?'classifyListR':'', |
302 | _isShowTitle : n == 0 ?'block':'none', | 305 | _isShowTitle : n == 0 ?'block':'none', |
303 | _meetingNumber : arrList[n].meetingNumber, | 306 | _meetingNumber : arrList[n].meetingNumber, |
307 | + _id:arrList[n].meetingId, | ||
304 | _studyMsg:'进入学习', | 308 | _studyMsg:'进入学习', |
305 | - _msgImg : '../images/u373.png', | 309 | + _msgImg : _img?_img: defaultImg, |
306 | _meetingName : arrList[n].meeting_name, | 310 | _meetingName : arrList[n].meeting_name, |
307 | _create_user : arrList[n].teacherName, | 311 | _create_user : arrList[n].teacherName, |
308 | _liveTimer : key | 312 | _liveTimer : key |
@@ -320,9 +324,11 @@ class MyCoursesApe extends Ape { | @@ -320,9 +324,11 @@ class MyCoursesApe extends Ape { | ||
320 | 324 | ||
321 | } | 325 | } |
322 | //学生端 我的课程 已学完 | 326 | //学生端 我的课程 已学完 |
323 | - studentFormerlyModule(courseMinuteList){ | 327 | + studentFormerlyModule(){ |
328 | + let courseMinuteList = $('#courseMinuteList'); | ||
324 | let that = this; | 329 | let that = this; |
325 | - this._studentCurriculumInfo(12,function(_data){ | 330 | + let data = {siteId:ClassDataProxy.siteId} |
331 | + this._studentCurriculumInfo(12,data,function(_data){ | ||
326 | if(_data){ | 332 | if(_data){ |
327 | that._studentFormerlyRender(courseMinuteList,_data.returnData.data) | 333 | that._studentFormerlyRender(courseMinuteList,_data.returnData.data) |
328 | } | 334 | } |
@@ -331,56 +337,63 @@ class MyCoursesApe extends Ape { | @@ -331,56 +337,63 @@ class MyCoursesApe extends Ape { | ||
331 | //学生端课程数据 已学完 | 337 | //学生端课程数据 已学完 |
332 | _studentFormerlyRender(courseMinuteList,_data){ | 338 | _studentFormerlyRender(courseMinuteList,_data){ |
333 | courseMinuteList.empty(); | 339 | courseMinuteList.empty(); |
334 | - let count = _data.count; | ||
335 | - let page = _data.page; | ||
336 | - let pageno = _data.pageno; | ||
337 | - let pagenum = Math.ceil(count / pageno); | ||
338 | - let _dataList = _data; | ||
339 | - this.pageNo = pagenum; | ||
340 | - // $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | 340 | + if(_data){ |
341 | + let count = _data.count; | ||
342 | + let page = _data.page; | ||
343 | + let pageno = _data.pageno; | ||
344 | + let pagenum = Math.ceil(count / pageno); | ||
345 | + let _dataList = _data; | ||
346 | + this.pageNo = pagenum; | ||
347 | + // $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
341 | 348 | ||
342 | - if(count <= 12){ | ||
343 | - $('#courseMinutePageBox').hide(); | ||
344 | - } | ||
345 | - //存储数据按日期分类 | ||
346 | - this.dataList={}; | ||
347 | - for(let i = 0;i<_dataList.length;i++){ | ||
348 | - let item=_dataList[i]; | ||
349 | - if(item){ | ||
350 | - let temp = item.meetingBeginTime.split(' ')[0] | ||
351 | - if(!this.dataList[temp]) { | ||
352 | - this.dataList[temp] = []; | ||
353 | - } | ||
354 | - this.dataList[temp].push(item) | 349 | + if(count <= 12){ |
350 | + $('#courseMinutePageBox').hide(); | ||
355 | } | 351 | } |
356 | - } | ||
357 | - for(let key in this.dataList){ | ||
358 | - if(!ClassDataProxy.getTimeDay(key)){ | ||
359 | - let arrList = this.dataList[key]; | ||
360 | - if(arrList){ | ||
361 | - for(let n = 0;n<arrList.length;n++){ | ||
362 | - let j = (n%4) == 3; | ||
363 | - let _classifyList = this._format(classifyList,{ | ||
364 | - _classifyListR : j ?'classifyListR':'', | ||
365 | - _isShowTitle : n == 0 ?'block':'none', | ||
366 | - _studyMsg:'继续学习', | ||
367 | - _meetingNumber : arrList[n].meetingNumber, | ||
368 | - _msgImg : '../images/u373.png', | ||
369 | - _meetingName : arrList[n].meeting_name, | ||
370 | - _create_user : arrList[n].teacherName, | ||
371 | - _liveTimer : key | ||
372 | - }) | ||
373 | - courseMinuteList.append(_classifyList) | 352 | + //存储数据按日期分类 |
353 | + this.dataList={}; | ||
354 | + for(let i = 0;i<_dataList.length;i++){ | ||
355 | + let item=_dataList[i]; | ||
356 | + if(item){ | ||
357 | + let temp = item.meetingBeginTime.split(' ')[0] | ||
358 | + if(!this.dataList[temp]) { | ||
359 | + this.dataList[temp] = []; | ||
374 | } | 360 | } |
361 | + this.dataList[temp].push(item) | ||
375 | } | 362 | } |
376 | } | 363 | } |
364 | + for(let key in this.dataList){ | ||
365 | + if(!ClassDataProxy.getTimeDay(key)){ | ||
366 | + let arrList = this.dataList[key]; | ||
367 | + if(arrList){ | ||
368 | + for(let n = 0;n<arrList.length;n++){ | ||
369 | + let j = (n%4) == 3; | ||
370 | + let defaultImg = '../images/u373.png'; | ||
371 | + let _img = arrList[n].meetingPhoto; | ||
372 | + let _classifyList = this._format(classifyList,{ | ||
373 | + _classifyListR : j ?'classifyListR':'', | ||
374 | + _isShowTitle : n == 0 ?'block':'none', | ||
375 | + _studyMsg:'继续学习', | ||
376 | + _id:arrList[n].meetingId, | ||
377 | + _meetingNumber : arrList[n].meetingNumber, | ||
378 | + _msgImg : _img?_img: defaultImg, | ||
379 | + _meetingName : arrList[n].meeting_name, | ||
380 | + _create_user : arrList[n].teacherName, | ||
381 | + _liveTimer : key | ||
382 | + }) | ||
383 | + courseMinuteList.append(_classifyList) | ||
384 | + } | ||
385 | + } | ||
386 | + } | ||
377 | 387 | ||
388 | + } | ||
378 | } | 389 | } |
379 | } | 390 | } |
380 | //学生端 我的课程 收藏 | 391 | //学生端 我的课程 收藏 |
381 | - studentCollectModule(courseMinuteList){ | 392 | + studentCollectModule(){ |
393 | + let courseMinuteList = $('#courseMinuteList'); | ||
382 | let that = this; | 394 | let that = this; |
383 | - this._studentCurriculumInfo(12,function(_data){ | 395 | + let data = {status:7,siteId:ClassDataProxy.siteId,id:ClassDataProxy.id} |
396 | + this._studentCurriculumInfo(12,data,function(_data){ | ||
384 | if(_data){ | 397 | if(_data){ |
385 | that._studentCollectRender(courseMinuteList,_data.returnData.data) | 398 | that._studentCollectRender(courseMinuteList,_data.returnData.data) |
386 | } | 399 | } |
@@ -388,51 +401,54 @@ class MyCoursesApe extends Ape { | @@ -388,51 +401,54 @@ class MyCoursesApe extends Ape { | ||
388 | } | 401 | } |
389 | //学生端课程数据 收藏 | 402 | //学生端课程数据 收藏 |
390 | _studentCollectRender(courseMinuteList,_data){ | 403 | _studentCollectRender(courseMinuteList,_data){ |
391 | - loger.log('收藏',_data) | ||
392 | courseMinuteList.empty(); | 404 | courseMinuteList.empty(); |
393 | - let count = _data.count; | ||
394 | - let page = _data.page; | ||
395 | - let pageno = _data.pageno; | ||
396 | - let pagenum = Math.ceil(count / pageno); | ||
397 | - let _dataList = _data; | ||
398 | - this.pageNo = pagenum; | ||
399 | - // $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | 405 | + if(_data){ |
406 | + let count = _data.count; | ||
407 | + let page = _data.page; | ||
408 | + let pageno = _data.pageno; | ||
409 | + let pagenum = Math.ceil(count / pageno); | ||
410 | + let _dataList = _data; | ||
411 | + this.pageNo = pagenum; | ||
412 | + // $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
400 | 413 | ||
401 | - if(count <= 12){ | ||
402 | - $('#courseMinutePageBox').hide(); | ||
403 | - } | ||
404 | - //存储数据按日期分类 | ||
405 | - this.dataList={}; | ||
406 | - for(let i = 0;i<_dataList.length;i++){ | ||
407 | - let item=_dataList[i]; | ||
408 | - if(item){ | ||
409 | - let temp = item.meetingBeginTime.split(' ')[0] | ||
410 | - if(!this.dataList[temp]) { | ||
411 | - this.dataList[temp] = []; | 414 | + if(count <= 12){ |
415 | + $('#courseMinutePageBox').hide(); | ||
416 | + } | ||
417 | + //存储数据按日期分类 | ||
418 | + this.dataList={}; | ||
419 | + for(let i = 0;i<_dataList.length;i++){ | ||
420 | + let item=_dataList[i]; | ||
421 | + if(item){ | ||
422 | + let temp = item.meetingBeginTime.split(' ')[0] | ||
423 | + if(!this.dataList[temp]) { | ||
424 | + this.dataList[temp] = []; | ||
425 | + } | ||
426 | + this.dataList[temp].push(item) | ||
412 | } | 427 | } |
413 | - this.dataList[temp].push(item) | ||
414 | } | 428 | } |
415 | - } | ||
416 | 429 | ||
417 | 430 | ||
418 | - // let arrList = this.dataList[key]; | ||
419 | - if(_dataList){ | ||
420 | - for(let n = 0;n<_dataList.length;n++){ | ||
421 | - let j = (n%4) == 3; | ||
422 | - let _classifyList = this._format(classifyList,{ | ||
423 | - _classifyListR : j ?'classifyListR':'', | ||
424 | - _isShowTitle : 'none', | ||
425 | - _studyMsg:'取消收藏', | ||
426 | - _meetingNumber : _dataList[n].meetingNumber, | ||
427 | - _msgImg : '../images/u373.png', | ||
428 | - _meetingName : _dataList[n].meeting_name, | ||
429 | - _create_user : _dataList[n].teacherName, | ||
430 | - // _liveTimer : key | ||
431 | - }) | ||
432 | - courseMinuteList.append(_classifyList) | 431 | + // let arrList = this.dataList[key]; |
432 | + if(_dataList){ | ||
433 | + for(let n = 0;n<_dataList.length;n++){ | ||
434 | + let j = (n%4) == 3; | ||
435 | + let defaultImg = '../images/u373.png'; | ||
436 | + let _img = _dataList[n].meetingPhoto; | ||
437 | + let _classifyList = this._format(classifyList,{ | ||
438 | + _classifyListR : j ?'classifyListR':'', | ||
439 | + _isShowTitle : 'none', | ||
440 | + _studyMsg:'取消收藏', | ||
441 | + _id:_dataList[n].meetingId, | ||
442 | + _meetingNumber : _dataList[n].meetingNumber, | ||
443 | + _msgImg : _img?_img: defaultImg, | ||
444 | + _meetingName : _dataList[n].meeting_name, | ||
445 | + _create_user : _dataList[n].teacherName, | ||
446 | + _liveTimer : _dataList[n].meetingBeginTime.split(' ')[0] | ||
447 | + }) | ||
448 | + courseMinuteList.append(_classifyList) | ||
449 | + } | ||
433 | } | 450 | } |
434 | } | 451 | } |
435 | - | ||
436 | } | 452 | } |
437 | 453 | ||
438 | //学生端 我的课程 | 454 | //学生端 我的课程 |
@@ -482,13 +498,14 @@ class MyCoursesApe extends Ape { | @@ -482,13 +498,14 @@ class MyCoursesApe extends Ape { | ||
482 | } | 498 | } |
483 | }) | 499 | }) |
484 | } | 500 | } |
485 | - _studentCurriculumInfo(num,callback){ | 501 | + _studentCurriculumInfo(num,_data,callback){ |
486 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; | 502 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id; |
487 | let that = this; | 503 | let that = this; |
488 | $.ajax({ | 504 | $.ajax({ |
489 | - type: "GET", | 505 | + type: "POST", |
490 | url: _url, | 506 | url: _url, |
491 | timeout:5000, | 507 | timeout:5000, |
508 | + data:_data, | ||
492 | headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id, | 509 | headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id, |
493 | 'token':ClassDataProxy.token}, | 510 | 'token':ClassDataProxy.token}, |
494 | success:function(_data){ | 511 | success:function(_data){ |
@@ -6,7 +6,11 @@ import Loger from "../Loger"; | @@ -6,7 +6,11 @@ import Loger from "../Loger"; | ||
6 | import Ape from "./Ape"; | 6 | import Ape from "./Ape"; |
7 | import $ from "jquery"; | 7 | import $ from "jquery"; |
8 | import ClassDataProxy from "proxy/ClassDataProxy"; | 8 | import ClassDataProxy from "proxy/ClassDataProxy"; |
9 | +import MessageTypes from "../MessageTypes"; | ||
9 | 10 | ||
11 | +const SlideList = ` | ||
12 | +<li class="slidesMap"><img class="slidesImg" src="{_imgList}" data="{_id}" alt=""></li> | ||
13 | +`; | ||
10 | let loger = Loger.getLoger('PC-Slideshow'); | 14 | let loger = Loger.getLoger('PC-Slideshow'); |
11 | class Slideshow extends Ape { | 15 | class Slideshow extends Ape { |
12 | constructor() { | 16 | constructor() { |
@@ -15,44 +19,138 @@ class Slideshow extends Ape { | @@ -15,44 +19,138 @@ class Slideshow extends Ape { | ||
15 | this.windowWidth = 0; | 19 | this.windowWidth = 0; |
16 | this.num = 0; | 20 | this.num = 0; |
17 | this.len = 0; | 21 | this.len = 0; |
22 | + this.defaultList = ['images/xdybg.png', | ||
23 | + 'images/bg.jpg', | ||
24 | + 'images/xdybg.png', | ||
25 | + 'images/bg.jpg', | ||
26 | + 'images/xdybg.png' | ||
27 | + ]; | ||
28 | + this.dataList = []; | ||
29 | + this.dataLength = 0; | ||
30 | + this.isLocalStorage(); | ||
18 | this.addEvent(); | 31 | this.addEvent(); |
19 | this.init(); | 32 | this.init(); |
20 | } | 33 | } |
21 | 34 | ||
22 | init() { | 35 | init() { |
23 | $(window).on('resize',this._imgReload.bind(this)); | 36 | $(window).on('resize',this._imgReload.bind(this)); |
24 | - this.slideImg(); | ||
25 | - this._imgReload(); | 37 | + |
26 | $(".slidesImg").on('load', this._onLoadImage.bind(this)); | 38 | $(".slidesImg").on('load', this._onLoadImage.bind(this)); |
27 | $('#dots').on('mouseenter',this._mouseenterHandler.bind(this)); | 39 | $('#dots').on('mouseenter',this._mouseenterHandler.bind(this)); |
28 | $('#dots').on('mouseleave',this._mouseleaveHandler.bind(this)); | 40 | $('#dots').on('mouseleave',this._mouseleaveHandler.bind(this)); |
41 | + $('#motionMapBox').on('click','.slidesMap',this._slidesMapHandler.bind(this)); | ||
29 | } | 42 | } |
30 | 43 | ||
31 | addEvent() { | 44 | addEvent() { |
32 | 45 | ||
33 | } | 46 | } |
47 | + isLocalStorage(){ | ||
48 | + | ||
49 | + let that = this; | ||
50 | + this.detailPage(function (_data) { | ||
51 | + if(_data){ | ||
52 | + let _dataList = _data.returnData.data; | ||
53 | + let motionMapBox = $('#motionMapBox'); | ||
54 | + if(_dataList){ | ||
55 | + | ||
56 | + motionMapBox.empty(); | ||
57 | + for(let i in _dataList){ | ||
58 | + let _adminList = that._format(SlideList,{ | ||
59 | + _imgList:_dataList[i].path, | ||
60 | + _id:_dataList[i].businessId | ||
61 | + }) | ||
62 | + motionMapBox.append(_adminList) | ||
63 | + } | ||
64 | + that.dataLength = _dataList.length; | ||
65 | + }else{ | ||
66 | + motionMapBox.empty(); | ||
67 | + for(let i = 0;i< that.defaultList.length;i++){ | ||
68 | + let _adminList = that._format(SlideList,{ | ||
69 | + _imgList:_dataList[i] | ||
70 | + }) | ||
71 | + motionMapBox.append(_adminList) | ||
72 | + } | ||
73 | + that.dataLength = that.defaultList.length; | ||
74 | + } | ||
75 | + } | ||
76 | + }); | ||
77 | + let li = document.getElementById('motionMapBox').getElementsByTagName("li"); | ||
78 | + console.log(li,'aaaaaaaa') | ||
79 | + this.slideImg(); | ||
80 | + | ||
81 | + | ||
82 | + } | ||
83 | + detailPage(callback){ | ||
84 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/upload/getImgBySiteId'; | ||
85 | + let that = this; | ||
86 | + $.ajax({ | ||
87 | + type: "POST", | ||
88 | + url: _url, | ||
89 | + data:{siteId:ClassDataProxy.siteId}, | ||
90 | + headers: { | ||
91 | + siteId:ClassDataProxy.siteId, | ||
92 | + 'token':ClassDataProxy.token | ||
93 | + }, | ||
94 | + success:function(_data){ | ||
95 | + /* if(_data && _data.code == 200){ | ||
96 | + loger.log('获取首页图片信息',_data) | ||
97 | + }*/ | ||
98 | + if(_data && _data.code == 200){ | ||
99 | + if(callback){ | ||
100 | + callback(_data); | ||
101 | + } | ||
102 | + }else{ | ||
103 | + if(callback){ | ||
104 | + callback(null); | ||
105 | + } | ||
106 | + } | ||
107 | + | ||
108 | + }, | ||
109 | + error:function(error){ | ||
110 | + // console.log(error,'获取首页图片信息失败') | ||
111 | + if(callback){ | ||
112 | + callback(null); | ||
113 | + } | ||
114 | + } | ||
115 | + | ||
116 | + }) | ||
117 | + } | ||
34 | _onLoadImage(){ | 118 | _onLoadImage(){ |
35 | this._imgReload(); | 119 | this._imgReload(); |
36 | } | 120 | } |
37 | slideImg(){ | 121 | slideImg(){ |
122 | + loger.log('西三四速度快快快') | ||
38 | let oli = document.getElementById('dots').getElementsByTagName("li"); | 123 | let oli = document.getElementById('dots').getElementsByTagName("li"); |
39 | let _num = 0; | 124 | let _num = 0; |
40 | 125 | ||
41 | - let clone=$(".slidesMap").first().clone(); | ||
42 | - $("#motionMapBox").append(clone); | 126 | + // let clone=$("#motionMapBox").find(".slidesMap").first().clone(); |
127 | + // $("#motionMapBox").append(clone); | ||
43 | 128 | ||
44 | let li = document.getElementById('motionMapBox').getElementsByTagName("li"); | 129 | let li = document.getElementById('motionMapBox').getElementsByTagName("li"); |
45 | - let size = li.length | 130 | + let size = li.length; |
46 | this.num = _num; | 131 | this.num = _num; |
47 | this.len = size; | 132 | this.len = size; |
48 | - | 133 | + clearInterval(this._timer); |
134 | + let that = this; | ||
49 | this._timer = setInterval(function(){ | 135 | this._timer = setInterval(function(){ |
50 | - | ||
51 | - li[_num].style.display="none"; | ||
52 | - _num=++_num==size ? 0:_num; | ||
53 | - li[_num].style.display="inline-block"; | ||
54 | - // $("#motionMapBox").stop().animate({left:-this.num*this.windowWidth},500); | ||
55 | - // $("#dots li").eq(_num).addClass('active').siblings().removeClass('active'); | 136 | + $('.slidesMap').eq(_num).show().siblings().hide(); |
137 | + _num++; | ||
138 | + if(_num > that.dataLength - 1){ | ||
139 | + _num = 0; | ||
140 | + } | ||
141 | + /*console.log(_num,that.dataLength,'_num') | ||
142 | + if(_num > that.dataLength - 1){ | ||
143 | + _num = -1; | ||
144 | + } | ||
145 | + let liItem=li[_num]; | ||
146 | + if(liItem){ | ||
147 | + liItem.style.display="none"; | ||
148 | + } | ||
149 | + _num++; | ||
150 | + liItem=li[_num]; | ||
151 | + if(liItem){ | ||
152 | + liItem.style.display="inline-block"; | ||
153 | + }*/ | ||
56 | 154 | ||
57 | },3000);//切换时间 | 155 | },3000);//切换时间 |
58 | } | 156 | } |
@@ -62,16 +160,25 @@ class Slideshow extends Ape { | @@ -62,16 +160,25 @@ class Slideshow extends Ape { | ||
62 | _mouseleaveHandler(){ | 160 | _mouseleaveHandler(){ |
63 | // setInterval(this._timer); | 161 | // setInterval(this._timer); |
64 | } | 162 | } |
65 | - | 163 | + _slidesMapHandler(evt){ |
164 | + let _id = $(evt.currentTarget).find('.slidesImg').attr('data'); | ||
165 | + loger.log(_id) | ||
166 | + this._emit(MessageTypes.CLICK_IMGINFO,{id:_id}); | ||
167 | + } | ||
66 | _imgReload(){ | 168 | _imgReload(){ |
67 | let _windowWidth = $("body").width(); | 169 | let _windowWidth = $("body").width(); |
68 | this.windowWidth = _windowWidth; | 170 | this.windowWidth = _windowWidth; |
171 | + | ||
69 | $('.slidesMap').css({width:_windowWidth + "px"}); | 172 | $('.slidesMap').css({width:_windowWidth + "px"}); |
70 | - $('.slidesImg').css({width:_windowWidth + "px"}); | 173 | + $('.slidesImg').css({width:_windowWidth + "px","background-size":'100%'}); |
71 | 174 | ||
72 | $('#motionMapBox').width($(".slidesMap").length * _windowWidth) | 175 | $('#motionMapBox').width($(".slidesMap").length * _windowWidth) |
73 | } | 176 | } |
74 | - | ||
75 | - | 177 | + //工具类 |
178 | + _format(str, obj) { | ||
179 | + return str.replace(/\{(\w+)\}/g, function (match, group, index) { | ||
180 | + return obj[group]; | ||
181 | + }); | ||
182 | + }; | ||
76 | } | 183 | } |
77 | -export default new Slideshow; | ||
184 | +export default Slideshow; |
@@ -9,8 +9,9 @@ import UIControlApe from "ape/UIControlApe"; | @@ -9,8 +9,9 @@ import UIControlApe from "ape/UIControlApe"; | ||
9 | import ErrorApe from 'ape/ErrorApe'; | 9 | import ErrorApe from 'ape/ErrorApe'; |
10 | 10 | ||
11 | 11 | ||
12 | -import Slideshow from 'ape/Slideshow';//图片轮播 | 12 | + |
13 | import LoginOrRegister from 'ape/LoginOrRegister';//登录注册 | 13 | import LoginOrRegister from 'ape/LoginOrRegister';//登录注册 |
14 | +import Slideshow from 'ape/Slideshow';//图片轮播 | ||
14 | import LanclassApe from 'ape/LanclassApe';//互动课堂 | 15 | import LanclassApe from 'ape/LanclassApe';//互动课堂 |
15 | import LiveClassApe from 'ape/LiveClassApe';//直播课堂 | 16 | import LiveClassApe from 'ape/LiveClassApe';//直播课堂 |
16 | import HomeApe from 'ape/HomeApe';//首页 | 17 | import HomeApe from 'ape/HomeApe';//首页 |
@@ -63,12 +64,13 @@ let _myChangeInfoApe;//个人信息修改 | @@ -63,12 +64,13 @@ let _myChangeInfoApe;//个人信息修改 | ||
63 | 64 | ||
64 | let _subscribeApe; | 65 | let _subscribeApe; |
65 | let _collectApe; | 66 | let _collectApe; |
67 | +let _slideshow; | ||
66 | 68 | ||
67 | let _headSwitchTitleApe; | 69 | let _headSwitchTitleApe; |
68 | 70 | ||
69 | class Main { | 71 | class Main { |
70 | constructor() { | 72 | constructor() { |
71 | - this.clientVersion="v1.8.7.20170928"; | 73 | + this.clientVersion="v1.8.8.20170929"; |
72 | loger.warn("clientVersion:"+this.clientVersion); | 74 | loger.warn("clientVersion:"+this.clientVersion); |
73 | 75 | ||
74 | let locationProtocol= location.protocol; | 76 | let locationProtocol= location.protocol; |
@@ -151,7 +153,9 @@ class Main { | @@ -151,7 +153,9 @@ class Main { | ||
151 | _loginOrRegister = new LoginOrRegister(); | 153 | _loginOrRegister = new LoginOrRegister(); |
152 | _loginOrRegister.on(MessageTypes.LOGIN_OUT,this.loginOut.bind(this)); | 154 | _loginOrRegister.on(MessageTypes.LOGIN_OUT,this.loginOut.bind(this)); |
153 | _loginOrRegister.on(MessageTypes.LOGIN_IN,this.loginIn.bind(this)); | 155 | _loginOrRegister.on(MessageTypes.LOGIN_IN,this.loginIn.bind(this)); |
154 | - // _loginOrRegister.on(MessageTypes.LOGIN_MYCENTER,this.loginMycenter.bind(this)); | 156 | + |
157 | + _slideshow = new Slideshow(); | ||
158 | + _slideshow.on(MessageTypes.CLICK_IMGINFO,this.clickImgInfo.bind(this)); | ||
155 | 159 | ||
156 | //个人中心 | 160 | //个人中心 |
157 | _myCenterApe = new MyCenterApe(); | 161 | _myCenterApe = new MyCenterApe(); |
@@ -162,6 +166,7 @@ class Main { | @@ -162,6 +166,7 @@ class Main { | ||
162 | _myCoursesApe = new MyCoursesApe(); | 166 | _myCoursesApe = new MyCoursesApe(); |
163 | //个人中心 我的预约 | 167 | //个人中心 我的预约 |
164 | _myBookingsApe = new MyBookingsApe(); | 168 | _myBookingsApe = new MyBookingsApe(); |
169 | + _myBookingsApe.on(MessageTypes.COLLECT_BREAK,this.collectBreak.bind(this)); | ||
165 | 170 | ||
166 | //预约管理 | 171 | //预约管理 |
167 | _subscribeApe = new SubscribeApe(); | 172 | _subscribeApe = new SubscribeApe(); |
@@ -237,10 +242,6 @@ class Main { | @@ -237,10 +242,6 @@ class Main { | ||
237 | } | 242 | } |
238 | } | 243 | } |
239 | 244 | ||
240 | - loginMycenter(){ | ||
241 | - _myCenterApe.detailpage(); | ||
242 | - loger.log('1111111111') | ||
243 | - } | ||
244 | homeSkip(_data) { | 245 | homeSkip(_data) { |
245 | if (_data && _data.userType) { | 246 | if (_data && _data.userType) { |
246 | if (_data.userType == ClassDataProxy.USER_TYPE_1) { | 247 | if (_data.userType == ClassDataProxy.USER_TYPE_1) { |
@@ -260,6 +261,11 @@ class Main { | @@ -260,6 +261,11 @@ class Main { | ||
260 | myBookings(){ | 261 | myBookings(){ |
261 | _myBookingsApe.myBookingsMessage(); | 262 | _myBookingsApe.myBookingsMessage(); |
262 | } | 263 | } |
264 | + collectBreak(){ | ||
265 | + _myCenterApe._studenTcollectModule(); | ||
266 | + _myCoursesApe.studentCollectModule(); | ||
267 | + | ||
268 | + } | ||
263 | //是否收藏 | 269 | //是否收藏 |
264 | isCollect(_data){ | 270 | isCollect(_data){ |
265 | if(_data){ | 271 | if(_data){ |
@@ -267,6 +273,12 @@ class Main { | @@ -267,6 +273,12 @@ class Main { | ||
267 | } | 273 | } |
268 | 274 | ||
269 | } | 275 | } |
276 | + clickImgInfo(_data){ | ||
277 | + if(_data){ | ||
278 | + console.log('clickImgInfo',_data) | ||
279 | + _listDetailsApe._slideshowInfo(_data.id); | ||
280 | + } | ||
281 | + } | ||
270 | //管理员左侧列表 | 282 | //管理员左侧列表 |
271 | switchClass(_data){ | 283 | switchClass(_data){ |
272 | let ind = parseInt(_data); | 284 | let ind = parseInt(_data); |
@@ -438,6 +450,7 @@ class Main { | @@ -438,6 +450,7 @@ class Main { | ||
438 | $('#teacherUI .recordLi').eq(2).hide(); | 450 | $('#teacherUI .recordLi').eq(2).hide(); |
439 | $('#liveContentAllBox').hide(); | 451 | $('#liveContentAllBox').hide(); |
440 | $('#lanclassAllBox').hide(); | 452 | $('#lanclassAllBox').hide(); |
453 | + $('#lanclassBox').hide(); | ||
441 | $('#teacherIntroAllBox').hide(); | 454 | $('#teacherIntroAllBox').hide(); |
442 | } | 455 | } |
443 | _student(){ | 456 | _student(){ |
-
请 注册 或 登录 后发表评论