杨树林 5 years ago
commit 5a92b9920c

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

@ -13,16 +13,8 @@ function locationurl(list){
if (window.location.port === "3007") { if (window.location.port === "3007") {
} else { } else {
if(list===402){
SetAppModel(402)
}else if(list===407){
}else{
window.location.replace(list) window.location.replace(list)
} }
}
} }
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
@ -153,11 +145,11 @@ export function initAxiosInterceptors(props) {
locationurl('/500'); locationurl('/500');
} }
if (response.data.status === 402) { // if (response.data.status === 402) {
console.log(response.data.status); // console.log(response.data.status);
console.log(response.data); // console.log(response.data);
// locationurl(402); // // locationurl(402);
} // }
if (response.data.status === 401) { if (response.data.status === 401) {

@ -146,19 +146,12 @@ class ShixunModal extends Component{
} }
savecouseShixunModal=()=>{ savecouseShixunModal=()=>{
this.setState({ this.setState({
hometypepvisible:true hometypepvisible:true
}) })
let {coursesId,patheditarry,datas}=this.props; let {coursesId,patheditarry,datas}=this.props;
let{category_id}=this.state;
if (this.props.chooseShixun) {
this.props.chooseShixun(patheditarry)
this.setState({
hometypepvisible:false
})
return;
}
if(patheditarry.length===0){ if(patheditarry.length===0){
this.setState({ this.setState({
shixunmodelchke:true, shixunmodelchke:true,
@ -168,6 +161,15 @@ class ShixunModal extends Component{
return return
} }
if (this.props.chooseShixun) {
this.props.chooseShixun(patheditarry)
this.setState({
hometypepvisible:false
})
return;
}
let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json"; let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json";
axios.post(url, { axios.post(url, {
category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id), category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id),
@ -378,7 +380,7 @@ class ShixunModal extends Component{
</div> </div>
</div> </div>
</Spin> </Spin>
<span className={this.state.shixunmodelchke===true?"none":"color-red"}>{this.state.chekicmessage}</span> <span className={this.state.shixunmodelchke===true?"color-red":"none"}>{this.state.chekicmessage}</span>
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a> <a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>

@ -257,7 +257,13 @@ class CoursesNew extends Component {
} }
goback = () => { goback = () => {
window.history.go(-1)
if(this.props.match.params.coursesId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(`/courses/${this.props.match.params.coursesId}`);
}
// window.history.go(-1)
} }
onCheckAllChange = (e) => { onCheckAllChange = (e) => {

@ -361,7 +361,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -375,7 +375,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -389,7 +389,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -405,7 +405,7 @@ class ShixunsHome extends Component {
<li key={key}> <li key={key}>
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url}/> <img src={'images/'+item.image_url}/>
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -437,7 +437,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan-two.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -451,7 +451,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -465,7 +465,7 @@ class ShixunsHome extends Component {
<img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" /> <img src={getImageUrl("images/educoder/huangguan-three.png")} className="huangguan" />
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url} /> <img src={'images/'+item.image_url} />
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )
@ -481,7 +481,7 @@ class ShixunsHome extends Component {
<li key={key}> <li key={key}>
<a href={"/users/"+item.login} className="color-dark"> <a href={"/users/"+item.login} className="color-dark">
<img src={'images/'+item.image_url}/> <img src={'images/'+item.image_url}/>
<span className="task-hide rankName">{item.name}</span> <span className="task-hide rankName">{item.username}</span>
</a> </a>
</li> </li>
) )

@ -683,9 +683,12 @@ submittojoinclass=(value)=>{
</li> </li>
{/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/} {/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a></li> <li className="">
<a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a>
<img className="roundedRectangles" src="/images/educoder/roundedRectangle.png" />
</li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.moop_cases_url}>教学案例</a></li> <li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.moop_cases_url}>教学案例</a></li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.crowdsourcing_url}>众包社区</a></li> <li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.crowdsourcing_url}>众包创新</a></li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</a></li> <li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</a></li>
<li <li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}} style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}
@ -717,7 +720,7 @@ submittojoinclass=(value)=>{
// onSearch={value => console.log(value)} // onSearch={value => console.log(value)}
onPressEnter={this.onKeywordSearchKeyDown} onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 295 }} style={{ width: 300 }}
/> />
</div> </div>
@ -743,11 +746,11 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %> <%= link_to '注册', user_join_path, :className => "ml5" %>
</span>*/} </span>*/}
{ user===undefined? { user===undefined?
<span className="font-15 fr mt17"> <span className="font-15 fr mt17 ml20">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a> <a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em> <em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a> <a href={"/register"} className="mr5 color-white">注册</a>
</span> :user.login===""?<span className="font-15 fr mt17"> </span> :user.login===""?<span className="font-15 fr mt17 ml20">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a> <a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em> <em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a> <a href={"/register"} className="mr5 color-white">注册</a>
@ -780,7 +783,7 @@ submittojoinclass=(value)=>{
</div> </div>
} }
{/*href="https://www.educoder.net/login"*/} {/*href="https://www.educoder.net/login"*/}
{ user===undefined?"":user.login===""?"":<div className="fr head-right"> <div className="fr head-right ">
{ loadHeader()} { loadHeader()}
<a id="search-open" className="fl mr30 headIcon"> <a id="search-open" className="fl mr30 headIcon">
{/*"/images/educoder/icon/search.svg" {/*"/images/educoder/icon/search.svg"
@ -911,7 +914,7 @@ submittojoinclass=(value)=>{
</div> </div>
</Modal> </Modal>
</div>} </div>
</div> </div>
</div> </div>

@ -39,7 +39,7 @@ class TPMBanner extends Component {
this.state={ this.state={
Forkvisible: false, Forkvisible: false,
Senttothetype:false, Senttothetype:false,
Senttothevcalue:1, Senttothevcalue:undefined,
courses_count:1, courses_count:1,
course_list:[], course_list:[],
pagenum:1, pagenum:1,
@ -62,6 +62,7 @@ class TPMBanner extends Component {
isIE:false, isIE:false,
Forkvisibletype: false, Forkvisibletype: false,
isSpin:false, isSpin:false,
Senttothevcaluetype:false
} }
} }
@ -233,12 +234,21 @@ class TPMBanner extends Component {
}); });
} }
sendeSenttothevcalue=()=>{ sendeSenttothevcalue=()=>{
let {Senttothevcalue}=this.state; let {Senttothevcalue}=this.state;
if(Senttothevcalue===undefined){
this.setState({
Senttothevcaluetype:true
})
return
}
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/send_to_course.json"; let url="/shixuns/" + id +"/send_to_course.json";
axios.post(url,{ axios.post(url,{
course_id:Senttothevcalue course_id:Senttothevcalue
}).then((response) => { }).then((response) => {
this.props.showSnackbar(response.data.message); this.props.showSnackbar(response.data.message);
this.setState({ this.setState({
Senttothetype:false, Senttothetype:false,
@ -466,6 +476,7 @@ class TPMBanner extends Component {
shixunsreplace, shixunsreplace,
hidestartshixunsreplacevalue, hidestartshixunsreplacevalue,
Forkvisibletype, Forkvisibletype,
Senttothevcaluetype,
isIE} = this.state; isIE} = this.state;
let {shixunsDetails, shixunId, star_info, star_infos} = this.props; let {shixunsDetails, shixunId, star_info, star_infos} = this.props;
let challengeBtnTipText = ''; let challengeBtnTipText = '';
@ -839,7 +850,7 @@ class TPMBanner extends Component {
/> />
</div> </div>
<div id="search_course_list" className={courses_count > 12?"cdefault mb20":"cdefault mb50"}> <div id="search_course_list" className={courses_count > 12?"cdefault ":"cdefault "}>
<div className="clearfix mb5 edu-bg-light-blue edu-h315"> <div className="clearfix mb5 edu-bg-light-blue edu-h315">
<ul> <ul>
<RadioGroup onChange={this.onChangeSenttothevcalue} value={Senttothevcalue}> <RadioGroup onChange={this.onChangeSenttothevcalue} value={Senttothevcalue}>
@ -855,8 +866,8 @@ class TPMBanner extends Component {
</ul> </ul>
</div> </div>
</div> </div>
{this.state.Senttothevcaluetype===true?<div className={"color-red"}>请选择你要发送的课堂</div>:""}
<div className="mt40 marginauto"> <div className="mt10 marginauto">
<Pagination size="small" style={{display: courses_count > 12 ? "block" : "none"}} <Pagination size="small" style={{display: courses_count > 12 ? "block" : "none"}}
showQuickJumper defaultCurrent={1} current={pages} pageSize={12} showQuickJumper defaultCurrent={1} current={pages} pageSize={12}
total={courses_count} onChange={this.onChangesendeSenttothe}/> total={courses_count} onChange={this.onChangesendeSenttothe}/>

@ -192,3 +192,9 @@ body>.-task-title {
.HeaderSearch .ant-input-search .ant-input-suffix{ .HeaderSearch .ant-input-search .ant-input-suffix{
background: transparent !important; background: transparent !important;
} }
.roundedRectangles{
position: absolute;
top: 10px;
right: -22px;
}
Loading…
Cancel
Save