正在显示
12 个修改的文件
包含
341 行增加
和
171 行删除
| @@ -1164,6 +1164,7 @@ body{ | @@ -1164,6 +1164,7 @@ body{ | ||
| 1164 | position: absolute; | 1164 | position: absolute; |
| 1165 | left:0; | 1165 | left:0; |
| 1166 | top:0; | 1166 | top:0; |
| 1167 | + display: none; | ||
| 1167 | } | 1168 | } |
| 1168 | .usersign{ | 1169 | .usersign{ |
| 1169 | width:420px; | 1170 | width:420px; |
| @@ -1370,8 +1371,9 @@ body{ | @@ -1370,8 +1371,9 @@ body{ | ||
| 1370 | border-radius: 3px; | 1371 | border-radius: 3px; |
| 1371 | } | 1372 | } |
| 1372 | .removeConfirm{ | 1373 | .removeConfirm{ |
| 1373 | - margin:0 30px 0 60px; | 1374 | + margin:0 40px 0 65px; |
| 1374 | background: #3498db; | 1375 | background: #3498db; |
| 1376 | + color:#fff; | ||
| 1375 | } | 1377 | } |
| 1376 | .removeCancel{ | 1378 | .removeCancel{ |
| 1377 | background: #e6e6e6; | 1379 | background: #e6e6e6; |
| @@ -1386,6 +1388,7 @@ body{ | @@ -1386,6 +1388,7 @@ body{ | ||
| 1386 | top: 0; | 1388 | top: 0; |
| 1387 | bottom: 0; | 1389 | bottom: 0; |
| 1388 | margin: auto; | 1390 | margin: auto; |
| 1391 | + z-index: 1; | ||
| 1389 | background: #fffdfd; | 1392 | background: #fffdfd; |
| 1390 | cursor: default; | 1393 | cursor: default; |
| 1391 | font-size: 14px; | 1394 | font-size: 14px; |
| @@ -1757,4 +1760,32 @@ body{ | @@ -1757,4 +1760,32 @@ body{ | ||
| 1757 | cursor: pointer; | 1760 | cursor: pointer; |
| 1758 | float: right; | 1761 | float: right; |
| 1759 | margin-top:83px; | 1762 | margin-top:83px; |
| 1760 | -} | ||
| 1763 | +} | ||
| 1764 | +/*个人信息修改弹框*/ | ||
| 1765 | +.updateInputBox{ | ||
| 1766 | + width:410px; | ||
| 1767 | + height:200px; | ||
| 1768 | + background: #fff; | ||
| 1769 | + position: absolute; | ||
| 1770 | + left: 0; | ||
| 1771 | + right: 0; | ||
| 1772 | + top: 0; | ||
| 1773 | + bottom: 0; | ||
| 1774 | + margin: auto; | ||
| 1775 | +} | ||
| 1776 | +.updateInputContent{ | ||
| 1777 | + padding: 55px 35px; | ||
| 1778 | +} | ||
| 1779 | +.updateInputText{ | ||
| 1780 | + float: left; | ||
| 1781 | + line-height: 40px; | ||
| 1782 | + } | ||
| 1783 | +.updateInput{ | ||
| 1784 | + width:200px; | ||
| 1785 | + height:40px; | ||
| 1786 | + border:1px solid #ccc; | ||
| 1787 | + line-height: 40px; | ||
| 1788 | + margin-left:10px; | ||
| 1789 | + outline: none; | ||
| 1790 | + padding-left:6px; | ||
| 1791 | +} |
| @@ -946,7 +946,7 @@ | @@ -946,7 +946,7 @@ | ||
| 946 | </div> | 946 | </div> |
| 947 | </div> | 947 | </div> |
| 948 | </div> | 948 | </div> |
| 949 | - | 949 | + <!--个人中心--> |
| 950 | <div id="myCenterBox" class="myCenterBox"> | 950 | <div id="myCenterBox" class="myCenterBox"> |
| 951 | <div class="myCenterLeftBox"> | 951 | <div class="myCenterLeftBox"> |
| 952 | <ul class="recordUl" id="teacherUI"> | 952 | <ul class="recordUl" id="teacherUI"> |
| @@ -1122,10 +1122,10 @@ | @@ -1122,10 +1122,10 @@ | ||
| 1122 | <li class="accountInfoList"> | 1122 | <li class="accountInfoList"> |
| 1123 | <label class="accountInfoIcon"></label> | 1123 | <label class="accountInfoIcon"></label> |
| 1124 | <div class="accountInfo"> | 1124 | <div class="accountInfo"> |
| 1125 | - <span class="significanceInfo"><label>账号密码</label></span> | 1125 | + <span class="significanceInfo"><label>账号密码</label><label id="setPassWord"></label></span> |
| 1126 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> | 1126 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> |
| 1127 | </div> | 1127 | </div> |
| 1128 | - <span class="accountInfoBtn">修改</span> | 1128 | + <span class="accountInfoBtn" id="accountPassWordBtn" data="0">修改</span> |
| 1129 | </li> | 1129 | </li> |
| 1130 | <li class="accountInfoList"> | 1130 | <li class="accountInfoList"> |
| 1131 | <label class="accountInfoIcon"></label> | 1131 | <label class="accountInfoIcon"></label> |
| @@ -1133,7 +1133,7 @@ | @@ -1133,7 +1133,7 @@ | ||
| 1133 | <span class="significanceInfo"><label class="significanceInfoTit">安全邮箱</label><label id="setMail">hi*****n@3mang.com</label></span> | 1133 | <span class="significanceInfo"><label class="significanceInfoTit">安全邮箱</label><label id="setMail">hi*****n@3mang.com</label></span> |
| 1134 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> | 1134 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> |
| 1135 | </div> | 1135 | </div> |
| 1136 | - <span class="accountInfoBtn">修改</span> | 1136 | + <span class="accountInfoBtn" id="accountEmailBtn" data="1">修改</span> |
| 1137 | </li> | 1137 | </li> |
| 1138 | <li class="accountInfoList"> | 1138 | <li class="accountInfoList"> |
| 1139 | <label class="accountInfoIcon"></label> | 1139 | <label class="accountInfoIcon"></label> |
| @@ -1141,7 +1141,7 @@ | @@ -1141,7 +1141,7 @@ | ||
| 1141 | <span class="significanceInfo"><label class="significanceInfoTit">安全手机</label><label id="setPhone">139*****168</label></span> | 1141 | <span class="significanceInfo"><label class="significanceInfoTit">安全手机</label><label id="setPhone">139*****168</label></span> |
| 1142 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> | 1142 | <span class="significanceInfoHint">用于保护账号信息和登录安全</span> |
| 1143 | </div> | 1143 | </div> |
| 1144 | - <span class="accountInfoBtn">修改</span> | 1144 | + <span class="accountInfoBtn" id="accountMobilelBtn" data="2">修改</span> |
| 1145 | </li> | 1145 | </li> |
| 1146 | <li class="accountInfoList accountInfoList1"> | 1146 | <li class="accountInfoList accountInfoList1"> |
| 1147 | <button class="accountInfoBtn accountInfoSaveBtn" id="accountInfoSaveBtn">保存</button> | 1147 | <button class="accountInfoBtn accountInfoSaveBtn" id="accountInfoSaveBtn">保存</button> |
| @@ -1277,5 +1277,19 @@ | @@ -1277,5 +1277,19 @@ | ||
| 1277 | <a href="javascript: void(0)" class="warnHintA iconfont" id="warnHintA"></a> | 1277 | <a href="javascript: void(0)" class="warnHintA iconfont" id="warnHintA"></a> |
| 1278 | <p class="warnHintContent" id="warnHintContent"></p> | 1278 | <p class="warnHintContent" id="warnHintContent"></p> |
| 1279 | </div> | 1279 | </div> |
| 1280 | +<!--修改信息输入框--> | ||
| 1281 | +<div class="userSignBox" id="updateInputShade"> | ||
| 1282 | + <div class="updateInputBox"> | ||
| 1283 | + <a href="javascript: void(0)" class="warnHintA iconfont" id="updateInputBoxA"></a> | ||
| 1284 | + <div class="updateInputContent"> | ||
| 1285 | + <span class="updateInputText" id="updateInputText">请输入新密码 :</span> | ||
| 1286 | + <input type="text" class="updateInput" id="updateInput"> | ||
| 1287 | + <div class="removeHandlerBtn"> | ||
| 1288 | + <button class="removeConfirm btnHover" id="updateInputYes">确定</button> | ||
| 1289 | + <button class="removeCancel" id="updateInputNo">取消</button> | ||
| 1290 | + </div> | ||
| 1291 | + </div> | ||
| 1292 | + </div> | ||
| 1293 | +</div> | ||
| 1280 | </body> | 1294 | </body> |
| 1281 | </html> | 1295 | </html> |
| @@ -46,6 +46,7 @@ class HomeApe extends Ape { | @@ -46,6 +46,7 @@ class HomeApe extends Ape { | ||
| 46 | 46 | ||
| 47 | } | 47 | } |
| 48 | isLocalStorage(){ | 48 | isLocalStorage(){ |
| 49 | + $('#myCenterBox').hide(); | ||
| 49 | this.detailPage(); | 50 | this.detailPage(); |
| 50 | } | 51 | } |
| 51 | _judgeListPlace(){ | 52 | _judgeListPlace(){ |
| @@ -112,14 +113,7 @@ class HomeApe extends Ape { | @@ -112,14 +113,7 @@ class HomeApe extends Ape { | ||
| 112 | $('#classifyListBox').hide(); | 113 | $('#classifyListBox').hide(); |
| 113 | $('#teacherDetailBox').hide(); | 114 | $('#teacherDetailBox').hide(); |
| 114 | $('#lanclassBox').hide(); | 115 | $('#lanclassBox').hide(); |
| 115 | - } | ||
| 116 | - teacher(){ | ||
| 117 | - $('#slideshow').hide(); | ||
| 118 | - $('#defaultBox').hide(); | ||
| 119 | - $('.curriculumBox').hide(); | ||
| 120 | - $('#classifyListBox').show(); | ||
| 121 | - $('#teacherDetailBox').hide(); | ||
| 122 | - $('#lanclassBox').hide(); | 116 | + $('#myCenterBox').hide(); |
| 123 | } | 117 | } |
| 124 | _gainClassData(_data){ | 118 | _gainClassData(_data){ |
| 125 | let liveList = $('#liveList'); | 119 | let liveList = $('#liveList'); |
| @@ -130,7 +124,6 @@ class HomeApe extends Ape { | @@ -130,7 +124,6 @@ class HomeApe extends Ape { | ||
| 130 | teacherIntro.empty(); | 124 | teacherIntro.empty(); |
| 131 | if(_data){ | 125 | if(_data){ |
| 132 | let _dataList = _data.meetingInfo; | 126 | let _dataList = _data.meetingInfo; |
| 133 | - loger.log('显示当前时间',_dataList[0]) | ||
| 134 | for(let i = 0;i<_dataList.length;i++){ | 127 | for(let i = 0;i<_dataList.length;i++){ |
| 135 | if(i<8){ | 128 | if(i<8){ |
| 136 | let j = (i%4)==3; | 129 | let j = (i%4)==3; |
| @@ -58,6 +58,7 @@ class LanclassApe extends Ape { | @@ -58,6 +58,7 @@ class LanclassApe extends Ape { | ||
| 58 | $('#classifyListBox').show(); | 58 | $('#classifyListBox').show(); |
| 59 | $('#teacherDetailBox').hide(); | 59 | $('#teacherDetailBox').hide(); |
| 60 | $('#lanclassBox').hide(); | 60 | $('#lanclassBox').hide(); |
| 61 | + $('#myCenterBox').hide(); | ||
| 61 | this.detailPage(); | 62 | this.detailPage(); |
| 62 | } | 63 | } |
| 63 | //点击翻页 | 64 | //点击翻页 |
| @@ -57,6 +57,7 @@ class LanclassApe extends Ape { | @@ -57,6 +57,7 @@ class LanclassApe extends Ape { | ||
| 57 | $('#classifyListBox').show(); | 57 | $('#classifyListBox').show(); |
| 58 | $('#teacherDetailBox').hide(); | 58 | $('#teacherDetailBox').hide(); |
| 59 | $('#lanclassBox').hide(); | 59 | $('#lanclassBox').hide(); |
| 60 | + $('#myCenterBox').hide(); | ||
| 60 | this.detailPage(); | 61 | this.detailPage(); |
| 61 | } | 62 | } |
| 62 | //点击翻页 | 63 | //点击翻页 |
| @@ -221,6 +221,7 @@ class LoginOrRegister extends Ape { | @@ -221,6 +221,7 @@ class LoginOrRegister extends Ape { | ||
| 221 | "companyName":null, //公司名字 | 221 | "companyName":null, //公司名字 |
| 222 | "userName":_name.value, //用户名 | 222 | "userName":_name.value, //用户名 |
| 223 | "userRole":4, // 用户角色 0超级管理员,1管理员,2监课,3老师,4学生 | 223 | "userRole":4, // 用户角色 0超级管理员,1管理员,2监课,3老师,4学生 |
| 224 | + "userType": 8, | ||
| 224 | "userEmail":mail.value, // 用户邮箱 | 225 | "userEmail":mail.value, // 用户邮箱 |
| 225 | "userMobile":parseInt(phone.value), // 用户手机号 | 226 | "userMobile":parseInt(phone.value), // 用户手机号 |
| 226 | "content":"2017-09-01", // 用户简介 | 227 | "content":"2017-09-01", // 用户简介 |
| @@ -306,14 +307,24 @@ class LoginOrRegister extends Ape { | @@ -306,14 +307,24 @@ class LoginOrRegister extends Ape { | ||
| 306 | ClassDataProxy.status = true; | 307 | ClassDataProxy.status = true; |
| 307 | ClassDataProxy.id = _data.returnData.data.id; | 308 | ClassDataProxy.id = _data.returnData.data.id; |
| 308 | 309 | ||
| 309 | - window.localStorage.setItem("loginName",ClassDataProxy.loginName); | ||
| 310 | - window.localStorage.setItem("password", ClassDataProxy.password ); | 310 | + ClassDataProxy.monicker = _data.returnData.data.userName; |
| 311 | + ClassDataProxy.userEmail = _data.returnData.data.userEmail; | ||
| 312 | + ClassDataProxy.userMobile = _data.returnData.data.userMobile; | ||
| 313 | + | ||
| 314 | + window.localStorage.setItem("loginName",ClassDataProxy.loginName);//登录名 | ||
| 315 | + window.localStorage.setItem("password", ClassDataProxy.password );//密码 | ||
| 311 | window.localStorage.setItem("userType", ClassDataProxy.userType); | 316 | window.localStorage.setItem("userType", ClassDataProxy.userType); |
| 312 | window.localStorage.setItem("token", ClassDataProxy.token ); | 317 | window.localStorage.setItem("token", ClassDataProxy.token ); |
| 313 | window.localStorage.setItem('status', ClassDataProxy.status); | 318 | window.localStorage.setItem('status', ClassDataProxy.status); |
| 314 | window.localStorage.setItem('id', ClassDataProxy.id); | 319 | window.localStorage.setItem('id', ClassDataProxy.id); |
| 315 | 320 | ||
| 321 | + window.localStorage.setItem('monicker', ClassDataProxy.monicker); | ||
| 322 | + window.localStorage.setItem('userEmail', ClassDataProxy.userEmail); | ||
| 323 | + window.localStorage.setItem('userMobile', ClassDataProxy.userMobile); | ||
| 324 | + | ||
| 316 | that.successLogin(); | 325 | that.successLogin(); |
| 326 | + //登录成功后 个人信息输入信息框中 | ||
| 327 | + that.updateChangeUser(_data); | ||
| 317 | 328 | ||
| 318 | }else{ | 329 | }else{ |
| 319 | ErrorApe.showWarnError(_data.returnData.data.msg); | 330 | ErrorApe.showWarnError(_data.returnData.data.msg); |
| @@ -337,6 +348,30 @@ class LoginOrRegister extends Ape { | @@ -337,6 +348,30 @@ class LoginOrRegister extends Ape { | ||
| 337 | this._userLoginAHandler(); | 348 | this._userLoginAHandler(); |
| 338 | this._emit(MessageTypes.LOGIN_IN,{userType: ClassDataProxy.userType}); | 349 | this._emit(MessageTypes.LOGIN_IN,{userType: ClassDataProxy.userType}); |
| 339 | } | 350 | } |
| 351 | + updateChangeUser(_data){ | ||
| 352 | + loger.log(_data) | ||
| 353 | + let _dataList = _data.returnData.data; | ||
| 354 | + let oneselfInfoLoginName = $('#oneselfInfoLoginName');//登录名 | ||
| 355 | + let oneselfInfoUserName = $('#oneselfInfoUserName');//用户名 | ||
| 356 | + let setPassWord = $('#setPassWord');//密码 | ||
| 357 | + let setMail = $('#setMail');//邮箱 | ||
| 358 | + let setPhone = $('#setPhone');//手机号 | ||
| 359 | + | ||
| 360 | + oneselfInfoLoginName.val(_dataList.loginName); | ||
| 361 | + oneselfInfoUserName.val(_dataList.userName); | ||
| 340 | 362 | ||
| 363 | + setMail.attr('data',_dataList.userEmail); | ||
| 364 | + setPhone.attr('data',_dataList.userMobile); | ||
| 365 | + let userEmail = this.updateEmail(_dataList.userEmail); | ||
| 366 | + let userMobile = this.updateMobile(_dataList.userMobile); | ||
| 367 | + setMail.html(userEmail) | ||
| 368 | + setPhone.html(userMobile) | ||
| 369 | + } | ||
| 370 | + updateEmail(userEmail){ | ||
| 371 | + return userEmail.replace(/(\d{2})\d{2}(\d{1})/, '$1****$2') | ||
| 372 | + } | ||
| 373 | + updateMobile(userMobile){ | ||
| 374 | + return userMobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') | ||
| 375 | + } | ||
| 341 | } | 376 | } |
| 342 | export default LoginOrRegister; | 377 | export default LoginOrRegister; |
| @@ -6,6 +6,7 @@ import Loger from "../Loger"; | @@ -6,6 +6,7 @@ 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 ErrorApe from "./ErrorApe"; | ||
| 9 | 10 | ||
| 10 | const classifyList = `<div class="classifyList {_classifyListR}" id="{_id}"> | 11 | const classifyList = `<div class="classifyList {_classifyListR}" id="{_id}"> |
| 11 | <img class="curriculumListImg" src="{_msgImg}" alt=""> | 12 | <img class="curriculumListImg" src="{_msgImg}" alt=""> |
| @@ -21,17 +22,235 @@ let loger = Loger.getLoger('PC-MyCenterApe'); | @@ -21,17 +22,235 @@ let loger = Loger.getLoger('PC-MyCenterApe'); | ||
| 21 | class MyCenterApe extends Ape { | 22 | class MyCenterApe extends Ape { |
| 22 | constructor() { | 23 | constructor() { |
| 23 | super(); | 24 | super(); |
| 25 | + this.isLocalStorage(); | ||
| 26 | + this.data = 0; | ||
| 24 | this.addEvent(); | 27 | this.addEvent(); |
| 25 | this.init(); | 28 | this.init(); |
| 26 | } | 29 | } |
| 27 | 30 | ||
| 28 | init() { | 31 | init() { |
| 32 | + $('#personageInfo').on('click',this._myCenterBoxHandler.bind(this));//个人中心 | ||
| 29 | 33 | ||
| 34 | + $('#teacherUI li').on('click',this._recordLiHandler.bind(this));//课堂分类 | ||
| 35 | + | ||
| 36 | + $('#updateInputYes').on('click',this._updateInputYesHandler.bind(this));//确定时把输入的信息存入数据中 | ||
| 37 | + | ||
| 38 | + $('#accountInfoSaveBtn').on('click',this._accountInfoSaveBtnHandler.bind(this));//更新用户信息按钮 | ||
| 39 | + | ||
| 40 | + $('#updateInputBoxA').on('click',this._hideInputBox.bind(this));//关闭弹框 | ||
| 41 | + $('#updateInputNo').on('click',this._hideInputBox.bind(this));//关闭弹框 | ||
| 42 | + //修改账户信息 | ||
| 43 | + $('#accountPassWordBtn').on('click',this._accountPassWordBtnHandler.bind(this));//密码 | ||
| 44 | + $('#accountEmailBtn').on('click',this._accountEmailBtnHandler.bind(this));//邮箱 | ||
| 45 | + $('#accountMobilelBtn').on('click',this._accountMobilelBtnHandler.bind(this));//手机号 | ||
| 30 | } | 46 | } |
| 31 | 47 | ||
| 32 | addEvent() { | 48 | addEvent() { |
| 33 | 49 | ||
| 34 | } | 50 | } |
| 51 | + isLocalStorage(){ | ||
| 52 | + $('#teacherMyCenterName').text(ClassDataProxy.loginName); | ||
| 53 | + $('.myCenterContentBox').eq(0).show(); | ||
| 54 | + let newDate = new Date(); | ||
| 55 | + let newHours = newDate.getHours(); | ||
| 56 | + let text = newHours>12?'下午好,':'上午好,' | ||
| 57 | + $('#teacherMyCenterTime').text(text); | ||
| 58 | + $('.recordLi2').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
| 59 | + $('#oneselfInfoLoginName').val( ClassDataProxy.loginName);//登录名 | ||
| 60 | + $('#oneselfInfoUserName').val(ClassDataProxy.monicker);//用户名 | ||
| 61 | + let setMail = $('#setMail');//邮箱 | ||
| 62 | + let setPhone = $('#setPhone');//手机号 | ||
| 63 | + let userEmail = this.updateEmail(ClassDataProxy.userEmail); | ||
| 64 | + let userMobile = this.updateMobile(ClassDataProxy.userMobile); | ||
| 65 | + setMail.attr('data',ClassDataProxy.userEmail); | ||
| 66 | + setPhone.attr('data',ClassDataProxy.userMobile); | ||
| 67 | + setMail.html(userEmail) | ||
| 68 | + setPhone.html(userMobile) | ||
| 69 | + } | ||
| 70 | + _recordLiHandler(evt){ | ||
| 71 | + let ind = $(evt.currentTarget).attr('data'); | ||
| 72 | + $(evt.currentTarget).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
| 73 | + $('.myCenterContentBox').eq(ind).show().siblings().hide(); | ||
| 74 | + switch (parseInt(ind)){ | ||
| 75 | + case 0: | ||
| 76 | + //首页 | ||
| 77 | + break; | ||
| 78 | + case 1: | ||
| 79 | + //我的课程 | ||
| 80 | + break; | ||
| 81 | + case 2: | ||
| 82 | + //我的预约 | ||
| 83 | + break; | ||
| 84 | + case 3: | ||
| 85 | + //个人信息 | ||
| 86 | + this._updatMessage(); | ||
| 87 | + break; | ||
| 88 | + default: | ||
| 89 | + return; | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + _accountInfoSaveBtnHandler(){ | ||
| 93 | + let id = ClassDataProxy.id;//id | ||
| 94 | + | ||
| 95 | + let loginName = ClassDataProxy.loginName;//登录名 | ||
| 96 | + let userMobile = ClassDataProxy.userMobile;//手机号 | ||
| 97 | + let userEmail = ClassDataProxy.userEmail;//邮箱 | ||
| 98 | + let monicker = ClassDataProxy.monicker;//用户名 | ||
| 99 | + let passWord = ClassDataProxy.password;//密码 | ||
| 100 | + | ||
| 101 | + let oneselfInfoLoginName = $('#oneselfInfoLoginName').val();//登录名 | ||
| 102 | + let oneselfInfoUserName = $('#oneselfInfoUserName').val();//用户名 | ||
| 103 | + let oneselfInfoMan = $('#oneselfInfoMan');//性别 | ||
| 104 | + let setPassWord = $('#setPassWord').attr('data');//密码 | ||
| 105 | + let setMail = $('#setMail').attr('data');//邮箱 | ||
| 106 | + let setPhone = $('#setPhone').attr('data');//手机号 | ||
| 107 | + let signInfo = {}; | ||
| 108 | + if(oneselfInfoLoginName != loginName){ | ||
| 109 | + signInfo.loginName = oneselfInfoLoginName; | ||
| 110 | + } | ||
| 111 | + if(oneselfInfoUserName != monicker){ | ||
| 112 | + signInfo.userName = oneselfInfoUserName; | ||
| 113 | + } | ||
| 114 | + if(!setPassWord){ | ||
| 115 | + // signInfo.loginName = oneselfInfoLoginName; | ||
| 116 | + } | ||
| 117 | + if(setMail != userEmail){ | ||
| 118 | + signInfo.userEmail = setMail; | ||
| 119 | + } | ||
| 120 | + if(setPhone != userMobile){ | ||
| 121 | + signInfo.userMobile = setPhone; | ||
| 122 | + } | ||
| 123 | + loger.log(signInfo) | ||
| 124 | + let that = this; | ||
| 125 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/updateUserByUserId/' + id; | ||
| 126 | + loger.log(_url) | ||
| 127 | + $.ajax({ | ||
| 128 | + type: "PUT", | ||
| 129 | + url: _url, | ||
| 130 | + timeout:5000, | ||
| 131 | + headers: {siteId:'markettest', | ||
| 132 | + 'token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IlhXQnJlRU00T0swYTVqUUIyUTFicGtObHlxOUFWbXZkIiwibmFtZSI6ImFkbWluIiwiY29kZSI6MSwiaWF0IjoxNTAzNDUxODU0LCJleHAiOjIyODEwNTE4NTR9.3kTVzKd_jbP7l69nxOpNaFeSjVnnjZkagYMzRB8fjNo'}, | ||
| 133 | + data:signInfo, | ||
| 134 | + success:function(_data){ | ||
| 135 | + loger.log('修改信息成功',_data) | ||
| 136 | + //获取个人信息数据 | ||
| 137 | + if(_data && _data.code == 200){ | ||
| 138 | + loger.log('修改信息成功',_data) | ||
| 139 | + ErrorApe.showWarnError('修改信息成功'); | ||
| 140 | + ClassDataProxy.loginName =_data.returnData.data.loginName; | ||
| 141 | + ClassDataProxy.monicker = _data.returnData.data.userName; | ||
| 142 | + ClassDataProxy.userEmail = _data.returnData.data.userEmail; | ||
| 143 | + ClassDataProxy.userMobile = _data.returnData.data.userMobile; | ||
| 144 | + window.localStorage.setItem('loginName', ClassDataProxy.loginName); | ||
| 145 | + window.localStorage.setItem('monicker', ClassDataProxy.monicker); | ||
| 146 | + window.localStorage.setItem('userEmail', ClassDataProxy.userEmail); | ||
| 147 | + window.localStorage.setItem('userMobile', ClassDataProxy.userMobile); | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + }, | ||
| 151 | + error:function(error){ | ||
| 152 | + // alert('老师界面获取数据失败') | ||
| 153 | + loger.log(error,'修改信息失败') | ||
| 154 | + } | ||
| 155 | + }) | ||
| 156 | + } | ||
| 157 | + clearLocalStorage(){ | ||
| 158 | + window.localStorage.clear(); | ||
| 159 | + ClassDataProxy.userType = ClassDataProxy.USER_TYPE_0; | ||
| 160 | + ClassDataProxy.loginName =""; | ||
| 161 | + ClassDataProxy.password ="" | ||
| 162 | + ClassDataProxy.token =""; | ||
| 163 | + ClassDataProxy.status = false; | ||
| 164 | + | ||
| 165 | + } | ||
| 166 | + //个人信息 | ||
| 167 | + _updatMessage(){ | ||
| 168 | + $('#oneselfInfoLoginName').val( ClassDataProxy.loginName);//登录名 | ||
| 169 | + $('#oneselfInfoUserName').val(ClassDataProxy.monicker);//用户名 | ||
| 170 | + } | ||
| 171 | + //修改密码 | ||
| 172 | + _accountPassWordBtnHandler(){ | ||
| 173 | + this.data = 0; | ||
| 174 | + this._showInputBox(this.data); | ||
| 175 | + } | ||
| 176 | + //修改邮箱 | ||
| 177 | + _accountEmailBtnHandler(){ | ||
| 178 | + this.data = 1; | ||
| 179 | + this._showInputBox(this.data); | ||
| 180 | + } | ||
| 181 | + //修改手机号 | ||
| 182 | + _accountMobilelBtnHandler(){ | ||
| 183 | + this.data = 2; | ||
| 184 | + this._showInputBox(this.data); | ||
| 185 | + loger.log(this.data) | ||
| 186 | + } | ||
| 187 | + _myCenterBoxHandler(){ | ||
| 188 | + loger.log(ClassDataProxy.userType) | ||
| 189 | + if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){ | ||
| 190 | + $('#slideshow').hide(); | ||
| 191 | + $('#defaultBox').hide(); | ||
| 192 | + $('#classifyListBox').hide(); | ||
| 193 | + | ||
| 194 | + } | ||
| 195 | + $('#myCenterBox').show(); | ||
| 196 | + } | ||
| 197 | + _updateInputYesHandler(evt){ | ||
| 198 | + let updateInput = $('#updateInput').val(); | ||
| 199 | + switch (parseInt(this.data)){ | ||
| 200 | + case 0: | ||
| 201 | + //密码 | ||
| 202 | + let reg = /^[0-9a-zA-Z]{8,12}$/; | ||
| 203 | + if(!updateInput || !(reg.test(updateInput))){ | ||
| 204 | + ErrorApe.showWarnError('密码格式不正确,请重新输入'); | ||
| 205 | + return; | ||
| 206 | + } | ||
| 207 | + $('#setPassWord').attr('data',updateInput); | ||
| 208 | + this._hideInputBox(); | ||
| 209 | + break; | ||
| 210 | + case 1: | ||
| 211 | + //邮箱 | ||
| 212 | + let filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; | ||
| 213 | + if(!updateInput || !(filter.test(updateInput))){ | ||
| 214 | + ErrorApe.showWarnError('邮箱格式不正确,请重新输入'); | ||
| 215 | + return; | ||
| 216 | + } | ||
| 217 | + $('#setMail').attr('data',updateInput); | ||
| 218 | + $('#setMail').html(this.updateEmail(updateInput)) | ||
| 219 | + this._hideInputBox(); | ||
| 220 | + break; | ||
| 221 | + case 2: | ||
| 222 | + //手机号 | ||
| 223 | + let reg1 = /^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\d{8}$/; | ||
| 224 | + let regPhone = "^1[3|4|5|8][0-9]\\d{8}$"; | ||
| 225 | + let re = new RegExp(regPhone); | ||
| 226 | + if(!updateInput || !(re.test(updateInput))){ | ||
| 227 | + ErrorApe.showWarnError('手机格式不正确,请重新输入'); | ||
| 228 | + return; | ||
| 229 | + } | ||
| 230 | + $('#setPhone').attr('data',updateInput); | ||
| 231 | + $('#setPhone').html(this.updateMobile(updateInput)) | ||
| 232 | + this._hideInputBox(); | ||
| 233 | + break; | ||
| 234 | + default: | ||
| 235 | + return; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + } | ||
| 239 | + _hideInputBox(){ | ||
| 240 | + $('#updateInput').val(''); | ||
| 241 | + $('#updateInputShade').hide(); | ||
| 242 | + } | ||
| 243 | + _showInputBox(ind){ | ||
| 244 | + let arr = ['请输入新密码 :','请输入新邮箱 :','请输入新手机号 :'] | ||
| 245 | + $('#updateInputShade').show(); | ||
| 246 | + $('#updateInputText').text(arr[ind]) | ||
| 247 | + } | ||
| 248 | + updateEmail(userEmail){ | ||
| 249 | + return userEmail.replace(/(\d{2})\d{2}(\d{1})/, '$1****$2') | ||
| 250 | + } | ||
| 251 | + updateMobile(userMobile){ | ||
| 252 | + return userMobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') | ||
| 253 | + } | ||
| 35 | //工具类 | 254 | //工具类 |
| 36 | _format(str, obj) { | 255 | _format(str, obj) { |
| 37 | return str.replace(/\{(\w+)\}/g, function (match, group, index) { | 256 | return str.replace(/\{(\w+)\}/g, function (match, group, index) { |
| @@ -35,8 +35,6 @@ class Slideshow extends Ape { | @@ -35,8 +35,6 @@ class Slideshow extends Ape { | ||
| 35 | this._imgReload(); | 35 | this._imgReload(); |
| 36 | } | 36 | } |
| 37 | slideImg(){ | 37 | slideImg(){ |
| 38 | - | ||
| 39 | - | ||
| 40 | let oli = document.getElementById('dots').getElementsByTagName("li"); | 38 | let oli = document.getElementById('dots').getElementsByTagName("li"); |
| 41 | let _num = 0; | 39 | let _num = 0; |
| 42 | 40 | ||
| @@ -49,106 +47,28 @@ class Slideshow extends Ape { | @@ -49,106 +47,28 @@ class Slideshow extends Ape { | ||
| 49 | this.len = size; | 47 | this.len = size; |
| 50 | 48 | ||
| 51 | this._timer = setInterval(function(){ | 49 | this._timer = setInterval(function(){ |
| 50 | + | ||
| 52 | li[_num].style.display="none"; | 51 | li[_num].style.display="none"; |
| 53 | _num=++_num==size ? 0:_num; | 52 | _num=++_num==size ? 0:_num; |
| 54 | li[_num].style.display="inline-block"; | 53 | li[_num].style.display="inline-block"; |
| 55 | // $("#motionMapBox").stop().animate({left:-this.num*this.windowWidth},500); | 54 | // $("#motionMapBox").stop().animate({left:-this.num*this.windowWidth},500); |
| 56 | - $("#dots li").eq(_num).addClass('active').siblings().removeClass('active'); | 55 | + // $("#dots li").eq(_num).addClass('active').siblings().removeClass('active'); |
| 57 | 56 | ||
| 58 | },3000);//切换时间 | 57 | },3000);//切换时间 |
| 59 | } | 58 | } |
| 60 | _mouseenterHandler(){ | 59 | _mouseenterHandler(){ |
| 61 | - clearInterval(this._timer); | 60 | + // clearInterval(this._timer); |
| 62 | } | 61 | } |
| 63 | _mouseleaveHandler(){ | 62 | _mouseleaveHandler(){ |
| 64 | - setInterval(this._timer); | 63 | + // setInterval(this._timer); |
| 65 | } | 64 | } |
| 66 | - _move(){ | ||
| 67 | - let li = document.getElementById('motionMapBox').getElementsByTagName("li"); | ||
| 68 | - this._timer = setInterval(function(){ | ||
| 69 | - li[_num].style.display="none"; | ||
| 70 | - _num=++_num==size ? 0:_num; | ||
| 71 | - li[_num].style.display="inline-block"; | ||
| 72 | - // $("#motionMapBox").stop().animate({left:-this.num*this.windowWidth},500); | ||
| 73 | - $("#dots li").eq(_num).addClass('active').siblings().removeClass('active'); | ||
| 74 | - | ||
| 75 | - },3000);//切换时间 | ||
| 76 | - } | ||
| 77 | - slideImg(){ | ||
| 78 | - | ||
| 79 | - /* let i = 0; | ||
| 80 | - let width = $('.slidesMap').width(); | ||
| 81 | - let clone=$(".slidesMap").first().clone(); | ||
| 82 | - $("#motionMapBox").append(clone); | ||
| 83 | - let size = document.getElementById('motionMapBox').getElementsByTagName("li").length; | ||
| 84 | - for(let j=0;j<size-1;j++){ | ||
| 85 | - $("#dots").append("<li></li>"); | ||
| 86 | - } | ||
| 87 | - $("#dots li").first().addClass('active'); | ||
| 88 | - | ||
| 89 | - $(".dots li").hover(function(){ | ||
| 90 | - let index=$(this).index(); | ||
| 91 | - i=index; | ||
| 92 | - $(".motionMapBox").stop().animate({left:-index*width},500); | ||
| 93 | - $(this).addClass('active').siblings().removeClass('active'); | ||
| 94 | - })*/ | ||
| 95 | - /* let t=setInterval(function(){ | ||
| 96 | - i++; | ||
| 97 | - move(); | ||
| 98 | - },2000); | ||
| 99 | - | ||
| 100 | - //对banner定时器的操作 | ||
| 101 | - $(".slideshow").hover(function(){ | ||
| 102 | - clearInterval(t); | ||
| 103 | - },function(){ | ||
| 104 | - t=setInterval(move,2000); | ||
| 105 | - })*/ | ||
| 106 | 65 | ||
| 107 | - | ||
| 108 | - /*function move(){ | ||
| 109 | - if(i==size){ | ||
| 110 | - $("#motionMapBox").css({left:0}); | ||
| 111 | - i=1; | ||
| 112 | - } | ||
| 113 | - if(i==-1){ | ||
| 114 | - $("#motionMapBox").css({left:-(size-1)*width}); | ||
| 115 | - i=size-2; | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - $("#motionMapBox").stop().animate({left:-i*width},500); | ||
| 119 | - | ||
| 120 | - if(i==size-1){ | ||
| 121 | - $("#dots li").eq(0).addClass('active').siblings().removeClass('active'); | ||
| 122 | - }else{ | ||
| 123 | - $("#dots li").eq(i).addClass('active').siblings().removeClass('active'); | ||
| 124 | - } | ||
| 125 | - }*/ | ||
| 126 | - | ||
| 127 | - } | ||
| 128 | _imgReload(){ | 66 | _imgReload(){ |
| 129 | let _windowWidth = $("body").width(); | 67 | let _windowWidth = $("body").width(); |
| 130 | this.windowWidth = _windowWidth; | 68 | this.windowWidth = _windowWidth; |
| 131 | $('.slidesMap').css({width:_windowWidth + "px"}); | 69 | $('.slidesMap').css({width:_windowWidth + "px"}); |
| 132 | $('.slidesImg').css({width:_windowWidth + "px"}); | 70 | $('.slidesImg').css({width:_windowWidth + "px"}); |
| 133 | 71 | ||
| 134 | - /* let imgHeight = 0; | ||
| 135 | - | ||
| 136 | - let wtmp = $("body").width(); | ||
| 137 | - | ||
| 138 | - | ||
| 139 | - $("#motionMapBox li").each(function(){ | ||
| 140 | - | ||
| 141 | - $(this).css({width:wtmp + "px"}); | ||
| 142 | - | ||
| 143 | - }); | ||
| 144 | - | ||
| 145 | - $(".slidesImg").each(function(){ | ||
| 146 | - | ||
| 147 | - $(this).css({width:wtmp + "px"}); | ||
| 148 | - | ||
| 149 | - imgHeight = $(this).height(); | ||
| 150 | - | ||
| 151 | - });*/ | ||
| 152 | $('#motionMapBox').width($(".slidesMap").length * _windowWidth) | 72 | $('#motionMapBox').width($(".slidesMap").length * _windowWidth) |
| 153 | } | 73 | } |
| 154 | 74 |
| @@ -35,8 +35,6 @@ class SubscribeApe extends Ape { | @@ -35,8 +35,6 @@ class SubscribeApe extends Ape { | ||
| 35 | let status = $(evt.currentTarget).attr('data'); | 35 | let status = $(evt.currentTarget).attr('data'); |
| 36 | let id = $('#lanclassBox').attr('data'); | 36 | let id = $('#lanclassBox').attr('data'); |
| 37 | this.id = id; | 37 | this.id = id; |
| 38 | - | ||
| 39 | - loger.log('显示预约信息',parseInt(status)) | ||
| 40 | $.ajax({ | 38 | $.ajax({ |
| 41 | type: "POST", | 39 | type: "POST", |
| 42 | url: _url, | 40 | url: _url, |
| @@ -7,8 +7,6 @@ import Ape from "./Ape"; | @@ -7,8 +7,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 | 9 | ||
| 10 | -//import lyzCalendar from "css/lyz.calendar.css"; | ||
| 11 | - | ||
| 12 | let loger = Loger.getLoger('PC-TeacherDetailApe'); | 10 | let loger = Loger.getLoger('PC-TeacherDetailApe'); |
| 13 | 11 | ||
| 14 | const classifyList = `<div class="classifyList {_classifyListR}" data="1" id="{_id}"> | 12 | const classifyList = `<div class="classifyList {_classifyListR}" data="1" id="{_id}"> |
| @@ -37,30 +35,12 @@ class TeacherDetailApe extends Ape { | @@ -37,30 +35,12 @@ class TeacherDetailApe extends Ape { | ||
| 37 | 35 | ||
| 38 | $('#classifyListBox').on('click','.pageNumBtn',this._pageNumBtnHandler.bind(this));//点击翻页 | 36 | $('#classifyListBox').on('click','.pageNumBtn',this._pageNumBtnHandler.bind(this));//点击翻页 |
| 39 | 37 | ||
| 40 | - $('#teacherUI li').on('click',this._recordLiHandler.bind(this));//课堂分类 | ||
| 41 | - | ||
| 42 | - | ||
| 43 | } | 38 | } |
| 44 | 39 | ||
| 45 | addEvent() { | 40 | addEvent() { |
| 46 | 41 | ||
| 47 | } | 42 | } |
| 48 | isLocalStorage(){ | 43 | isLocalStorage(){ |
| 49 | - if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){ | ||
| 50 | - $('#myCenterBox').show(); | ||
| 51 | - $('#teacherMyCenterName').text(ClassDataProxy.loginName); | ||
| 52 | - $('.myCenterContentBox').eq(0).show(); | ||
| 53 | - let newDate = new Date(); | ||
| 54 | - let newHours = newDate.getHours(); | ||
| 55 | - let text = newHours>12?'下午好,':'上午好,' | ||
| 56 | - $('#teacherMyCenterTime').text(text); | ||
| 57 | - loger.log('老师名字',ClassDataProxy.loginName) | ||
| 58 | - } | ||
| 59 | - } | ||
| 60 | - _recordLiHandler(evt){ | ||
| 61 | - let ind = $(evt.currentTarget).attr('data'); | ||
| 62 | - $(evt.currentTarget).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
| 63 | - $('.myCenterContentBox').eq(ind).show().siblings().hide(); | ||
| 64 | } | 44 | } |
| 65 | _teacherBtnHandler(evt){ | 45 | _teacherBtnHandler(evt){ |
| 66 | this._clearListContent(); | 46 | this._clearListContent(); |
| @@ -133,7 +113,7 @@ class TeacherDetailApe extends Ape { | @@ -133,7 +113,7 @@ class TeacherDetailApe extends Ape { | ||
| 133 | } | 113 | } |
| 134 | }) | 114 | }) |
| 135 | } | 115 | } |
| 136 | - //清楚列表数据 | 116 | + //清除列表数据 |
| 137 | _clearListContent(){ | 117 | _clearListContent(){ |
| 138 | let classifyListContent = $('#classifyListContent'); | 118 | let classifyListContent = $('#classifyListContent'); |
| 139 | classifyListContent.empty(); | 119 | classifyListContent.empty(); |
| @@ -225,13 +205,9 @@ class TeacherDetailApe extends Ape { | @@ -225,13 +205,9 @@ class TeacherDetailApe extends Ape { | ||
| 225 | $('#classifyListBox').show(); | 205 | $('#classifyListBox').show(); |
| 226 | $('#teacherDetailBox').hide(); | 206 | $('#teacherDetailBox').hide(); |
| 227 | $('#lanclassBox').hide(); | 207 | $('#lanclassBox').hide(); |
| 208 | + $('#myCenterBox').hide(); | ||
| 228 | } | 209 | } |
| 229 | - //老师点击老师模块 | ||
| 230 | - teacherClickTeacher(){ | ||
| 231 | - loger.log('老师点击老师列表') | ||
| 232 | - $('#classifyListBox').hide(); | ||
| 233 | - $('#myCenterBox').show(); | ||
| 234 | - } | 210 | + |
| 235 | //工具类 | 211 | //工具类 |
| 236 | _format(str, obj) { | 212 | _format(str, obj) { |
| 237 | return str.replace(/\{(\w+)\}/g, function (match, group, index) { | 213 | return str.replace(/\{(\w+)\}/g, function (match, group, index) { |
| @@ -38,7 +38,7 @@ let _subscribeApe; | @@ -38,7 +38,7 @@ let _subscribeApe; | ||
| 38 | 38 | ||
| 39 | class Main { | 39 | class Main { |
| 40 | constructor() { | 40 | constructor() { |
| 41 | - this.clientVersion="v1.6.6.20170904"; | 41 | + this.clientVersion="v1.6.7.20170904"; |
| 42 | loger.warn("clientVersion:"+this.clientVersion); | 42 | loger.warn("clientVersion:"+this.clientVersion); |
| 43 | 43 | ||
| 44 | let locationProtocol= location.protocol; | 44 | let locationProtocol= location.protocol; |
| @@ -181,9 +181,19 @@ class Main { | @@ -181,9 +181,19 @@ class Main { | ||
| 181 | let userType = window.localStorage.getItem('userType')||0; | 181 | let userType = window.localStorage.getItem('userType')||0; |
| 182 | let loginName = window.localStorage.getItem('loginName')|| ''; | 182 | let loginName = window.localStorage.getItem('loginName')|| ''; |
| 183 | let id = window.localStorage.getItem('id')|| ''; | 183 | let id = window.localStorage.getItem('id')|| ''; |
| 184 | + | ||
| 185 | + let userMobile = window.localStorage.getItem('userMobile')|| ''; | ||
| 186 | + let userEmail = window.localStorage.getItem('userEmail')|| ''; | ||
| 187 | + let monicker = window.localStorage.getItem('monicker')|| ''; | ||
| 188 | + | ||
| 184 | ClassDataProxy.userType = parseInt(userType); | 189 | ClassDataProxy.userType = parseInt(userType); |
| 185 | ClassDataProxy.loginName = loginName; | 190 | ClassDataProxy.loginName = loginName; |
| 186 | ClassDataProxy.id = id; | 191 | ClassDataProxy.id = id; |
| 192 | + //个人信息 | ||
| 193 | + ClassDataProxy.userMobile = userMobile; | ||
| 194 | + ClassDataProxy.userEmail = userEmail; | ||
| 195 | + ClassDataProxy.monicker = monicker; | ||
| 196 | + | ||
| 187 | loger.log('进入课堂时显示的type值',ClassDataProxy.userType) | 197 | loger.log('进入课堂时显示的type值',ClassDataProxy.userType) |
| 188 | 198 | ||
| 189 | switch (parseInt(userType)){ | 199 | switch (parseInt(userType)){ |
| @@ -216,6 +226,7 @@ class Main { | @@ -216,6 +226,7 @@ class Main { | ||
| 216 | $('#header_seek').hide(); | 226 | $('#header_seek').hide(); |
| 217 | $('#androidDownload').hide(); | 227 | $('#androidDownload').hide(); |
| 218 | $('#classManagementBox').show(); | 228 | $('#classManagementBox').show(); |
| 229 | + $('#myCenterBox').hide(); | ||
| 219 | } | 230 | } |
| 220 | _teacherHome(){ | 231 | _teacherHome(){ |
| 221 | $('#slideshow').hide(); | 232 | $('#slideshow').hide(); |
| @@ -226,7 +237,9 @@ class Main { | @@ -226,7 +237,9 @@ class Main { | ||
| 226 | $('#androidDownload').hide(); | 237 | $('#androidDownload').hide(); |
| 227 | $('#classManagementBox').hide(); | 238 | $('#classManagementBox').hide(); |
| 228 | $('#classifyListBox').hide(); | 239 | $('#classifyListBox').hide(); |
| 229 | - $('#myCenterBox').show(); | 240 | + $('#myCenterBox').hide(); |
| 241 | + $('.myCenterContentBox').eq(0).show(); | ||
| 242 | + $('.recordLi2').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
| 230 | } | 243 | } |
| 231 | _student(){ | 244 | _student(){ |
| 232 | $('#slideshow').show(); | 245 | $('#slideshow').show(); |
| @@ -235,6 +248,9 @@ class Main { | @@ -235,6 +248,9 @@ class Main { | ||
| 235 | $('#classifyListBox').hide(); | 248 | $('#classifyListBox').hide(); |
| 236 | $('#teacherDetailBox').hide(); | 249 | $('#teacherDetailBox').hide(); |
| 237 | $('#lanclassBox').hide(); | 250 | $('#lanclassBox').hide(); |
| 251 | + $('#myCenterBox').hide(); | ||
| 252 | + $('.myCenterContentBox').eq(0).show(); | ||
| 253 | + $('.recordLi2').eq(0).addClass('recordLiCheck').siblings().removeClass('recordLiCheck'); | ||
| 238 | } | 254 | } |
| 239 | //获取国际化语言 | 255 | //获取国际化语言 |
| 240 | _localConfig() { | 256 | _localConfig() { |
| @@ -2,44 +2,6 @@ class ClassDataProxy { | @@ -2,44 +2,6 @@ class ClassDataProxy { | ||
| 2 | constructor() { | 2 | constructor() { |
| 3 | } | 3 | } |
| 4 | 4 | ||
| 5 | - //获取课堂初始化的参数 | ||
| 6 | - static getInitClassData() { | ||
| 7 | - let _data = {}; | ||
| 8 | - _data.classId = this.classId; | ||
| 9 | - _data.portal = this.portal; | ||
| 10 | - _data.userRole = this.userRole; | ||
| 11 | - _data.userName = this.userName; | ||
| 12 | - _data.userId = this.userId; | ||
| 13 | - return _data; | ||
| 14 | - } | ||
| 15 | - | ||
| 16 | - //获取加入课堂的参数 | ||
| 17 | - static getJoinClassData() { | ||
| 18 | - let _data = {}; | ||
| 19 | - _data.password = this.password; | ||
| 20 | - _data.userName = this.userName; | ||
| 21 | - _data.autoLogin = this.autoLogin; | ||
| 22 | - return _data; | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - //生成时间戳毫秒 | ||
| 26 | - static creatTimestamp() { | ||
| 27 | - let time = new Date().getTime(); | ||
| 28 | - return time; | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - //生成时间戳 string | ||
| 32 | - static creatTimestampStr() { | ||
| 33 | - let curTime = new Date(); | ||
| 34 | - let timeStr = "" + curTime.getFullYear() + "-"; | ||
| 35 | - timeStr += (curTime.getMonth() + 1) + "-"; | ||
| 36 | - timeStr += curTime.getDate() + "-"; | ||
| 37 | - timeStr += curTime.getHours() + "-"; | ||
| 38 | - timeStr += curTime.getMinutes() + "-"; | ||
| 39 | - timeStr += curTime.getSeconds(); | ||
| 40 | - return timeStr; | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | //把时间戳转为时间格式 | 5 | //把时间戳转为时间格式 |
| 44 | static timestampToDateTime(value) { | 6 | static timestampToDateTime(value) { |
| 45 | var theTime = parseInt(value);// 秒 | 7 | var theTime = parseInt(value);// 秒 |
| @@ -266,6 +228,10 @@ ClassDataProxy.token =""; | @@ -266,6 +228,10 @@ ClassDataProxy.token =""; | ||
| 266 | ClassDataProxy.status = false; | 228 | ClassDataProxy.status = false; |
| 267 | ClassDataProxy.id = ''; | 229 | ClassDataProxy.id = ''; |
| 268 | 230 | ||
| 231 | +ClassDataProxy.userMobile = ''; | ||
| 232 | +ClassDataProxy.userEmail = ''; | ||
| 233 | +ClassDataProxy.monicker = ""; | ||
| 234 | + | ||
| 269 | ClassDataProxy.USER_TYPE_0 = 0; | 235 | ClassDataProxy.USER_TYPE_0 = 0; |
| 270 | ClassDataProxy.USER_TYPE_1 = 1; | 236 | ClassDataProxy.USER_TYPE_1 = 1; |
| 271 | ClassDataProxy.USER_TYPE_2 = 2; | 237 | ClassDataProxy.USER_TYPE_2 = 2; |
-
请 注册 或 登录 后发表评论