Merge branches 'courseware' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
杨树明 5 years ago
commit e8838d038a

@ -133,13 +133,15 @@ class TPIContextProvider extends Component {
}) })
} }
componentWillMount () {
// 拦截判断是否离开当前页面
}
componentWillUnmount() { componentWillUnmount() {
this.costTimeInterval && window.clearInterval(this.costTimeInterval) this.costTimeInterval && window.clearInterval(this.costTimeInterval)
} }
componentDidMount() { componentDidMount() {
window.$(window).unload( ()=>{
console.log(12321)
});
// TODO 登录状态的判断? // TODO 登录状态的判断?
// request // request
@ -161,12 +163,15 @@ class TPIContextProvider extends Component {
} }
}, 1000) }, 1000)
// 页面离开时存下用户的任务耗时 // // 页面离开时存下用户的任务耗时
window.$(window).bind('beforeunload', function (e) { window.$(window).bind('beforeunload',()=>{
console.log(111111)
this._updateCostTime(); this._updateCostTime();
}) })
// window.$(window).unload( ()=>{
// this._updateCostTime();
// });
// // 页面离开时存下用户的任务耗时 // // 页面离开时存下用户的任务耗时
// window.$(window).unload( ()=>{ // window.$(window).unload( ()=>{
// this._updateCostTime(); // this._updateCostTime();

@ -601,26 +601,38 @@ class CoursesBanner extends Component {
</div> </div>
<div>
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
<div className="fl mt13">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p>
</div>
<div className="clearfix "> </div>
<div className="fl fl mr40 mb20">
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
<div className="fl mt13"> <div className="clearfix ">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p> <div className="fl fl mr40 mb20" >
</div> <div className="task-hide" style={{height:25,marginBottom:10,marginLeft:60}}>
{coursedata.teacher_users.length===0?'':
<span className="color-white" >协作老师
{coursedata.teacher_users.map((iem,idx)=>{
return(
<span className="task-hide" style={{width:50,marginLeft:5}}>{idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''} </span>
)
})
}
</span>
}
</div>
</div> </div>

Loading…
Cancel
Save