正在显示
10 个修改的文件
包含
284 行增加
和
178 行删除
dist/images/ensure.png
0 → 100644
5.8 KB
@@ -872,7 +872,7 @@ body{ | @@ -872,7 +872,7 @@ body{ | ||
872 | top:0; | 872 | top:0; |
873 | right: 0; | 873 | right: 0; |
874 | bottom: 0; | 874 | bottom: 0; |
875 | - margin: auto; | 875 | + margin: 0 auto; |
876 | background: #fff; | 876 | background: #fff; |
877 | } | 877 | } |
878 | .createClassHandler{ | 878 | .createClassHandler{ |
@@ -1007,9 +1007,6 @@ body{ | @@ -1007,9 +1007,6 @@ body{ | ||
1007 | margin-right: 20px; | 1007 | margin-right: 20px; |
1008 | font-size: 12px; | 1008 | font-size: 12px; |
1009 | } | 1009 | } |
1010 | -.classThemeInfo1{ | ||
1011 | - height: 26px; | ||
1012 | -} | ||
1013 | .classThemeInfoSelect{ | 1010 | .classThemeInfoSelect{ |
1014 | height: 30px; | 1011 | height: 30px; |
1015 | width: 370px; | 1012 | width: 370px; |
@@ -1413,7 +1410,7 @@ body{ | @@ -1413,7 +1410,7 @@ body{ | ||
1413 | height:120px; | 1410 | height:120px; |
1414 | position: absolute; | 1411 | position: absolute; |
1415 | left: 50%; | 1412 | left: 50%; |
1416 | - right: 50%; | 1413 | + top: 0; |
1417 | margin-left:-150px; | 1414 | margin-left:-150px; |
1418 | z-index: 1; | 1415 | z-index: 1; |
1419 | background: #fffdfd; | 1416 | background: #fffdfd; |
@@ -1852,4 +1849,42 @@ body{ | @@ -1852,4 +1849,42 @@ body{ | ||
1852 | } | 1849 | } |
1853 | .createUser{ | 1850 | .createUser{ |
1854 | height: 500px; | 1851 | height: 500px; |
1855 | -} | ||
1852 | +} | ||
1853 | +/*预约成功弹框*/ | ||
1854 | +.teacherDetailReminders{ | ||
1855 | + width: 350px; | ||
1856 | + height: 300px; | ||
1857 | +} | ||
1858 | +.remindersContent{ | ||
1859 | + margin: 40px 50px; | ||
1860 | + text-align: center; | ||
1861 | +} | ||
1862 | +.remindersImg{ | ||
1863 | + width: 80px; | ||
1864 | + height: 80px; | ||
1865 | +} | ||
1866 | +.remindersTit{ | ||
1867 | + font-size: 22px; | ||
1868 | + padding:20px 0 10px; | ||
1869 | +} | ||
1870 | +.remindersInfo{ | ||
1871 | + font-size: 12px; | ||
1872 | + color: #999; | ||
1873 | +} | ||
1874 | +.remindersBtn{ | ||
1875 | + background: #3498db; | ||
1876 | + color:#fff; | ||
1877 | + line-height: 34px; | ||
1878 | + height: 34px; | ||
1879 | + width:220px; | ||
1880 | + border:none; | ||
1881 | + cursor: pointer; | ||
1882 | + margin-top:20px; | ||
1883 | +} | ||
1884 | +.userClass{ | ||
1885 | + height: 535px; | ||
1886 | +} | ||
1887 | +/*用户注册信息*/ | ||
1888 | +.userClassList{ | ||
1889 | + display: none; | ||
1890 | +} |
@@ -243,6 +243,18 @@ | @@ -243,6 +243,18 @@ | ||
243 | </div> | 243 | </div> |
244 | </div> | 244 | </div> |
245 | </div> | 245 | </div> |
246 | + <!--预约老师弹窗--> | ||
247 | + <div class="userSignBox" id="teacherDetailRemindersBox"> | ||
248 | + <div class="usersign teacherDetailReminders" id="teacherDetailReminders"> | ||
249 | + <a href="javascript: void(0)" id="teacherDetailRemindersA" class="usersignA iconfont"></a> | ||
250 | + <div class="remindersContent"> | ||
251 | + <img class="remindersImg" src="images/ensure.png" alt=""> | ||
252 | + <p class="remindersTit">提交成功</p> | ||
253 | + <p class="remindersInfo">三个工作日内老师会联系您,请耐心等待</p> | ||
254 | + <button id="remindersBtn" class="remindersBtn">返回</button> | ||
255 | + </div> | ||
256 | + </div> | ||
257 | + </div> | ||
246 | <!--管理员信息--> | 258 | <!--管理员信息--> |
247 | <div class="classManagementBox" id="classManagementBox"> | 259 | <div class="classManagementBox" id="classManagementBox"> |
248 | <div class="classManagementLeft" id="classManagementLeft"> | 260 | <div class="classManagementLeft" id="classManagementLeft"> |
@@ -291,11 +303,15 @@ | @@ -291,11 +303,15 @@ | ||
291 | <span class="addUserText">添加用户</span> | 303 | <span class="addUserText">添加用户</span> |
292 | </div> | 304 | </div> |
293 | <div class="classManagementRightTitle" id="classManagementRightTitle"> | 305 | <div class="classManagementRightTitle" id="classManagementRightTitle"> |
294 | - <div class="liveInfoLeft" id="liveInfoList"> | ||
295 | - <div class="liveInfoLeftLi liveInfoLeftLiCheck">正在直播</div> | ||
296 | - <div class="liveInfoLeftLi">未开始</div> | ||
297 | - <div class="liveInfoLeftLi">已结束</div> | ||
298 | - </div> | 306 | + <ul class="liveInfoLeft" id="liveInfoList"> |
307 | + <li class="liveInfoLeftLi liveInfoLeftLiCheck">正在直播</li> | ||
308 | + <li class="liveInfoLeftLi">未开始</li> | ||
309 | + <li class="liveInfoLeftLi">已结束</li> | ||
310 | + </ul> | ||
311 | + <ul class="liveInfoLeft userClassList" id="userClassList"> | ||
312 | + <li class="liveInfoLeftLi liveInfoLeftLiCheck">全部课堂</li> | ||
313 | + <li class="liveInfoLeftLi">问题课堂</li> | ||
314 | + </ul> | ||
299 | <div class="liveInfoRight" id="liveInfoRight"> | 315 | <div class="liveInfoRight" id="liveInfoRight"> |
300 | <input class="liveInfoRightInput" id="liveInfoRightInput" type="text"> | 316 | <input class="liveInfoRightInput" id="liveInfoRightInput" type="text"> |
301 | <img class="liveInfoRightInputBtn" id="liveInfoRightInputBtn" src="images/nav_link_14.png" alt=""> | 317 | <img class="liveInfoRightInputBtn" id="liveInfoRightInputBtn" src="images/nav_link_14.png" alt=""> |
@@ -1307,7 +1323,7 @@ | @@ -1307,7 +1323,7 @@ | ||
1307 | </div> | 1323 | </div> |
1308 | <!--创建用户2级--> | 1324 | <!--创建用户2级--> |
1309 | <div id="createUserBox" class="userSignBox createClassBox"> | 1325 | <div id="createUserBox" class="userSignBox createClassBox"> |
1310 | - <div id="createUser" class="createClass createUser"> | 1326 | + <div id="createUser" class="createClass userClass"> |
1311 | <div class="createClassHandler"> | 1327 | <div class="createClassHandler"> |
1312 | <span class="createClassHandlerTitle" id="createUserTitle">添加老师</span> | 1328 | <span class="createClassHandlerTitle" id="createUserTitle">添加老师</span> |
1313 | <a href="javascript: void(0)" id="createUserA" class="createClassA iconfont"></a> | 1329 | <a href="javascript: void(0)" id="createUserA" class="createClassA iconfont"></a> |
@@ -1318,7 +1334,7 @@ | @@ -1318,7 +1334,7 @@ | ||
1318 | 用户名: | 1334 | 用户名: |
1319 | </label> | 1335 | </label> |
1320 | <div class="step_page1_widget"> | 1336 | <div class="step_page1_widget"> |
1321 | - <input id="createUserName" name="createUserName" type="text" class="classThemeInfo classThemeInfo1" placeholder="输入课堂主题" value=""> | 1337 | + <input id="createUserName" name="createUserName" type="text" class="classThemeInfo" value=""> |
1322 | </div> | 1338 | </div> |
1323 | </div> | 1339 | </div> |
1324 | <div class="form_item"> | 1340 | <div class="form_item"> |
@@ -1326,7 +1342,7 @@ | @@ -1326,7 +1342,7 @@ | ||
1326 | 初始密码: | 1342 | 初始密码: |
1327 | </label> | 1343 | </label> |
1328 | <div class="step_page1_widget"> | 1344 | <div class="step_page1_widget"> |
1329 | - <input id="createUserPassWord" name="createUserPassWord" type="text" class="classThemeInfo classThemeInfo1" placeholder="输入主持人密码" value=""> | 1345 | + <input id="createUserPassWord" name="createUserPassWord" type="text" class="classThemeInfo"value=""> |
1330 | </div> | 1346 | </div> |
1331 | </div> | 1347 | </div> |
1332 | <div class="form_item"> | 1348 | <div class="form_item"> |
@@ -1334,7 +1350,7 @@ | @@ -1334,7 +1350,7 @@ | ||
1334 | 真实姓名: | 1350 | 真实姓名: |
1335 | </label> | 1351 | </label> |
1336 | <div class="step_page1_widget"> | 1352 | <div class="step_page1_widget"> |
1337 | - <input id="createUserRealName" name="createUserRealName" type="password" class="classThemeInfo classThemeInfo1" placeholder="输入课堂密码"> | 1353 | + <input id="createUserRealName" name="createUserRealName" type="text" class="classThemeInfo"> |
1338 | </div> | 1354 | </div> |
1339 | </div> | 1355 | </div> |
1340 | <div class="form_item form_item2"> | 1356 | <div class="form_item form_item2"> |
@@ -1354,10 +1370,18 @@ | @@ -1354,10 +1370,18 @@ | ||
1354 | </div> | 1370 | </div> |
1355 | <div class="form_item"> | 1371 | <div class="form_item"> |
1356 | <label class="step_page1Title"> | 1372 | <label class="step_page1Title"> |
1373 | + 手机号码: | ||
1374 | + </label> | ||
1375 | + <div class="step_page1_widget"> | ||
1376 | + <input id="createUserPhone" name="createUserIdentity" type="text" class="classThemeInfo" value=""> | ||
1377 | + </div> | ||
1378 | + </div> | ||
1379 | + <div class="form_item"> | ||
1380 | + <label class="step_page1Title"> | ||
1357 | 身份证号: | 1381 | 身份证号: |
1358 | </label> | 1382 | </label> |
1359 | <div class="step_page1_widget"> | 1383 | <div class="step_page1_widget"> |
1360 | - <input id="createUserIdentity" name="createUserIdentity" type="text" class="classThemeInfo classThemeInfo1" placeholder="输入课堂主题" value=""> | 1384 | + <input id="createUserIdentity" name="createUserIdentity" type="text" class="classThemeInfo" value=""> |
1361 | </div> | 1385 | </div> |
1362 | </div> | 1386 | </div> |
1363 | <div class="form_item"> | 1387 | <div class="form_item"> |
@@ -1365,7 +1389,7 @@ | @@ -1365,7 +1389,7 @@ | ||
1365 | 邮箱地址: | 1389 | 邮箱地址: |
1366 | </label> | 1390 | </label> |
1367 | <div class="step_page1_widget"> | 1391 | <div class="step_page1_widget"> |
1368 | - <input id="createUserMail" name="classThemeUserName" type="text" class="classThemeInfo classThemeInfo1" placeholder="输入课堂主题" value=""> | 1392 | + <input id="createUserMail" name="classThemeUserName" type="text" class="classThemeInfo" value=""> |
1369 | </div> | 1393 | </div> |
1370 | </div> | 1394 | </div> |
1371 | <div class="form_item"> | 1395 | <div class="form_item"> |
@@ -1384,8 +1408,8 @@ | @@ -1384,8 +1408,8 @@ | ||
1384 | </div> | 1408 | </div> |
1385 | </div> | 1409 | </div> |
1386 | <div class="form_button"> | 1410 | <div class="form_button"> |
1387 | - <input id="createUserConfirm" type="button" value="确定" class="createClassBtn createClassConfirm btnHover"> | ||
1388 | <span id="createUserCancel" class="createClassBtn main_closeBtn">取消</span> | 1411 | <span id="createUserCancel" class="createClassBtn main_closeBtn">取消</span> |
1412 | + <input id="createUserConfirm" type="button" value="完成" class="createClassBtn createClassConfirm btnHover"> | ||
1389 | </div> | 1413 | </div> |
1390 | </div> | 1414 | </div> |
1391 | </div> | 1415 | </div> |
@@ -7,6 +7,7 @@ import Ape from "./Ape"; | @@ -7,6 +7,7 @@ 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 dateUI from 'libs/laydate'; | 9 | import dateUI from 'libs/laydate'; |
10 | +import ErrorApe from "./ErrorApe"; | ||
10 | 11 | ||
11 | let loger = Loger.getLoger('PC-CreateClassApe'); | 12 | let loger = Loger.getLoger('PC-CreateClassApe'); |
12 | 13 | ||
@@ -28,7 +29,8 @@ class CreateClassApe extends Ape { | @@ -28,7 +29,8 @@ class CreateClassApe extends Ape { | ||
28 | 29 | ||
29 | // $('#createClassBtn').on('click',this._createClassBtnHandler.bind(this)); | 30 | // $('#createClassBtn').on('click',this._createClassBtnHandler.bind(this)); |
30 | $('.recordLi').on('click',this._recordLiHandler.bind(this));//课堂分类 | 31 | $('.recordLi').on('click',this._recordLiHandler.bind(this));//课堂分类 |
31 | - $('.liveInfoLeftLi').on('click',this._liveInfoLeftLiHandler.bind(this));//直播信息 | 32 | + $('#liveInfoList li').on('click',this._liveInfoLeftLiHandler.bind(this));//首页 |
33 | + $('#userClassList li').on('click',this._userClassListHandler.bind(this));//用户列表 | ||
32 | 34 | ||
33 | //创建课堂 | 35 | //创建课堂 |
34 | $('#createClassA').on('click',this._closeClassHandler.bind(this));//关闭创建课堂 | 36 | $('#createClassA').on('click',this._closeClassHandler.bind(this));//关闭创建课堂 |
@@ -43,6 +45,9 @@ class CreateClassApe extends Ape { | @@ -43,6 +45,9 @@ class CreateClassApe extends Ape { | ||
43 | //用户管理 | 45 | //用户管理 |
44 | $('#addUserBtn').on('click',this._addUserBtnHandler.bind(this));//创建用户按钮 | 46 | $('#addUserBtn').on('click',this._addUserBtnHandler.bind(this));//创建用户按钮 |
45 | $('#createUserYes').on('click',this._createUserYesHandler.bind(this));//进入创建用户界面 | 47 | $('#createUserYes').on('click',this._createUserYesHandler.bind(this));//进入创建用户界面 |
48 | + $('#createUserConfirm').on('click',this._createUserConfirmHandler.bind(this));//创建用户按钮 | ||
49 | + $('#createUserA').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 | ||
50 | + $('#createUserCancel').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 | ||
46 | //日历插件 | 51 | //日历插件 |
47 | this._dateUI(); | 52 | this._dateUI(); |
48 | } | 53 | } |
@@ -77,7 +82,7 @@ class CreateClassApe extends Ape { | @@ -77,7 +82,7 @@ class CreateClassApe extends Ape { | ||
77 | switch (parseInt(ind)){ | 82 | switch (parseInt(ind)){ |
78 | case 0: | 83 | case 0: |
79 | //首页 | 84 | //首页 |
80 | - $('#addUserBtn').hide(); | 85 | + this._createClassHomePage(); |
81 | break; | 86 | break; |
82 | case 1: | 87 | case 1: |
83 | //创建课堂 | 88 | //创建课堂 |
@@ -107,9 +112,15 @@ class CreateClassApe extends Ape { | @@ -107,9 +112,15 @@ class CreateClassApe extends Ape { | ||
107 | break; | 112 | break; |
108 | } | 113 | } |
109 | } | 114 | } |
110 | - _liveInfoLeftLiHandler(evt){ | 115 | + _switchover(evt){ |
111 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); | 116 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); |
112 | } | 117 | } |
118 | + _liveInfoLeftLiHandler(evt){ | ||
119 | + this._switchover(evt); | ||
120 | + } | ||
121 | + _userClassListHandler(evt){ | ||
122 | + this._switchover(evt); | ||
123 | + } | ||
113 | _createClassBtnHandler(){ | 124 | _createClassBtnHandler(){ |
114 | $('#createClassBox').show(); | 125 | $('#createClassBox').show(); |
115 | $('#scheduleForm1').show(); | 126 | $('#scheduleForm1').show(); |
@@ -120,9 +131,17 @@ class CreateClassApe extends Ape { | @@ -120,9 +131,17 @@ class CreateClassApe extends Ape { | ||
120 | //获取第一步中老师列表 | 131 | //获取第一步中老师列表 |
121 | this.allotSpeaker(); | 132 | this.allotSpeaker(); |
122 | } | 133 | } |
134 | + //首页 | ||
135 | + _createClassHomePage(){ | ||
136 | + $('#addUserBtn').hide(); | ||
137 | + $('#userClassList').hide(); | ||
138 | + $('#liveInfoList').show(); | ||
139 | + } | ||
123 | //用户管理 | 140 | //用户管理 |
124 | userAdminHandler(){ | 141 | userAdminHandler(){ |
125 | $('#addUserBtn').show(); | 142 | $('#addUserBtn').show(); |
143 | + $('#userClassList').show(); | ||
144 | + $('#liveInfoList').hide(); | ||
126 | } | 145 | } |
127 | //获取第一步中老师列表 | 146 | //获取第一步中老师列表 |
128 | allotSpeaker(){ | 147 | allotSpeaker(){ |
@@ -335,6 +354,144 @@ class CreateClassApe extends Ape { | @@ -335,6 +354,144 @@ class CreateClassApe extends Ape { | ||
335 | _createUserYesHandler(){ | 354 | _createUserYesHandler(){ |
336 | $('#createUserAccountBox').hide(); | 355 | $('#createUserAccountBox').hide(); |
337 | $('#createUserBox').show(); | 356 | $('#createUserBox').show(); |
357 | + let val = $('#createUserRole').val(); | ||
358 | + let name = ''; | ||
359 | + switch (parseInt(val)){ | ||
360 | + case 0: | ||
361 | + name = '老师'; | ||
362 | + break; | ||
363 | + case 1: | ||
364 | + name = '兼课'; | ||
365 | + break; | ||
366 | + default: | ||
367 | + return; | ||
368 | + } | ||
369 | + $('#createUserTitle').html('添加'+name) | ||
370 | + $("input[name='createUserTeacher']").get(val).checked = true;//创建身份 | ||
371 | + } | ||
372 | + //创建用户 | ||
373 | + _createUserConfirmHandler(){ | ||
374 | + let _name = document.getElementById("createUserName");//老师名字 | ||
375 | + let _passWord = document.getElementById("createUserPassWord");//密码 | ||
376 | + let createUserRealName = document.getElementById("createUserRealName");//真实姓名 | ||
377 | + let createCharacter = $("input[name='createUserTeacher']:checked").val();//角色 | ||
378 | + let phone = document.getElementById("createUserPhone");//手机号 | ||
379 | + let identity = document.getElementById("createUserIdentity");//身份证号 | ||
380 | + let mail = document.getElementById("createUserMail");//邮箱 | ||
381 | + | ||
382 | + let createUserNote = $('#createUserNote').val();//备注信息 | ||
383 | + let createUserAbortTime = $('#createUserAbortTime').html();//有效期 | ||
384 | + | ||
385 | + if(_name.value && createUserRealName.value && phone.value && mail.value){ | ||
386 | + let createUserList = { | ||
387 | + "loginName": _name.value, // 登录名 | ||
388 | + "password": parseInt(_passWord.value), //登录密码 | ||
389 | + "companyName":null, //公司名字 | ||
390 | + "userName":createUserRealName.value, //用户名 | ||
391 | + "userRole":3, // 用户角色 0超级管理员,1管理员,2监课,3老师,4学生 | ||
392 | + "userType": 1, | ||
393 | + "userEmail":mail.value, // 用户邮箱 | ||
394 | + "userMobile":parseInt(phone.value), // 用户手机号 | ||
395 | + "content":createUserNote, // 用户简介 | ||
396 | + "groupId":1, //用户组id | ||
397 | + "IDcard":123123, | ||
398 | + "time":1 | ||
399 | + } | ||
400 | + let that = this; | ||
401 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/addUser'; | ||
402 | + $.ajax({ | ||
403 | + type: "POST", | ||
404 | + url: _url, | ||
405 | + data: createUserList, | ||
406 | + timeout:5000, | ||
407 | + success:function(_data){ | ||
408 | + //注册成功后 跳转登录界面 | ||
409 | + if(_data && _data.code == 200){ | ||
410 | + loger.log(_data,'注册老师账号成功') | ||
411 | + ErrorApe.showWarnError('注册成功'); | ||
412 | + $('#createUserBox').hide(); | ||
413 | + }else{ | ||
414 | + ErrorApe.showWarnError(_data.returnData.data.msg); | ||
415 | + } | ||
416 | + }, | ||
417 | + error:function(error){ | ||
418 | + console.log(error,'失败') | ||
419 | + } | ||
420 | + }) | ||
421 | + }else{ | ||
422 | + this._signMail(mail);//判断邮箱 | ||
423 | + this._signIdentity(identity); | ||
424 | + this._signPhone(phone);//判断手机号 | ||
425 | + this._signName(createUserRealName);//判断用户名 | ||
426 | + this._signName(_name);//判断登录名 | ||
427 | + } | ||
428 | + } | ||
429 | + _signName(_name){ | ||
430 | + if(!_name.value){ | ||
431 | + _name.focus(); | ||
432 | + return false; | ||
433 | + } | ||
434 | + } | ||
435 | + _signPhone(phone){ | ||
436 | + let reg = "^1[3|4|5|8][0-9]\\d{8}$"; | ||
437 | + let re = new RegExp(reg); | ||
438 | + if(!phone.value){ | ||
439 | + phone.focus(); | ||
440 | + return false; | ||
441 | + } | ||
442 | + if (re.test(phone.value)) { | ||
443 | + $('#createUserPhone').css('color','#000'); | ||
444 | + } else { | ||
445 | + $('#createUserPhone').val('手机号输入不合法') | ||
446 | + .css('color','#d95136'); | ||
447 | + phone.focus(); | ||
448 | + return false; | ||
449 | + } | ||
450 | + } | ||
451 | + _signMail(mail){ | ||
452 | + let filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; | ||
453 | + if(!mail.value){ | ||
454 | + mail.focus(); | ||
455 | + return false; | ||
456 | + } | ||
457 | + if (filter.test(mail.value)){ | ||
458 | + $('#createUserMail').css('color','#000'); | ||
459 | + } | ||
460 | + else { | ||
461 | + $('#createUserMail').val('电子邮箱输入不合法') | ||
462 | + .css('color','#d95136'); | ||
463 | + mail.focus(); | ||
464 | + return false; | ||
465 | + } | ||
466 | + } | ||
467 | + _signIdentity(identity){ | ||
468 | + let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; | ||
469 | + if(!identity.value){ | ||
470 | + identity.focus(); | ||
471 | + return false; | ||
472 | + } | ||
473 | + if (reg.test(identity.value)){ | ||
474 | + $('#createUserIdentity').css('color','#000'); | ||
475 | + } | ||
476 | + else { | ||
477 | + $('#createUserIdentity').val('身份证号码输入不合法') | ||
478 | + .css('color','#d95136'); | ||
479 | + identity.focus(); | ||
480 | + return false; | ||
481 | + } | ||
482 | + } | ||
483 | + _closeUserClassHandler(){ | ||
484 | + $('#createUserBox').hide(); | ||
485 | + this._clearUserClssMsg(); | ||
486 | + } | ||
487 | + _clearUserClssMsg(){ | ||
488 | + $('#createUserName').val(''); | ||
489 | + $('#createUserPassWord').val(''); | ||
490 | + $('#createUserRealName').val(''); | ||
491 | + $('#createUserPhone').val(''); | ||
492 | + $('#createUserIdentity').val(''); | ||
493 | + $('#createUserMail').val(''); | ||
494 | + $('#createUserNote').val(''); | ||
338 | } | 495 | } |
339 | //设置当前时间 给输入框默认值 | 496 | //设置当前时间 给输入框默认值 |
340 | _setNewTime(){ | 497 | _setNewTime(){ |
@@ -357,6 +514,9 @@ class CreateClassApe extends Ape { | @@ -357,6 +514,9 @@ class CreateClassApe extends Ape { | ||
357 | this._setMarginTopHandler($('#warnHintBox'));//错误提示 | 514 | this._setMarginTopHandler($('#warnHintBox'));//错误提示 |
358 | this._setMarginTopHandler($('#removeHandler'));//删除 | 515 | this._setMarginTopHandler($('#removeHandler'));//删除 |
359 | this._setMarginTopHandler($('#updateInputBox'));//修改信息输入框 | 516 | this._setMarginTopHandler($('#updateInputBox'));//修改信息输入框 |
517 | + this._setMarginTopHandler($('#teacherDetailReminders'));//预约成功弹框 | ||
518 | + this._setMarginTopHandler($('#createUser'));//注册老师账号 | ||
519 | + this._setMarginTopHandler($('#createClass'));//创建课堂 | ||
360 | } | 520 | } |
361 | //设置弹框位置 方法 | 521 | //设置弹框位置 方法 |
362 | _setMarginTopHandler(_data){ | 522 | _setMarginTopHandler(_data){ |
@@ -21,8 +21,8 @@ class ErrorApe extends Ape { | @@ -21,8 +21,8 @@ class ErrorApe extends Ape { | ||
21 | $('#createUserNo').on('click',this._createUserNoHandler.bind(this));//取消创建用户 | 21 | $('#createUserNo').on('click',this._createUserNoHandler.bind(this));//取消创建用户 |
22 | $('#createUserBoxA').on('click',this._createUserNoHandler.bind(this));//取消创建用户 | 22 | $('#createUserBoxA').on('click',this._createUserNoHandler.bind(this));//取消创建用户 |
23 | 23 | ||
24 | - $('#createUserCancel').on('click',this._closeCreateUserHandler.bind(this));//取消创建用户 | ||
25 | - $('#createUserA').on('click',this._closeCreateUserHandler.bind(this));//取消创建用户 | 24 | + $('#teacherDetailRemindersA').on('click',this._closeteacherDetailHandler.bind(this));//取消创建用户 |
25 | + $('#remindersBtn').on('click',this._closeteacherDetailHandler.bind(this));//取消创建用户 | ||
26 | } | 26 | } |
27 | _hideWarnError(){ | 27 | _hideWarnError(){ |
28 | clearTimeout(this._isTime); | 28 | clearTimeout(this._isTime); |
@@ -60,6 +60,9 @@ class ErrorApe extends Ape { | @@ -60,6 +60,9 @@ class ErrorApe extends Ape { | ||
60 | _closeCreateUserHandler(){ | 60 | _closeCreateUserHandler(){ |
61 | $('#createUserBox').hide(); | 61 | $('#createUserBox').hide(); |
62 | } | 62 | } |
63 | + _closeteacherDetailHandler(){ | ||
64 | + $('#teacherDetailRemindersBox').hide(); | ||
65 | + } | ||
63 | } | 66 | } |
64 | ErrorApe.prototype.TYPE_1=ErrorApe.TYPE_1=1;//兼容直播课堂的浏览器 | 67 | ErrorApe.prototype.TYPE_1=ErrorApe.TYPE_1=1;//兼容直播课堂的浏览器 |
65 | ErrorApe.prototype.TYPE_2=ErrorApe.TYPE_2=2;//兼容录制回放的浏览器 | 68 | ErrorApe.prototype.TYPE_2=ErrorApe.TYPE_2=2;//兼容录制回放的浏览器 |
@@ -24,11 +24,6 @@ class LoginOrRegister extends Ape { | @@ -24,11 +24,6 @@ class LoginOrRegister extends Ape { | ||
24 | $('#skipLoginBtn').on('click',this._skipLoginBtnHandler.bind(this));//注册跳转登录界面 | 24 | $('#skipLoginBtn').on('click',this._skipLoginBtnHandler.bind(this));//注册跳转登录界面 |
25 | $('#nowUserSign').on('click',this._nowUserSignHandler.bind(this));//新用户注册 | 25 | $('#nowUserSign').on('click',this._nowUserSignHandler.bind(this));//新用户注册 |
26 | 26 | ||
27 | - $('#signPhone').on('focus',this._signFocusHandler.bind(this));//注册判断手机号 | ||
28 | - $('#signMail').on('focus',this._signFocusHandler.bind(this));//注册判断手机号 | ||
29 | - $('#signPassWord').on('focus',this._signFocusHandler.bind(this));//注册判断密码 | ||
30 | - $('#securityCode').on('focus',this._signFocusHandler.bind(this));//注册判断验证码 | ||
31 | - | ||
32 | $('#signBtn').on('click',this._signBtnHandler.bind(this));//注册信息提交 | 27 | $('#signBtn').on('click',this._signBtnHandler.bind(this));//注册信息提交 |
33 | 28 | ||
34 | $('#userLoginBtn').on('click',this._loginBtnHandler.bind(this));//登录信息提交 | 29 | $('#userLoginBtn').on('click',this._loginBtnHandler.bind(this));//登录信息提交 |
@@ -47,23 +42,13 @@ class LoginOrRegister extends Ape { | @@ -47,23 +42,13 @@ class LoginOrRegister extends Ape { | ||
47 | } | 42 | } |
48 | 43 | ||
49 | isLocalStorage(){ | 44 | isLocalStorage(){ |
50 | - let that = this; | ||
51 | - $(window).on('load',function(){ | ||
52 | - if(!window.localStorage.getItem('status')){ | ||
53 | - $('#homeUserLoginBtn').text('登录'); | ||
54 | - }else{ | ||
55 | - | ||
56 | - } | ||
57 | - if(window.localStorage.getItem('status') == 'true'){ | ||
58 | - let userType = window.localStorage.getItem('userType') | ||
59 | - $('#homeUserLoginBtn').text(window.localStorage.getItem('loginName')); | ||
60 | - | ||
61 | - // that._showAdministratorInfo(); | ||
62 | - | ||
63 | - | ||
64 | - } | ||
65 | - | ||
66 | - }) | 45 | + loger.log(ClassDataProxy.status,'登录状态') |
46 | + if(!ClassDataProxy.status){ | ||
47 | + $('#homeUserLoginBtn').text('登录'); | ||
48 | + } | ||
49 | + if(ClassDataProxy.status == 'true'){ | ||
50 | + $('#homeUserLoginBtn').text(ClassDataProxy.loginName); | ||
51 | + } | ||
67 | } | 52 | } |
68 | addEvent() { | 53 | addEvent() { |
69 | 54 | ||
@@ -129,13 +114,7 @@ class LoginOrRegister extends Ape { | @@ -129,13 +114,7 @@ class LoginOrRegister extends Ape { | ||
129 | $('#defaultBtn').addClass('header_listMsgCheck').siblings().removeClass('header_listMsgCheck'); | 114 | $('#defaultBtn').addClass('header_listMsgCheck').siblings().removeClass('header_listMsgCheck'); |
130 | } | 115 | } |
131 | 116 | ||
132 | - _signFocusHandler(evt){ | ||
133 | - let _ele = $(evt.target); | ||
134 | - if(_ele.css('color') != 'rgb(0, 0, 0)'){ | ||
135 | - _ele.val('') | ||
136 | - .css('color','#000'); | ||
137 | - } | ||
138 | - } | 117 | + |
139 | _signName(_name){ | 118 | _signName(_name){ |
140 | if(!_name.value){ | 119 | if(!_name.value){ |
141 | _name.focus(); | 120 | _name.focus(); |
@@ -49,9 +49,10 @@ class SubscribeApe extends Ape { | @@ -49,9 +49,10 @@ class SubscribeApe extends Ape { | ||
49 | let arr = ['收藏成功!','预约成功!','报名成功!'] | 49 | let arr = ['收藏成功!','预约成功!','报名成功!'] |
50 | loger.log(_data,'预约信息') | 50 | loger.log(_data,'预约信息') |
51 | //获取课堂数据 | 51 | //获取课堂数据 |
52 | - if(_data && _data.code == 200){ | 52 | + if(_data && _data.code == 200 || _data.returnData.data.msg == '您已预约这堂课'){ |
53 | loger.log(_data,'预约信息') | 53 | loger.log(_data,'预约信息') |
54 | - ErrorApe.showWarnError(arr[status]); | 54 | + $('#teacherDetailRemindersBox').show(); |
55 | + // ErrorApe.showWarnError(arr[status]); | ||
55 | }else{ | 56 | }else{ |
56 | that.toLogin(); | 57 | that.toLogin(); |
57 | } | 58 | } |
@@ -41,6 +41,9 @@ class TeacherDetailApe extends Ape { | @@ -41,6 +41,9 @@ class TeacherDetailApe extends Ape { | ||
41 | 41 | ||
42 | } | 42 | } |
43 | isLocalStorage(){ | 43 | isLocalStorage(){ |
44 | + if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){ | ||
45 | + $('#myCenterBox').show(); | ||
46 | + } | ||
44 | } | 47 | } |
45 | _teacherBtnHandler(evt){ | 48 | _teacherBtnHandler(evt){ |
46 | this._clearListContent(); | 49 | this._clearListContent(); |
@@ -11,134 +11,28 @@ let loger = Loger.getLoger('PC-UIControlApe'); | @@ -11,134 +11,28 @@ let loger = Loger.getLoger('PC-UIControlApe'); | ||
11 | class UIControlApe extends Ape { | 11 | class UIControlApe extends Ape { |
12 | constructor() { | 12 | constructor() { |
13 | super(); | 13 | super(); |
14 | - this.showLoadingFull=true;//完整显示加载进度 | ||
15 | this.init(); | 14 | this.init(); |
16 | } | 15 | } |
17 | init(){ | 16 | init(){ |
18 | - //关闭上传文档动画 | ||
19 | - $('.spinnerMasker').on('mouseenter',this._showExitSpinnerMasker.bind(this)); | ||
20 | - $('.spinnerMasker').on('mouseleave',this._hideExitSpinnerMasker.bind(this)); | ||
21 | - $('.exitSpinnerMaskerA').on('click',this._exitSpinner.bind(this)); | ||
22 | - } | ||
23 | - //设置左侧栏不可点击 | ||
24 | - enabledLeftBar(){ | ||
25 | - $('#leftBarEnabledMask').hide(); | ||
26 | - } | ||
27 | - //设置左侧栏可点击 | ||
28 | - disEnabledLeftBar(){ | ||
29 | - $('#leftBarEnabledMask').show(); | ||
30 | - } | ||
31 | - //设置底部栏不可点击 | ||
32 | - enabledBottomBar(){ | ||
33 | - $('#bottomBarEnabledMask').hide(); | ||
34 | - } | ||
35 | - //设置底部栏可点击 | ||
36 | - disEnabledBottomBar(){ | ||
37 | - $('#bottomBarEnabledMask').show(); | ||
38 | - } | ||
39 | - //显示底部栏 | ||
40 | - showBottomDocControlBar(){; | ||
41 | - $('#docControlBar').show(); | ||
42 | - } | ||
43 | - //隐藏底部栏 | ||
44 | - hideBottomDocControlBar(){ | ||
45 | - $('#docControlBar').hide(); | ||
46 | - } | ||
47 | - //设置doc上传不可点击 | ||
48 | - enabledDocBar(){ | ||
49 | - //默认色 input按钮可点 | ||
50 | - $('#docFileBtn').attr('disabled',false) | ||
51 | - $('.mediaFileContentMenuSpan').css('background','#3A9AD9') | ||
52 | - } | ||
53 | - //设置doc上传可点击 | ||
54 | - disEnabledDocBar(){ | ||
55 | - //灰色 input按钮不可点 | ||
56 | - $('#docFileBtn').attr('disabled',true) | ||
57 | - $('.mediaFileContentMenuSpan').css('background','#9aa5ad') | ||
58 | - } | ||
59 | - //设置media上传不可点击 | ||
60 | - enabledMediaBar(){ | ||
61 | - //默认色 input按钮可点 | ||
62 | - $('#mediaFileBtn').attr('disabled',false) | ||
63 | - $('.mediaFileContentMenuSpan').css('background','#3A9AD9') | ||
64 | - } | ||
65 | - //设置media上传可点击 | ||
66 | - disEnabledMediaBar(){ | ||
67 | - //灰色 input按钮不可点 | ||
68 | - $('#mediaFileBtn').attr('disabled',true) | ||
69 | - $('.mediaFileContentMenuSpan').css('background','#9aa5ad') | ||
70 | - } | ||
71 | - //设置music上传不可点击 | ||
72 | - enabledMusicBar(){ | ||
73 | - //默认色 input按钮可点 | ||
74 | - $('#musicFileBtn').attr('disabled',false) | ||
75 | - $('.mediaFileContentMenuSpan').css('background','#3A9AD9') | ||
76 | - } | ||
77 | - //设置music上传可点击 | ||
78 | - disEnabledMusicBar(){ | ||
79 | - //灰色 input按钮不可点 | ||
80 | - $('#musicFileBtn').attr('disabled',true) | ||
81 | - $('.mediaFileContentMenuSpan').css('background','#9aa5ad') | ||
82 | - } | ||
83 | - | 17 | + //注册学生 |
18 | + $('#signPhone').on('focus',this._signFocusHandler.bind(this));//注册判断手机号 | ||
19 | + $('#signMail').on('focus',this._signFocusHandler.bind(this));//注册判断邮箱 | ||
20 | + $('#signPassWord').on('focus',this._signFocusHandler.bind(this));//注册判断密码 | ||
21 | + $('#securityCode').on('focus',this._signFocusHandler.bind(this));//注册判断验证码 | ||
22 | + //注册老师 | ||
23 | + $('#createUserPhone').on('focus',this._signFocusHandler.bind(this));//注册用户判断手机号 | ||
24 | + $('#createUserMail').on('focus',this._signFocusHandler.bind(this));//注册用户判断邮箱 | ||
25 | + $('#createUserPassWord').on('focus',this._signFocusHandler.bind(this));//注册用户判断密码 | ||
26 | + $('#createUserIdentity').on('focus',this._signFocusHandler.bind(this));//注册用户判断身份证号 | ||
84 | 27 | ||
85 | - //--------------------文件上传进度控制--------------------- | ||
86 | - //显示文件上传的的loadin 上传文件通用的加载进度 | ||
87 | - showLoadingMask(_isFull=true){ | ||
88 | - $('.spinnerMasker').show(); | ||
89 | - this.showLoadingFull=Boolean(_isFull); | ||
90 | - if( this.showLoadingFull==true){ | ||
91 | - //全部显示 | ||
92 | - this._defaultShow(); | ||
93 | - }else{ | ||
94 | - //最小化 | ||
95 | - this._minimizeShow(); | ||
96 | - } | ||
97 | - } | ||
98 | - //隐藏上传进度 | ||
99 | - hideLoadingMask(){ | ||
100 | - $('.spinnerMasker').hide(); | ||
101 | - $('.minspinner').css('width','0%'); | ||
102 | - $('.spinnerHtml').html(''); | ||
103 | - } | ||
104 | - //更新上传进度百分几0-100 | ||
105 | - updataLoadingMaskProgress(_progress){ | ||
106 | - $('.spinnerHtml').html('loading ' + _progress +"%" ); | ||
107 | - $('.minspinner').css('width',_progress+'%'); | ||
108 | } | 28 | } |
109 | - _exitSpinner(){ | ||
110 | - this.showLoadingMask(!this.showLoadingFull); | ||
111 | - } | ||
112 | - _showExitSpinnerMasker(){ | ||
113 | - $('.exitSpinnerMasker').show(); | ||
114 | - } | ||
115 | - _hideExitSpinnerMasker(){ | ||
116 | - $('.exitSpinnerMasker').hide(); | ||
117 | - } | ||
118 | - _defaultShow(){ | ||
119 | - $('.spinnerMasker').css({ | ||
120 | - 'width':'100%', | ||
121 | - "height":'100%', | ||
122 | - "bottom":"0" | ||
123 | - }) | ||
124 | - $('.spinnerMask').show(); | ||
125 | - $('.spinner').show(); | ||
126 | - $('.spinnerHtml').css('top','50%'); | ||
127 | - $('.exitSpinnerMasker').css('top','39%'); | ||
128 | - } | ||
129 | - _minimizeShow(){ | ||
130 | - let spinnerMasker = $('.spinnerMasker'); | ||
131 | - spinnerMasker.css({ | ||
132 | - 'width':'300px', | ||
133 | - "height":'42px', | ||
134 | - "bottom": - $('.botTurn').height() | ||
135 | - }) | ||
136 | - $('.spinnerMask').hide(); | ||
137 | - $('.spinner').hide(); | ||
138 | - $('.spinnerHtml').css('top','25%') | ||
139 | - $('.exitSpinnerMasker').css('top','25%'); | 29 | + _signFocusHandler(evt){ |
30 | + let _ele = $(evt.target); | ||
31 | + if(_ele.css('color') != 'rgb(0, 0, 0)'){ | ||
32 | + _ele.val('') | ||
33 | + .css('color','#000'); | ||
34 | + } | ||
140 | } | 35 | } |
141 | - //---------------------------文件上传进度控制 end------------------------ | ||
142 | } | 36 | } |
143 | 37 | ||
144 | export default new UIControlApe; | 38 | export default new UIControlApe; |
@@ -5,6 +5,7 @@ import ClassDataProxy from "proxy/ClassDataProxy"; | @@ -5,6 +5,7 @@ import ClassDataProxy from "proxy/ClassDataProxy"; | ||
5 | 5 | ||
6 | import localConfig from "local/localConfig"; | 6 | import localConfig from "local/localConfig"; |
7 | import UIMagnifyApe from "ape/UIMagnifyApe"; | 7 | import UIMagnifyApe from "ape/UIMagnifyApe"; |
8 | +import UIControlApe from "ape/UIControlApe"; | ||
8 | import ErrorApe from 'ape/ErrorApe'; | 9 | import ErrorApe from 'ape/ErrorApe'; |
9 | 10 | ||
10 | 11 | ||
@@ -38,7 +39,7 @@ let _subscribeApe; | @@ -38,7 +39,7 @@ let _subscribeApe; | ||
38 | 39 | ||
39 | class Main { | 40 | class Main { |
40 | constructor() { | 41 | constructor() { |
41 | - this.clientVersion="v1.7.0.20170906"; | 42 | + this.clientVersion="v1.7.1.20170906"; |
42 | loger.warn("clientVersion:"+this.clientVersion); | 43 | loger.warn("clientVersion:"+this.clientVersion); |
43 | 44 | ||
44 | let locationProtocol= location.protocol; | 45 | let locationProtocol= location.protocol; |
@@ -186,6 +187,7 @@ class Main { | @@ -186,6 +187,7 @@ class Main { | ||
186 | let userMobile = window.localStorage.getItem('userMobile')|| ''; | 187 | let userMobile = window.localStorage.getItem('userMobile')|| ''; |
187 | let userEmail = window.localStorage.getItem('userEmail')|| ''; | 188 | let userEmail = window.localStorage.getItem('userEmail')|| ''; |
188 | let monicker = window.localStorage.getItem('monicker')|| ''; | 189 | let monicker = window.localStorage.getItem('monicker')|| ''; |
190 | + let status = window.localStorage.getItem('status')|| ''; | ||
189 | 191 | ||
190 | ClassDataProxy.userType = parseInt(userType); | 192 | ClassDataProxy.userType = parseInt(userType); |
191 | ClassDataProxy.loginName = loginName; | 193 | ClassDataProxy.loginName = loginName; |
@@ -195,6 +197,7 @@ class Main { | @@ -195,6 +197,7 @@ class Main { | ||
195 | ClassDataProxy.userMobile = userMobile; | 197 | ClassDataProxy.userMobile = userMobile; |
196 | ClassDataProxy.userEmail = userEmail; | 198 | ClassDataProxy.userEmail = userEmail; |
197 | ClassDataProxy.monicker = monicker; | 199 | ClassDataProxy.monicker = monicker; |
200 | + ClassDataProxy.status = status; | ||
198 | 201 | ||
199 | loger.log('进入课堂时显示的type值',ClassDataProxy.userType) | 202 | loger.log('进入课堂时显示的type值',ClassDataProxy.userType) |
200 | 203 | ||
@@ -232,6 +235,10 @@ class Main { | @@ -232,6 +235,10 @@ class Main { | ||
232 | $('#myCenterBox').hide(); | 235 | $('#myCenterBox').hide(); |
233 | $('#lanclassBox').hide(); | 236 | $('#lanclassBox').hide(); |
234 | $('#classifyListBox').hide(); | 237 | $('#classifyListBox').hide(); |
238 | + $('#recordUl .recordLi').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
239 | + $('#addUserBtn').hide(); | ||
240 | + $('#liveInfoList').show(); | ||
241 | + $('#userClassList').hide(); | ||
235 | } | 242 | } |
236 | _teacherHome(){ | 243 | _teacherHome(){ |
237 | $('#slideshow').hide(); | 244 | $('#slideshow').hide(); |
@@ -242,7 +249,7 @@ class Main { | @@ -242,7 +249,7 @@ class Main { | ||
242 | $('#androidDownload').hide(); | 249 | $('#androidDownload').hide(); |
243 | $('#classManagementBox').hide(); | 250 | $('#classManagementBox').hide(); |
244 | $('#classifyListBox').hide(); | 251 | $('#classifyListBox').hide(); |
245 | - $('#myCenterBox').hide(); | 252 | + $('#myCenterBox').show(); |
246 | $('.myCenterContentBox').eq(0).show(); | 253 | $('.myCenterContentBox').eq(0).show(); |
247 | $('.recordLi2').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | 254 | $('.recordLi2').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); |
248 | } | 255 | } |
-
请 注册 或 登录 后发表评论