董佳音

修改查看课堂信息和老师信息显示头像

@@ -100,7 +100,7 @@ class ListDetailsApe extends Ape { @@ -100,7 +100,7 @@ class ListDetailsApe extends Ape {
100 siteId:ClassDataProxy.siteId, 100 siteId:ClassDataProxy.siteId,
101 userType : 1 101 userType : 1
102 } 102 }
103 - let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/getUserByUserType'; 103 + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/getUser';
104 this.detailPage(_url,data,function(_data){ 104 this.detailPage(_url,data,function(_data){
105 if(_data){ 105 if(_data){
106 that._classDateContent(_data.returnData.data); 106 that._classDateContent(_data.returnData.data);
@@ -126,13 +126,14 @@ class ListDetailsApe extends Ape { @@ -126,13 +126,14 @@ class ListDetailsApe extends Ape {
126 } 126 }
127 //老师 127 //老师
128 _lanclassRender(_dataList){ 128 _lanclassRender(_dataList){
129 - loger.log('老师1111',_dataList)  
130 $('#defaultBox').hide(); 129 $('#defaultBox').hide();
131 $('.curriculumBox').hide(); 130 $('.curriculumBox').hide();
132 $('#teacherDetailBox').show(); 131 $('#teacherDetailBox').show();
133 $('#teacherDetailBox').attr('data',this._id); 132 $('#teacherDetailBox').attr('data',this._id);
134 - $('#teacherDetailInfoImg').attr('src','images/u293.png');//老师授课标题图片  
135 - $('#teacherDetailInfoDetailName').text(_dataList.user_name);//老师名字 133 + let _img = _dataList.userPhoto;
  134 + let defaultImg = 'images/u373.png'
  135 + $('#teacherDetailInfoImg').attr('src',_img?_img:defaultImg);//老师授课标题图片
  136 + $('#teacherDetailInfoDetailName').text(_dataList.userName);//老师名字
136 $('#teacherDetailInfoDetailSex').text();//老师性别 137 $('#teacherDetailInfoDetailSex').text();//老师性别
137 $('#teacherDetailInfoDetailPoint').text();//老师专长 138 $('#teacherDetailInfoDetailPoint').text();//老师专长
138 $('#teacherDetailInfoDetailAge').text(3+'年');//老师教龄 139 $('#teacherDetailInfoDetailAge').text(3+'年');//老师教龄
@@ -152,9 +153,14 @@ class ListDetailsApe extends Ape { @@ -152,9 +153,14 @@ class ListDetailsApe extends Ape {
152 $('.curriculumBox').hide(); 153 $('.curriculumBox').hide();
153 $('#lanclassBox').show(); 154 $('#lanclassBox').show();
154 $('#lanclassBox').attr('data',this._id); 155 $('#lanclassBox').attr('data',this._id);
155 - $('#lanclassContentCover').attr('src','images/u373.png');//老师授课标题图片 156 + let _img = _dataList.meetingPhoto;
  157 + let defaultImg = 'images/u373.png'
  158 + $('#lanclassContentCover').attr('src',_img?_img:defaultImg);//老师授课标题图片
156 $('#lanclassContentTitle').text(_dataList.meetingName);//老师授课标题 159 $('#lanclassContentTitle').text(_dataList.meetingName);//老师授课标题
157 - $('#lanclassContentInfoPortrait').text();//老师授课老师头像 160 +
  161 + let _teacherImg = _dataList.teacherPhoto;
  162 + let teacherDefault = 'images/u293.png';
  163 + $('#lanclassContentInfoPortrait').attr('src',_teacherImg?_teacherImg:teacherDefault);//老师授课老师头像
158 $('#lanclassContentInfoName').text(_dataList.create_user);//老师授课老师名字 164 $('#lanclassContentInfoName').text(_dataList.create_user);//老师授课老师名字
159 $('#teacherInfoName').text(_dataList.create_user);//老师授课老师名字 165 $('#teacherInfoName').text(_dataList.create_user);//老师授课老师名字
160 $('#lanclassContentInfoTimeStart').text(_dataList.beginTime);//老师授课开始时间 166 $('#lanclassContentInfoTimeStart').text(_dataList.beginTime);//老师授课开始时间
@@ -828,6 +828,7 @@ class MyCenterApe extends Ape { @@ -828,6 +828,7 @@ class MyCenterApe extends Ape {
828 $('#teacherIntroAllBox').hide(); 828 $('#teacherIntroAllBox').hide();
829 $('#teacherDetailBox').hide(); 829 $('#teacherDetailBox').hide();
830 $('#teacherUI .recordLi').eq(2).show(); 830 $('#teacherUI .recordLi').eq(2).show();
  831 + $('#myCenterBox').show();
831 }else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){ 832 }else if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_1){
832 $('#myCenterBox').show(); 833 $('#myCenterBox').show();
833 } 834 }
@@ -68,7 +68,7 @@ let _headSwitchTitleApe; @@ -68,7 +68,7 @@ let _headSwitchTitleApe;
68 68
69 class Main { 69 class Main {
70 constructor() { 70 constructor() {
71 - this.clientVersion="v1.8.6.20170928"; 71 + this.clientVersion="v1.8.7.20170928";
72 loger.warn("clientVersion:"+this.clientVersion); 72 loger.warn("clientVersion:"+this.clientVersion);
73 73
74 let locationProtocol= location.protocol; 74 let locationProtocol= location.protocol;
@@ -124,7 +124,6 @@ class Main { @@ -124,7 +124,6 @@ class Main {
124 //将地址转化成一个对象 124 //将地址转化成一个对象
125 _parseUrlParams() { 125 _parseUrlParams() {
126 let url = encodeURI(location.search); 126 let url = encodeURI(location.search);
127 - loger.log('地址栏参数',location.search)  
128 let thisParam = {}; 127 let thisParam = {};
129 let strs; 128 let strs;
130 // 判断是否存在请求的参数 129 // 判断是否存在请求的参数
@@ -343,10 +342,20 @@ class Main { @@ -343,10 +342,20 @@ class Main {
343 } 342 }
344 //判断登录用户的状态 343 //判断登录用户的状态
345 _localStorageState(){ 344 _localStorageState(){
  345 + let _href = window.location.href.split('.')[0].split('//')[1];
  346 + let _idHref ;
  347 +
  348 +
  349 + if(_href.indexOf('localhost') !=-1){
  350 + _idHref = 'networkschool';
  351 + }else{
  352 + _idHref = window.location.href.split('.')[0].split('//')[1];
  353 + }
  354 + loger.log(_idHref,'111111111')
346 let userType = window.localStorage.getItem('userType')||0; 355 let userType = window.localStorage.getItem('userType')||0;
347 let loginName = window.localStorage.getItem('loginName')|| ''; 356 let loginName = window.localStorage.getItem('loginName')|| '';
348 let id = window.localStorage.getItem('id')|| ''; 357 let id = window.localStorage.getItem('id')|| '';
349 - let siteId = window.localStorage.getItem('siteId')|| 'markettest'; 358 + let siteId = window.localStorage.getItem('siteId')|| _idHref;
350 359
351 let userMobile = window.localStorage.getItem('userMobile')|| ''; 360 let userMobile = window.localStorage.getItem('userMobile')|| '';
352 let userEmail = window.localStorage.getItem('userEmail')|| ''; 361 let userEmail = window.localStorage.getItem('userEmail')|| '';