董佳音

修改登录显示个人信息数据-----0927

... ... @@ -373,7 +373,7 @@ body{
float: left;
width: 100%;
font-size: 22px;
margin: 60px 0 26px 0;
margin-top: 60px;
}
.classifyListContent{
width: 100%;
... ... @@ -696,6 +696,12 @@ body{
float: left;
margin-right:20px;
}
.classManagementRightContent{
height:380px;
}
.classManagementRightContent0{
height: 420px;
}
.recordUl{
width: 200px;
text-align: center;
... ... @@ -715,8 +721,13 @@ body{
.recordLiCheck{
color: #3498db;
}
.classManagementRightMian{
float: left;
height: 535px;
}
.classManagementRight{
width: 998px;
height: 535px;
float: left;
display: none;
}
... ... @@ -811,9 +822,6 @@ body{
font-size: 12px;
text-align: center;
}
.classManagementRightContent{
height: 420px;
}
.t_box{
border:1px solid #e6e6e6;
border-bottom: none;
... ... @@ -916,9 +924,6 @@ body{
position: absolute;
left:0;
top:0;
right: 0;
bottom: 0;
margin: 0 auto;
background: #fff;
}
.createClassHandler{
... ... @@ -1024,7 +1029,7 @@ body{
width: 125px;
padding-right: 5px;
text-align: right;
line-height: 32px;
line-height: 30px;
}
.step_page1_widget{
margin-left: 125px;
... ...
... ... @@ -18,6 +18,7 @@
<li class="header_listMsg" id="liveBtn" data="最新直播课程">直播课堂</li>
<li class="header_listMsg header_listTeacherMsg" id="lanclassBtn" data="最新互动课程">互动课堂</li>
<li class="header_listMsg header_listTeacherMsg" id="teacherBtn" data="推荐老师">老师</li>
<li class="header_listMsg header_listTeacherMsg" id="homeCenterBtn">个人中心</li>
</ul>
<div class="header_seek" id="header_seek">
<input type="text" class="header_seekInput">
... ... @@ -414,7 +415,7 @@
<div class="liveInfoCenterLiveCase liveInfoCenterLiveEnd" id="liveInfoCenterLiveEnd0"></div>
</div>
</div>
<div class="classManagementRightContent" id="courseContent0">
<div class="classManagementRightContent classManagementRightContent0" id="courseContent0">
</div>
<div class="classHandlerPageBox" id="classHandlerPageBox0">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
... ... @@ -557,7 +558,7 @@
<img class="liveInfoRightInputBtn" id="liveInfoRightInputBtn4" src="images/nav_link_14.png" alt="">
</div>
</div>
<div class="classManagementRightContent" id="courseContent4">
<div class="classManagementRightContent classManagementRightContent0" id="courseContent4">
</div>
<div class="classHandlerPageBox" id="classHandlerPageBox4">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
... ... @@ -604,7 +605,7 @@
<div class="liveInfoCenterLiveCase" id="liveInfoCenterLiveEnd5"></div>
</div>
</div>
<div class="classManagementRightContent" id="courseContent5">
<div class="classManagementRightContent classManagementRightContent0" id="courseContent5">
</div>
<div class="classHandlerPageBox" id="classHandlerPageBox5">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
... ... @@ -653,45 +654,14 @@
</div>
<div class="classManagementRightContent" id="courseContent6">
</div>
<div class="classHandlerPageBox" id="classHandlerPageBox6">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td height="60" colspan="11" class="tr_bottom" style="">
<span class="classHandlerPageMsg" id="classHandlerPageMsg6" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span>
<ul class="classHandlerPageInfoBox">
<li class="classHandlerPageInfo">
<span class="classHandlerHomePage" id="classHandlerHomePage6">首页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerUpPage" id="classHandlerUpPage6">上一页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerDownPage" id="classHandlerDownPage6">下一页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerEndPage" id="classHandlerEndPage6">尾页</span>
</li>
<li class="classHandlerPageInfo">
<input id="classHandlerPageInfoInput6" class="classHandlerPageInfoInput" type="text">
</li>
<li class="classHandlerPageInfo classHandlerPageInfoCheck">
<span id="classHandlerSpecificPage6">GO</span>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="classManagementRight" id="classManagementRight7">
<div class="classManagementRightTitle" id="classManagementRightTitle7">
</div>
<div class="classManagementRightContent" id="courseContent7">
<div class="classManagementRightContent classManagementRightContent0" id="courseContent7">
</div>
<div class="classHandlerPageBox" id="classHandlerPageBox7">
<div class="classHandlerPageBox" id="classHandlerPageBox7" style="display:none">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
... ... @@ -1400,8 +1370,8 @@
<img class="teacherMyCenterImg" src="images/u373.png" alt="">
<p class="teacherMyCenterInfoBox">
<span class="teacherMyCenterInfo" id="teacherMyCenterTime">上午好,</span>
<span id="teacherMyCenterName">小明同学</span>
<span id="teacherMyCenterStatus">小明同学</span>
<span id="teacherMyCenterName"></span>
<span id="teacherMyCenterStatus"></span>
</p>
</div>
<div class="teacherMyCenter2">
... ... @@ -1429,8 +1399,8 @@
<div class="myCenterContentTitleBox">
<ul class="liveInfoLeft" id="teacherInfoList">
<li class="liveInfoLeftLi liveInfoLeftLiCheck" data="1">正在直播</li>
<li class="liveInfoLeftLi" data="0">未开始</li>
<li class="liveInfoLeftLi" data="2">已结束</li>
<li class="liveInfoLeftLi" data="2">未开始</li>
<li class="liveInfoLeftLi" data="4">已结束</li>
</ul>
</div>
<div class="myCenterContentList" id="teacherMyCenterContentList">
... ... @@ -1477,17 +1447,7 @@
</ul>
</div>
<div class="myCenterContentList" id="studentMyCenterContentList">
<div class="myCenterTopRightContent">&nbsp;&nbsp;暂无课程!</div>
<div class="classifyListMyCenter">
<div class="myCenterContentMask">
<button class="myCenterContentMaskBtn btnHover" data="1560071471">进入学习</button>
</div>
<img class="myCenterContentListImg" src="images/u373.png" alt="">
<p class="myCenterContentListTit">初一英语阅读理解习题课</p>
<p class="myCenterContentListTit1">主讲人:方圆</p>
<p class="myCenterContentMin">45min</p>
<span class="myCenterContentTimer">2016-09-12</span>
</div>
</div>
</div>
</div>
... ... @@ -1567,6 +1527,37 @@
<div class="teacherCorrelatedInfoBtn">更多课程</div>
</div>
</div>
<div class="classHandlerPageBox" id="coursePageBox">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td height="60" colspan="11" class="tr_bottom" style="">
<span class="classHandlerPageMsg" id="coursePageMsg" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span>
<ul class="classHandlerPageInfoBox">
<li class="classHandlerPageInfo">
<span class="classHandlerHomePage" id="courseHomePage">首页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerUpPage" id="courseUpPage">上一页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerDownPage" id="courseDownPage">下一页</span>
</li>
<li class="classHandlerPageInfo">
<span class="classHandlerEndPage" id="courseEndPage">尾页</span>
</li>
<li class="classHandlerPageInfo">
<input id="coursePageInfoInput" class="classHandlerPageInfoInput" type="text">
</li>
<li class="classHandlerPageInfo classHandlerPageInfoCheck">
<span id="courseSpecificPage">GO</span>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!--个人信息-->
<div class="myCenterContentBox myCenterContentBox1">
... ... @@ -1586,9 +1577,9 @@
</li>
<li class="oneselfInfoList">
<label class="oneselfInfoHeader">年龄</label>
<input class="oneselfInfoInput" id="oneselfInfoAge" type="text">
<input class="oneselfInfoInput" id="oneselfInfoAge" placeholder="保密" type="text">
</li>
<li class="oneselfInfoList">
<li class="oneselfInfoList" style="display: none">
<label class="oneselfInfoHeader">性别</label>
<input class="allowPublic allowPublicDetail" id="oneselfInfoMan" name="videoQuality" type="radio" value="0" checked="checked">
<label for="oneselfInfoMan">
... ... @@ -1724,7 +1715,7 @@
<div class="userSignBox" id="removeHandlerBox" style="display: none;">
<div class="usersign removeHandler" id="removeHandler">
<a href="javascript: void(0)" id="removeHandlerA" class="usersignA iconfont">&#xe638;</a>
<div class="removeHandlerContent">
<div class="removeHandlerContent" id="removeHandlerContent">
确定删除吗?
</div>
<div class="removeHandlerBtn">
... ...
... ... @@ -7,7 +7,7 @@ function MessageTypes() {}
//--------------------事件相关的定义--------------------------------------
//登陆相关
MessageTypes.LOGIN_OUT= "login_out"; //更新用户退出
MessageTypes.LOGIN_IN= "login_in"; //更新用户退出
MessageTypes.LOGIN_IN= "login_in"; //更新用户登录
//header按钮
... ... @@ -31,8 +31,9 @@ MessageTypes.ORDER_FINISH= "order_finish"; //预约成功
MessageTypes.LOGIN_MYCENTER= "login_mycenter"; //预约成功
MessageTypes.MY_COURSES= "my_courses"; //我的课程
MessageTypes.MY_BOOKINGS= "my_bookings"; //我的预约
MessageTypes.ROLE_MESSAGE= "role_message"; //我的信息
MessageTypes.IS_COLLECT= "is_collect"; //是否收藏
export default MessageTypes;
... ...
... ... @@ -30,7 +30,7 @@ class CollectApe extends Ape {
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/addStudentMeeting';
let status = $(evt.currentTarget).attr('data');
let id = $('#lanclassBox').attr('data');
loger.log('收藏数据信息',status)
loger.log('收藏数据信息',status,id)
let data = {siteId:ClassDataProxy.siteId,
"studentId":ClassDataProxy.id,
"status":parseInt(status),
... ... @@ -48,19 +48,28 @@ class CollectApe extends Ape {
_collectYesHandler(evt){
let that = this;
let status = $(evt.currentTarget).attr('data');
let id = $('#lanclassBox').attr('data');
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/updateStudentMeetingBySite/'+id;
let data = {
status:7
}
this.detailPage(_url,data,function(_data){
if(_data && _data.code == 200){
that._collectYesClick();
ErrorApe.showWarnError('取消收藏');
loger.log('收藏数据信息',_data)
$.ajax({
type: "PUT",
url: _url,
timeout:5000,
headers: {
siteId:ClassDataProxy.siteId,
'token':ClassDataProxy.token
},
data:{status:parseInt(status)},
success:function(_data){
//获取课堂数据
if(_data && _data.code == 200){
that._collectYesClick();
ClassDataProxy.getMarginTopHandler($('#warnHintBox'));
ErrorApe.showWarnError('取消收藏');
}
},
error:function(error){
console.log(error,'失败')
}
})
}
detailPage(url,data,callback){
... ... @@ -73,7 +82,8 @@ class CollectApe extends Ape {
'token':ClassDataProxy.token},
success:function(_data){
//获取我的课程数据
if(_data && _data.code == 200){
loger.log('收藏数据信息',_data)
if(_data && _data.code){
if(callback){
callback(_data);
}
... ... @@ -91,6 +101,21 @@ class CollectApe extends Ape {
}
})
}
isCollect(id){
let that = this;
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/addStudentMeeting';
let data = {siteId:ClassDataProxy.siteId,
"studentId":ClassDataProxy.id,
"status":6,
"meetingId":id
}
this.detailPage(_url,data,function(_data){
loger.log('您已收藏这堂课',_data)
if(_data.returnData.data.msg == '您已收藏这堂课'){
that._collectNoClick();
}
})
}
toLogin(){
$('#userLoginBox').show();
}
... ...
... ... @@ -65,6 +65,7 @@ class CreateClassApe extends Ape {
$('#meeting_endhour').find("option[value = '"+ hoursEnd +"']").attr("selected","selected");
}
_createClassBtnHandler(){
ClassDataProxy.getMarginTopHandler($('#createClass'));//显示预约成功弹框
$('#createClassBox').show();
$('#scheduleForm1').show();
$('#scheduleForm2').hide();
... ...
... ... @@ -208,10 +208,12 @@ class CreateGradeApe extends Ape {
}
//创建班级
_addClassBtnHandler(){
ClassDataProxy.getMarginTopHandler($('#createGrade'));//显示预约成功弹框
$('#createGradeBox').show();
}
//管理班级
_manageClassBtnHandler(){
ClassDataProxy.getMarginTopHandler($('#manageClass'));//显示预约成功弹框
$('#manageClassBox').show();
}
//关闭创建班级
... ...
... ... @@ -198,10 +198,12 @@ class CreateUserApe extends Ape {
}
//用户管理
_addUserBtnHandler(){
ClassDataProxy.getMarginTopHandler($('#createUserAccount'));//显示预约成功弹框
$('#createUserAccountBox').show();
}
_createUserYesHandler(){
$('#createUserAccountBox').hide();
ClassDataProxy.getMarginTopHandler($('#createUser'));//显示预约成功弹框
$('#createUserBox').show();
let val = $('#createUserRole').val();
let name = '';
... ... @@ -259,10 +261,12 @@ class CreateUserApe extends Ape {
//注册成功后 跳转登录界面
if(_data && _data.code == 200){
loger.log(_data,'注册老师账号成功')
ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框
ErrorApe.showWarnError('注册成功');
$('#createUserBox').hide();
that.userAdminHandler(1);
}else{
ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框
ErrorApe.showWarnError(_data.returnData.data.msg);
}
},
... ...
... ... @@ -43,13 +43,14 @@ class HomeApe extends Ape {
$('#liveBtnMove').on('click',this.liveBtnMoveHandler.bind(this));
$('#lanclassBtnMove').on('click',this.lanclassBtnMoveHandler.bind(this));
$('#teacherBtnMove').on('click',this.teacherBtnMoveHandler.bind(this));
$('#homeCenterBtn').on('click',this._homeCenterBtnHandler.bind(this));
}
addEvent() {
}
isLocalStorage(){
$('#myCenterBox').hide();
this.homeAllDate();
}
switchHeaderHandler(evt){
... ... @@ -156,15 +157,6 @@ class HomeApe extends Ape {
}
})
}
studentClick(){
$('#slideshow').show();
$('#defaultBox').show();
$('.curriculumBox').show();
$('#classifyListBox').hide();
$('#teacherDetailBox').hide();
$('#lanclassBox').hide();
$('#myCenterBox').hide();
}
_liveClassData(_data){
let liveList = $('#liveList');
liveList.empty();
... ... @@ -240,6 +232,27 @@ class HomeApe extends Ape {
lanclassList.append(_classifyList)
teacherIntro.append(_classifyList)
}
//首页点击 进入个人中心
_homeCenterBtnHandler(){
if(ClassDataProxy.userType == 0){
this.toLogin();
}else{
$('#slideshow').hide();
$('#defaultBox').hide();
$('#classifyListBox').hide();
$('#lanclassBox').hide();
$('#liveContentAllBox').hide();
$('#lanclassAllBox').hide();
$('#teacherIntroAllBox').hide();
$('#teacherDetailBox').hide();
$('#myCenterBox').show();
}
}
toLogin(){
ClassDataProxy.getMarginTopHandler($('#userLogin'));
$('#userLoginBox').show();
}
//工具类
_format(str, obj) {
return str.replace(/\{(\w+)\}/g, function (match, group, index) {
... ...
... ... @@ -72,7 +72,7 @@ class LanclassApe extends Ape {
if(_data && _data.code == 200){
//切换列表内容
that._classDateContent(_data.returnData.data);
loger.log(_data,'成功')
// loger.log(_data,'成功')
}
},
error:function(error){
... ...
... ... @@ -6,6 +6,7 @@ import Loger from "../Loger";
import Ape from "./Ape";
import $ from "jquery";
import ClassDataProxy from "proxy/ClassDataProxy";
import MessageTypes from "../MessageTypes";
let loger = Loger.getLoger('PC-ListDetailsApe');
class ListDetailsApe extends Ape {
... ... @@ -42,6 +43,8 @@ class ListDetailsApe extends Ape {
this._id = _id;
this.classInfoDetail(_id);
this.commonalityClass();
//查看当前点击的列表是否收藏
this._emit(MessageTypes.IS_COLLECT,{id : _id});
}
_liveListHandler(evt){
let _id = $(evt.currentTarget).attr('data');
... ... @@ -57,11 +60,10 @@ class ListDetailsApe extends Ape {
$('#teacherIntroAllBox').hide();
}
_teacherInfoHandler(evt){
this.commonalityClass();
let _id = $(evt.currentTarget).attr('data');
this._id = _id;
this.teacherInfoDetail(_id);
this.commonalityClass();
}
classInfoDetail(_id){
let that = this;
... ... @@ -110,7 +112,6 @@ class ListDetailsApe extends Ape {
let _dataList = _data.meetingInfo;
if(_dataList){
this._liveRender(_dataList[0]);
loger.log('课堂信息信息',_dataList)
}
}
}
... ... @@ -118,13 +119,14 @@ class ListDetailsApe extends Ape {
if(_data){
let teacherList = _data.users;
if(teacherList){
loger.log('老师1111',teacherList)
this._lanclassRender(teacherList[0]);
loger.log('课堂信息信息',teacherList)
}
}
}
//老师
_lanclassRender(_dataList){
loger.log('老师1111',_dataList)
$('#defaultBox').hide();
$('.curriculumBox').hide();
$('#teacherDetailBox').show();
... ...
... ... @@ -85,6 +85,7 @@ class LoginOrRegister extends Ape {
}
//首页用户登录
_homeUserLoginBtnHandler(){
$('#homeUserLoginBtn').attr('data',1)
if(!window.localStorage.getItem('status')){
ClassDataProxy.getMarginTopHandler($('#userLogin'));
$('#userLoginBox').show();
... ... @@ -104,7 +105,7 @@ class LoginOrRegister extends Ape {
this.updateInterfaceState();
this._emit(MessageTypes.LOGIN_OUT);
ClassDataProxy.getMarginTopHandler($('#warnHintBox'));
ErrorApe.showWarnError('退出成功');
ErrorApe.showWarnError('退出成功',1);
}
clearLocalStorage(){
window.localStorage.clear();
... ... @@ -368,10 +369,21 @@ class LoginOrRegister extends Ape {
$('#teacherMyCenterName').text( ClassDataProxy.loginName);
this._userLoginAHandler();
this._emit(MessageTypes.LOGIN_IN,{userType: ClassDataProxy.userType});
this._emit(MessageTypes.LOGIN_MYCENTER);
}
updateChangeUser(_data){
let _isMyCenter = $('#homeUserLoginBtn').attr('data');
if(parseInt(_isMyCenter) == 1){
$('#slideshow').hide();
$('#defaultBox').hide();
$('#classifyListBox').hide();
$('#lanclassBox').hide();
$('#liveContentAllBox').hide();
$('#lanclassAllBox').hide();
$('#teacherIntroAllBox').hide();
$('#teacherDetailBox').hide();
}
$('#myCenterBox').show();
// loger.log('登录成功后更改用户名',_data)
let _dataList = _data.returnData.data;
let oneselfInfoLoginName = $('#oneselfInfoLoginName');//登录名
... ...
... ... @@ -53,6 +53,8 @@ class MyBookingsApe extends Ape {
this.dataList = {};
this.teacherList = {};
this.presentInd = 1;//点击翻页默认为第一页
this.pageNo = 0;
this.orderId = 0;
this.addEvent();
this.init();
}
... ... @@ -78,57 +80,116 @@ class MyBookingsApe extends Ape {
$('#teacherCorrelatedInfo').on('click','.teacherCorrelatedInfoBtn',this._teacherSubscribeMoveHandler.bind(this));//点击预约查看当前点击的更多信息
$('#teacherCorrelatedInfo').on('click','.cancelReservation',this._cancelSubscribeHandler.bind(this));//取消预约
$('#teacherCorrelatedInfo').on('click','.cancelReservation',this._cancelReservationBtn.bind(this));//取消预约
$('#removeCancel').on('click',this._removeCancelHandler.bind(this));//取消预约 取消
$('#removeConfirm').on('click',this._removeConfirmHandler.bind(this));//取消预约 确定
$('#teacherCorrelatedInfo').on('click','.teachercourseImg',this._teacherClassDetails.bind(this));//点击进入老师课堂详情页
$('#courseHomePage').on('click',this._homePageHandler.bind(this));//首页
$('#courseUpPage').on('click',this._upPageHandler.bind(this));//上页
$('#courseDownPage').on('click',this._downPageHandler.bind(this));//下页
$('#courseEndPage').on('click',this._endPageHandler.bind(this));//尾页
$('#courseSpecificPage').on('click',this._assignPageHandler.bind(this));//指定页
}
addEvent() {
}
//首页
_homePageHandler(){
this.presentInd = 1;
this.studentBookings(this.presentInd);
}
//上页
_upPageHandler(){
if(this.presentInd > 1){
this.presentInd--;
this.studentBookings(this.presentInd);
}
}
//下页
_downPageHandler(){
loger.log('点击下一页')
if(this.presentInd < this.pageNo){
this.presentInd++;
this.studentBookings(this.presentInd);
}
}
//尾页
_endPageHandler(){
this.presentInd = this.pageNo;
this.studentBookings(this.presentInd);
}
//指定页
_assignPageHandler(){
let inputVal = $('#classHandlerPageInfoInput').val();
if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){
this.studentBookings(parseInt(inputVal));
}
}
//我的预约
myBookingsMessage(){
let subscribeList = $('#subscribeList');
this._anewLoad(subscribeList)
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){
this.studentBookings();
this.studentBookings(1);
}
}
studentBookings(){
_anewLoad(ele){
ele.find('.liveInfoLeftLi').eq(0).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck')
}
studentBookings(ind){
let that = this;
let data = $('#subscribeList').find('.liveInfoLeftLiCheck').attr('data');
this._studentCurriculumInfo(12,function(_data){
if(_data){
if(data == '1'){
that._studentSubscribeTeacher(_data.returnData.data)
}else{
if(parseInt(data) == 1){
this._studentCurriculumInfo(32,ind,function(_data){
that._studentSubscribeTeacher(_data.returnData.data)
})
}else{
this._studentCurriculumInfo(12,ind,function(_data){
if(_data){
that._studentSubscribe(_data.returnData.data)
}
}
});
})
}
}
_studentSubscribe(_data){
let teacherCorrelatedInfo = $('#teacherCorrelatedInfo');
teacherCorrelatedInfo.empty();
for(let i = 0;i<_data.length;i++){
if(_data[i]){
let j = (i%4)==3;
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
_create_user : _data[i].teacherName,
_liveTimer : _data[i].meetingBeginTime.split(' ')[0],
_studentMeetingId : _data[i].studentMeetingId
})
teacherCorrelatedInfo.append(_classifyList)
if(_data){
// let count = _data.count;
// let page = _data.page;
// let pageno = _data.pageno;
// let pagenum = Math.ceil(count / pageno);
//let _dataList = _data.meetingInfo;
// this.pageNo = pagenum;
}else{
console.error('_gainClassData没数据')
$('#coursePageBox').hide();
for(let i = 0;i<_data.length;i++){
if(_data[i]){
let j = (i%4)==3;
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
_create_user : _data[i].teacherName,
_liveTimer : _data[i].meetingBeginTime.split(' ')[0],
_studentMeetingId : _data[i].studentMeetingId
})
teacherCorrelatedInfo.append(_classifyList)
}else{
console.error('_gainClassData没数据')
}
}
}
}
_studentSubscribeTeacher(_data){
let teacherCorrelatedInfo = $('#teacherCorrelatedInfo');
... ... @@ -149,26 +210,45 @@ class MyBookingsApe extends Ape {
let teacherInfo = ''
let arrList = this.teacherList[key];
teacherInfo = this._format(teacherInfoLeft,{
_teacherName : key,
// meetingNumber
_teacherName : key
})
for(let n = 0;n<arrList.length;n++){
teacherInfo += this._format(teacherInfoCenter,{
_imgSrc : 'images/u374.png',
_id : arrList[n].teacherName
})
if(n<2){
teacherInfo += this._format(teacherInfoCenter,{
_imgSrc : 'images/u374.png',
_id : arrList[n].teacherName
})
}
}
teacherInfo += this._format(teacherInfoRight,{
_teacherName : key,
// _meetingId :
_meetingId :arrList[0].meetingId
})
teacherCorrelatedInfo.append(teacherInfo)
}
}
}
//取消预约
_cancelSubscribeHandler(evt){
_cancelReservationBtn(evt){
let _id = $(evt.target).attr('data');
this.orderId = _id;
ClassDataProxy.getMarginTopHandler($('#removeHandler'));
$("#removeHandlerBox").show();
$('#removeHandlerContent').html('确定要取消预约吗?');
}
_removeCancelHandler(){
this._hideRemoveBox();
}
_removeConfirmHandler(){
this._cancelSubscribeHandler(this.orderId);
this._hideRemoveBox();
}
_hideRemoveBox(){
$("#removeHandlerBox").hide();
$('#removeHandlerContent').html('');
}
//取消预约
_cancelSubscribeHandler(_id){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/updateStudentMeetingBySite/'+_id;
let that = this;
$.ajax({
... ... @@ -207,6 +287,8 @@ class MyBookingsApe extends Ape {
$('#lanclassContentInfoTimeEnd').html('结束时间:'+_data.meetingEndTime);
}
_teacherSubscribeMoveHandler(evt){
let _id = $(evt.target).attr('value');
$('#teacherDetailBox').attr('data',_id);
$('#teacherDetailBox').show();
$('#myCenterBox').hide();
... ... @@ -255,17 +337,17 @@ class MyBookingsApe extends Ape {
let ind = $(evt.target).attr('data');
window.open('http://networkshool.xuedianyun.com/3m/attend.do?meetingNumber=' + ind);
}
_studentCurriculumInfo(num,callback){
_studentCurriculumInfo(num,ind,callback){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingByStudentId/'+ClassDataProxy.id;
let that = this;
$.ajax({
type: "GET",
url: _url,
timeout:5000,
headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id,
headers: {siteId:ClassDataProxy.siteId,pageno:num,page:ind,id:ClassDataProxy.id,
'token':ClassDataProxy.token},
success:function(_data){
// loger.log('预约信息斯柯达开始',_data)
//获取我的课程数据
if(_data && _data.code == 200){
if(callback){
... ...
... ... @@ -15,7 +15,7 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS
</div>
<div class="classifyListMyCenter {_classifyListR}">
<div class="myCenterContentMask accessLearningBtn">
<button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">进入学习</button>
<button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">{_studyMsg}</button>
</div>
<div class="myCenterContentMask cancelReservation">
<button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button>
... ... @@ -86,8 +86,7 @@ class MyCenterApe extends Ape {
this.messageDetails = [];
this.presentInd = 1;//点击翻页默认为第一页
this.pageNo = 0; //首页老师端 直播默认页码
this.pageNo1 = 0; //首页老师端 课程默认页码
this.pageNo2 = 0; //首页老师端 课程默认页码
this.pageNo1 = 1; //首页老师端 课程默认页码
this._judgeListPlace();
this.addEvent();
this.init();
... ... @@ -108,22 +107,143 @@ class MyCenterApe extends Ape {
}
addEvent() {
}
//首页
_createClassHomePage(){
this._teacherLiveModule(1);
_homePageHandler(){
this.presentInd = 1;
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
//上页
_upPageHandler(){
if(this.presentInd > 1){
this.presentInd--;
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
}
//下页
_downPageHandler(){
loger.log('点击下一页')
if(this.presentInd < this.pageNo){
this.presentInd++;
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
}
//尾页
_endPageHandler(){
this.presentInd = this.pageNo;
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
//指定页
_assignPageHandler(){
let inputVal = $('#teacherMyCerterPageInfoInput').val();
if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(parseInt(inputVal));
break;
case 2:
this._teacherNoneLiveModule(parseInt(inputVal));
break;
case 4:
this._teacherEndLiveModule(parseInt(inputVal));
break;
default:
return;
}
}
}
detailpage(){
this._showStatus();
}
//首页
_homePageHandler(){
this.presentInd = 1;
this._teacherLiveModule(this.presentInd);
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
//上页
_upPageHandler(){
if(this.presentInd > 1){
this.presentInd--;
this._teacherLiveModule(this.presentInd);
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
}
//下页
... ... @@ -131,19 +251,58 @@ class MyCenterApe extends Ape {
loger.log('点击下一页')
if(this.presentInd < this.pageNo){
this.presentInd++;
this._teacherLiveModule(this.presentInd);
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
}
//尾页
_endPageHandler(){
this.presentInd = this.pageNo;
this._teacherLiveModule(this.presentInd);
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(this.presentInd);
break;
case 2:
this._teacherNoneLiveModule(this.presentInd);
break;
case 4:
this._teacherEndLiveModule(this.presentInd);
break;
default:
return;
}
}
//指定页
_assignPageHandler(){
let inputVal = $('#teacherMyCerterPageInfoInput').val();
if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){
this._teacherLiveModule(parseInt(inputVal));
let ind = $('#teacherMyCerterPageBox').attr('data');
switch (parseInt(ind)){
case 1:
this._teacherLiveModule(parseInt(inputVal));
break;
case 2:
this._teacherNoneLiveModule(parseInt(inputVal));
break;
case 4:
this._teacherEndLiveModule(parseInt(inputVal));
break;
default:
return;
}
}
}
loadMeeting(meeting){
... ... @@ -205,7 +364,7 @@ class MyCenterApe extends Ape {
type: "GET",
url: _url,
timeout:5000,
headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id,
headers: {siteId:ClassDataProxy.siteId,pageno:num,id:ClassDataProxy.id,
'token':ClassDataProxy.token},
success:function(_data){
... ... @@ -234,7 +393,7 @@ class MyCenterApe extends Ape {
//首页课程
this._teacherCourseModule();
//首页直播信息
this._teacherLiveModule(1);
this.teacherListSwitch();
}
detailPageStudent(){
this._studentCourseModule();
... ... @@ -260,44 +419,35 @@ class MyCenterApe extends Ape {
}
_showStatus(){
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
$('#teacherMyCenterStatus').text('老师');
$('#teacherMyCerter').show();
$('#studentMyCerter').hide();
}else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){
$('#teacherMyCenterStatus').text('同学');
$('#teacherMyCerter').hide();
$('#studentMyCerter').show();
}
}
isLocalStorage(){
let newDate = new Date();
let newHours = newDate.getHours();
let text = newHours>12?'下午好,':'上午好,'
$('#teacherMyCenterTime').text(text);
this._showStatus();
this.detailpage();
loger.log('登录老师首页',ClassDataProxy.userType , ClassDataProxy.USER_TYPE_1)
$('#myCenterBox').show();
$('#teacherMyCenterName').text(ClassDataProxy.loginName);
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
//首页默认数据
// this.detailPageTeacher();
$('#teacherMyCenterName').text(ClassDataProxy.loginName);
$('#teacherMyCenterStatus').text('老师');
$('#teacherUI .recordLi').eq(2).hide();
$('#teacherMyCerter').show();
$('#studentMyCerter').hide();
$('#myCenterBox').show();
$('#teacherUI .recordLi').eq(2).hide();
this.detailPageTeacher();
}else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){
//首页默认数据
// this.detailPageStudent();
$('#myCenterBox').show();
$('#teacherMyCenterName').text(ClassDataProxy.loginName);
$('#teacherMyCenterStatus').text('同学');
$('#teacherMyCerter').hide();
$('#studentMyCerter').show();
$('#teacherUI .recordLi').eq(2).show();
this.detailPageStudent();
}
}
isLocalStorage(){
this.detailpage();
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
$('#myCenterBox').show();
}
loger.log('登录老师首页',ClassDataProxy.userType , ClassDataProxy.USER_TYPE_1)
$('#lanclassBox').hide();
... ... @@ -337,15 +487,32 @@ class MyCenterApe extends Ape {
return;
}
}
detailpage(){
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
this.detailPageTeacher();
}else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){
this.detailPageStudent();
}
}
/*-------------------老师-------------------*/
teacherListSwitch(){
let ind = $('#teacherInfoList .liveInfoLeftLiCheck').attr('data');
$('#teacherMyCerterPageBox').attr('data',ind)
let teacherMyCenterContentList = $('#teacherMyCenterContentList');
let status = parseInt(ind);
switch (status){
case 1:
//正在直播
this._teacherLiveModule(1);
break;
case 2:
//未开始
this._teacherNoneLiveModule(1);
break;
case 4:
//已结束
this._teacherEndLiveModule(1);
break;
default:
return;
}
}
//老师端首页课程显示
_teacherCourseModule(){
let data = {siteId:ClassDataProxy.siteId,create_user : ClassDataProxy.loginName};
... ... @@ -365,12 +532,13 @@ class MyCenterApe extends Ape {
if(_data) {
for (let i = 0; i < _data.length; i++) {
let item = _data[i];
let timer = ClassDataProxy.getTimeCountDown(item.meetingBeginTime,item.meetingEndTime)
if (item) {
let curInfo = this._format(curriculumList, {
_infoTit: item.meetingName,
_meetingNumber: item.meetingNumber,
_countDown: that.loadMeeting(item),
_isShow: (that.loadMeeting(item) == '已开始') ? 'block' : 'none'
_isShow: (timer == '已结束') ? 'none' : 'block'
})
myCurriculumInfo.append(curInfo);
} else {
... ... @@ -391,33 +559,64 @@ class MyCenterApe extends Ape {
}
})
}
_teacherNoneLiveModule(ind){
let data = {siteId:ClassDataProxy.siteId,create_user : ClassDataProxy.loginName,meetingStatus:2};
let that = this;
this._teacherCurriculumInfo(data,4,ind,function(_data){
//首页直播信息渲染
if(_data){
that._teacherLiveCourse(_data.returnData.data);
}
})
}
_teacherEndLiveModule(ind){
let data = {siteId:ClassDataProxy.siteId,create_user : ClassDataProxy.loginName,meetingStatus:4};
let that = this;
this._teacherCurriculumInfo(data,4,ind,function(_data){
//首页直播信息渲染
if(_data){
that._teacherLiveCourse(_data.returnData.data);
}
})
}
_teacherLiveCourse(_data){
let teacherMyCenterContentList = $('#teacherMyCenterContentList');
teacherMyCenterContentList.empty();
let count = _data.count;
let page = _data.page;
let pageno = _data.pageno;
let pagenum = Math.ceil(count / pageno);
let _dataList = _data.meetingInfo;
this.pageNo = pagenum;
$('#teacherMyCerterPageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录');
teacherMyCenterContentList.append(adminListTit)
for(let i = 0;i<_dataList.length;i++){
if(count <= 8){
$('#teacherMyCerterPageBox').hide();
if(_data){
let count = _data.count;
let page = _data.page;
let pageno = _data.pageno;
let pagenum = Math.ceil(count / pageno);
let _dataList = _data.meetingInfo;
this.pageNo = pagenum;
if(_dataList.length > 0){
// loger.log('正在直播状态',_data)
$('#teacherMyCerterPageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录');
if(count <= 4){
$('#teacherMyCerterPageBox').hide();
}
teacherMyCenterContentList.append(adminListTit)
for(let i = 0;i<_dataList.length;i++){
let _adminList = this._format(adminList,{
_meetingName : _dataList[i].meetingName,
_meetingNumber : _dataList[i].meetingNumber,
_create_user : _dataList[i].create_user,
_state : ClassDataProxy.getTimeEnd(_dataList[i].beginTime,_dataList[i].endTime),
_timer : _dataList[i].beginTime + '-' + _dataList[i].endTime,
_num : '0'
})
teacherMyCenterContentList.append(_adminList)
}
teacherMyCenterContentList.append(adminListEnd)
}else{
let _classifyList = '<div class="dataCenterErrorTitle">暂无数据~</div>';
teacherMyCenterContentList.append(_classifyList)
}
let _adminList = this._format(adminList,{
_meetingName : _dataList[i].meetingName,
_meetingNumber : _dataList[i].meetingNumber,
_create_user : _dataList[i].create_user,
_state : ClassDataProxy.getTimeEnd(_dataList[i].beginTime,_dataList[i].endTime),
_timer : _dataList[i].beginTime + '-' + _dataList[i].endTime,
_num : '0'
})
teacherMyCenterContentList.append(_adminList)
}else{
loger.log('shujuweikong')
}
teacherMyCenterContentList.append(adminListEnd)
}
/*---------------------------学生-----------------------*/
... ... @@ -476,6 +675,7 @@ class MyCenterApe extends Ape {
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_studyMsg:'进入学习',
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
... ... @@ -483,7 +683,6 @@ class MyCenterApe extends Ape {
_liveTimer : _data[i].meetingBeginTime.split(' ')[0]
})
studentMyCenterContentList.append(_classifyList)
}else{
recordData = 1;
}
}else{
... ... @@ -491,8 +690,8 @@ class MyCenterApe extends Ape {
}
}
}
if(recordData == 1){
let _classifyList = '<div class="dataCenterErrorTitle">暂无数据~</div>'
if(recordData == 0){
let _classifyList = '<div class="dataCenterErrorTitle">暂无数据~</div>';
studentMyCenterContentList.append(_classifyList)
}
... ... @@ -514,6 +713,7 @@ class MyCenterApe extends Ape {
let _classifyList = this._format(classifyList,{
_classifyListR : j?'classifyListR':'',
_isShowTitle : 'none',
_studyMsg:'继续学习',
_meetingNumber : _data[i].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _data[i].meeting_name,
... ... @@ -568,7 +768,6 @@ class MyCenterApe extends Ape {
}
//老师端课程数据
_teacherCourseRender(_data){
let courseMinuteList = $('#courseMinuteList');
... ... @@ -616,31 +815,8 @@ class MyCenterApe extends Ape {
}
}
//学生端 我的课程 切换
//老师端首页显示课程
_teacherHomeCourse(_data){
let myCurriculumInfo = $('#myCurriculumInfo');
myCurriculumInfo.empty();
if(_data){
for(let i = 0;i < 3;i++){
let item = _data[i];
if(item){
let curInfo = this._format(curriculumList,{
_infoTit : item.meetingName,
_meetingNumber : item.meetingNumber,
_countDown : that.loadMeeting(item),
_isShow : (that.loadMeeting(item)=='已开始')?'block':'none'
})
myCurriculumInfo.append(curInfo);
}else{
console.error('_gainClassData没数据')
}
}
}
}
_myCenterBoxHandler(){
this._showStatus();
this.detailpage();
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_2){
return;
}
... ... @@ -658,7 +834,6 @@ class MyCenterApe extends Ape {
}
$('#myCenterBox').show();
}
updateEmail(userEmail){
return userEmail.replace(/(\d{2})\d{2}(\d{1})/, '$1****$2')
... ... @@ -682,6 +857,7 @@ class MyCenterApe extends Ape {
}
_teacherInfoListHandler(evt){
this.commonality(evt);
this.teacherListSwitch();
}
//学生端 首页
_studentInfoListHandler(evt){
... ...
... ... @@ -15,7 +15,7 @@ const classifyList = `<div class="courseMinuteListTimeTit" style="display: {_isS
</div>
<div class="classifyListMyCenter {_classifyListR}">
<div class="myCenterContentMask accessLearningBtn">
<button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">进入学习</button>
<button class="myCenterContentMaskBtn btnHover" data="{_meetingNumber}">{_studyMsg}</button>
</div>
<div class="myCenterContentMask cancelReservation">
<button class="myCenterContentMaskBtn btnHover" data="{_studentMeetingId}">取消预约</button>
... ... @@ -110,10 +110,8 @@ class MyCoursesApe extends Ape {
}
//首页
_homePageHandler(){
this.presentIndT = 1;
this.teacherNowLiveModule(this.presentIndT);
loger.log('首页',this.presentIndT)
}
//上页
_upPageHandler(){
... ... @@ -121,7 +119,6 @@ class MyCoursesApe extends Ape {
this.presentIndT--;
this.teacherNowLiveModule(this.presentIndT);
}
loger.log('上页',this.presentIndT)
}
//下页
_downPageHandler(){
... ... @@ -130,13 +127,11 @@ class MyCoursesApe extends Ape {
this.presentIndT++;
this.teacherNowLiveModule(this.presentIndT);
}
loger.log('下页',this.presentIndT)
}
//尾页
_endPageHandler(){
this.presentIndT = this.pageNoT;
this.teacherNowLiveModule(this.presentIndT);
loger.log('尾页',this.presentIndT)
this.presentIndT = this.pageNoT;
this.teacherNowLiveModule(this.presentIndT);
}
//指定页
_assignPageHandler(){
... ... @@ -144,20 +139,29 @@ class MyCoursesApe extends Ape {
if(parseInt(inputVal) <= this.pageNoT || parseInt(inputVal) >= 1 ){
this.teacherNowLiveModule(parseInt(inputVal));
}
loger.log('指定页',this.presentIndT)
}
//我的课程
myCoursesMessage(){
let courseInfoList = $('#courseInfoList');
let teacherLiveList = $('#teacherLiveList');
if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
this.teacherCourses();
$('#courseInfoList').hide();
$('#teacherLiveList').show();
courseInfoList.hide();
teacherLiveList.show();
this._anewLoad(teacherLiveList);//默认显示第一个列表
this.teacherNowLiveModule(1);
}else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_8){
let courseMinuteList = $('#courseMinuteList');
this.studentCourses();
$('#courseInfoList').show();
$('#teacherLiveList').hide();
courseInfoList.show();
teacherLiveList.hide();
this._anewLoad(courseInfoList)//默认显示第一个列表
this.studentFutureModule(courseMinuteList);
}
}
_anewLoad(ele){
ele.find('.liveInfoLeftLi').eq(0).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck')
}
//我的 课程 直播信息
teacherCourses(){
let _index = $('#teacherLiveList .liveInfoLeftLiCheck').attr('data');
... ... @@ -187,9 +191,8 @@ class MyCoursesApe extends Ape {
this._teacherCurriculumInfo(data,8,ind,function(_data){
//首页直播信息渲染
if(_data){
//
that._teacherCourse(_data.returnData.data);
loger.log('首页直播信息渲染',_data.returnData.data)
// loger.log('首页直播信息渲染',_data.returnData.data)
}
})
}
... ... @@ -261,7 +264,6 @@ class MyCoursesApe extends Ape {
that._studentCourseRender(courseMinuteList,_data.returnData.data)
}
});
}
//学生端课程数据 待学习
_studentCourseRender(courseMinuteList,_data){
... ... @@ -299,6 +301,7 @@ class MyCoursesApe extends Ape {
_classifyListR : j ?'classifyListR':'',
_isShowTitle : n == 0 ?'block':'none',
_meetingNumber : arrList[n].meetingNumber,
_studyMsg:'进入学习',
_msgImg : '../images/u373.png',
_meetingName : arrList[n].meeting_name,
_create_user : arrList[n].teacherName,
... ... @@ -307,14 +310,14 @@ class MyCoursesApe extends Ape {
courseMinuteList.append(_classifyList)
}
}
}else {
recordData = 1;
}
}
if(recordData == 1){
if(recordData == 0){
let _classifyList = '<div class="dataCenterErrorTitle">暂无数据~</div>'
courseMinuteList.append(_classifyList)
}
}
//学生端 我的课程 已学完
studentFormerlyModule(courseMinuteList){
... ... @@ -360,6 +363,7 @@ class MyCoursesApe extends Ape {
let _classifyList = this._format(classifyList,{
_classifyListR : j ?'classifyListR':'',
_isShowTitle : n == 0 ?'block':'none',
_studyMsg:'继续学习',
_meetingNumber : arrList[n].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : arrList[n].meeting_name,
... ... @@ -418,6 +422,7 @@ class MyCoursesApe extends Ape {
let _classifyList = this._format(classifyList,{
_classifyListR : j ?'classifyListR':'',
_isShowTitle : 'none',
_studyMsg:'取消收藏',
_meetingNumber : _dataList[n].meetingNumber,
_msgImg : '../images/u373.png',
_meetingName : _dataList[n].meeting_name,
... ...
... ... @@ -35,15 +35,15 @@ class SubscribeApe extends Ape {
let status = $(evt.currentTarget).attr('data');
let id = $('#teacherDetailBox').attr('data');
this._lanclassContentApplyHandler(status,id);
loger.log('查看当前点击的dataid',id,status)
}
_lanclassContentApplyHandler(status,id){
if(ClassDataProxy.userType == 0){
that.toLogin();
this.toLogin();
return;
}
let that = this;
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/addStudentMeeting';
this.id = id;
$.ajax({
type: "POST",
... ... @@ -58,6 +58,7 @@ class SubscribeApe extends Ape {
success:function(_data){
let arr = ['收藏成功!','预约成功!','报名成功!']
//获取课堂数据
loger.log('获取课堂数据',_data)
if(_data && _data.code == 200){
loger.log(_data,'预约信息')
ClassDataProxy.getMarginTopHandler($('#teacherDetailReminders'));//显示预约成功弹框
... ... @@ -73,7 +74,7 @@ class SubscribeApe extends Ape {
},
error:function(error){
//alert('首页数据获取失败')
console.log(error,'首页数据获取失败')
console.log(error,'预约数据获取失败')
}
})
}
... ...
... ... @@ -68,7 +68,7 @@ let _headSwitchTitleApe;
class Main {
constructor() {
this.clientVersion="v1.8.4.20170923";
this.clientVersion="v1.8.5.20170925";
loger.warn("clientVersion:"+this.clientVersion);
let locationProtocol= location.protocol;
... ... @@ -151,6 +151,23 @@ class Main {
_loginOrRegister = new LoginOrRegister();
_loginOrRegister.on(MessageTypes.LOGIN_OUT,this.loginOut.bind(this));
_loginOrRegister.on(MessageTypes.LOGIN_IN,this.loginIn.bind(this));
// _loginOrRegister.on(MessageTypes.LOGIN_MYCENTER,this.loginMycenter.bind(this));
//个人中心
_myCenterApe = new MyCenterApe();
_myCenterApe.on(MessageTypes.ROLE_MESSAGE,this.roleMessage.bind(this));
_myCenterApe.on(MessageTypes.MY_COURSES,this.myCoures.bind(this));
_myCenterApe.on(MessageTypes.MY_BOOKINGS,this.myBookings.bind(this));
//个人中心 我的课程
_myCoursesApe = new MyCoursesApe();
//个人中心 我的预约
_myBookingsApe = new MyBookingsApe();
//预约管理
_subscribeApe = new SubscribeApe();
_subscribeApe.on(MessageTypes.ORDER_FINISH,this.orderFinish.bind(this));
//收藏
_collectApe = new CollectApe();
//互动课堂
_lanclassApe = new LanclassApe();
... ... @@ -177,27 +194,12 @@ class Main {
_aboutClassApe = new AboutClassApe();
//列表详情
_listDetailsApe = new ListDetailsApe();
_listDetailsApe.on(MessageTypes.IS_COLLECT,this.isCollect.bind(this));
//管理员
_administratorApe = new AdministratorApe();
_administratorApe.on(MessageTypes.SWITCH_CLASS,this.switchClass.bind(this));
//录制回放
_playRecordApe = new PlayRecordApe();
//个人中心
_myCenterApe = new MyCenterApe();
_myCenterApe.on(MessageTypes.ROLE_MESSAGE,this.roleMessage.bind(this));
_myCenterApe.on(MessageTypes.MY_COURSES,this.myCoures.bind(this));
_myCenterApe.on(MessageTypes.MY_BOOKINGS,this.myBookings.bind(this));
//个人中心 我的课程
_myCenterApe = new MyCoursesApe();
//个人中心 我的预约
_myBookingsApe = new MyBookingsApe();
//预约管理
_subscribeApe = new SubscribeApe();
_subscribeApe.on(MessageTypes.ORDER_FINISH,this.orderFinish.bind(this));
//收藏
_collectApe = new CollectApe();
}
//
... ... @@ -210,14 +212,23 @@ class Main {
loginIn(_data){
loger.log('进入课堂时显示的type值---登录',_data.userType)
if(_data && _data.userType){
if(_data.userType == ClassDataProxy.USER_TYPE_1){
this._teacherHome();
_teacherDetailApe.detailPage();
if(_myCenterApe){
_myCenterApe.detailpage();
}else {
loger.log("_myCenterApe 无效");
}
}else if(_data.userType == ClassDataProxy.USER_TYPE_2){
this._showAdministratorInfo();
_managementHomePageApe.detailPage();
}else if(_data.userType == ClassDataProxy.USER_TYPE_8){
_homeApe.detailPage();
_myCenterApe.detailpage();
}else if(_data.userType == ClassDataProxy.USER_TYPE_32){
}else{
... ... @@ -225,6 +236,11 @@ class Main {
}
}
}
loginMycenter(){
_myCenterApe.detailpage();
loger.log('1111111111')
}
homeSkip(_data) {
if (_data && _data.userType) {
if (_data.userType == ClassDataProxy.USER_TYPE_1) {
... ... @@ -238,12 +254,19 @@ class Main {
}
//我的课程
myCoures(){
_myCenterApe.myCoursesMessage();
_myCoursesApe.myCoursesMessage();
}
//我的预约
myBookings(){
_myBookingsApe.myBookingsMessage();
}
//是否收藏
isCollect(_data){
if(_data){
// _collectApe.isCollect(_data.id);
}
}
//管理员左侧列表
switchClass(_data){
let ind = parseInt(_data);
... ... @@ -283,6 +306,8 @@ class Main {
case 8:
//个人设置
break;
default:
return;
}
}
//切换头部列表
... ... @@ -301,6 +326,8 @@ class Main {
case 3:
_teacherDetailApe.isLocalStorage();
break;
case 4:
break;
default:
return;
}
... ...
... ... @@ -336,6 +336,7 @@ ClassDataProxy.siteId = '';
ClassDataProxy.userMobile = '';
ClassDataProxy.userEmail = '';
ClassDataProxy.monicker = "";
ClassDataProxy.meetingId = '';
ClassDataProxy.USER_TYPE_0 = 0;
ClassDataProxy.USER_TYPE_1 = 1;
... ...