dev_forum
杨树林 6 years ago
parent fb6c09f7df
commit 6f4566e03b

@ -344,7 +344,16 @@ class CoursesBanner extends Component {
render() { render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 354")
console.log(e)
}
return ( return (
<div> <div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication> <Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>

@ -330,6 +330,24 @@ class NewHeader extends Component {
}) })
} }
educoderlogin=()=>{ educoderlogin=()=>{
//退出账号
this.setState({
isRender:true
})
// var url = `/accounts/logout.json`;
//
// axios.get((url)).then((result) => {
// if(result!==undefined){
// // this.setState({
// // isRender:true
// // })
// window.location.href = "/";
// }
// }).catch((error) => {
// console.log(error);
// })
}
educoderloginysl=()=>{
//退出账号 //退出账号
// this.setState({ // this.setState({
// isRender:true // isRender:true
@ -337,17 +355,16 @@ class NewHeader extends Component {
var url = `/accounts/logout.json`; var url = `/accounts/logout.json`;
axios.get((url)).then((result) => { axios.get((url)).then((result) => {
if(result!==undefined){ if(result!==undefined){
// this.setState({ // this.setState({
// isRender:true // isRender:true
// }) // })
window.location.href = "/"; window.location.href = "/";
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
}) })
} }
onKeywordSearch = () => { onKeywordSearch = () => {
header_search(this) header_search(this)
} }
@ -729,7 +746,7 @@ submittojoinclass=(value)=>{
<li className="bor-top-greyE"> <li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/} {/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}
<a onClick={()=>this.educoderlogin()}>退出</a> <a onClick={()=>this.educoderloginysl()}>退出</a>
</li> </li>
</ul> </ul>

Loading…
Cancel
Save