dev_hs
杨树林 6 years ago
parent 8fa0e46d52
commit 3affed7a52

@ -275,6 +275,11 @@ class App extends Component {
}) })
window.location.href = "/"; window.location.href = "/";
}; };
ModalshowCancelsy=()=>{
this.setState({
mydisplay:true,
})
};
componentDidMount() { componentDidMount() {
// force an update if the URL changes // force an update if the URL changes
history.listen(() => { history.listen(() => {
@ -327,7 +332,7 @@ class App extends Component {
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview> <Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state} HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}/> <Addcourses {...this.props} {...this.state} HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}/>
<AccountProfile {...this.props} {...this.state} /> <AccountProfile {...this.props} {...this.state} />
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy}/> <Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy}/>
<Router> <Router>
<Switch> <Switch>

@ -442,7 +442,8 @@ class Goldsubject extends Component {
var subjectids=this.props.match.params.subjectid; var subjectids=this.props.match.params.subjectid;
window.location.href=`/paths/${subjectids}` window.location.href=`/paths/${subjectids}`
}else{ }else{
this.props.history.goBack(); // this.props.history.goBack();
window.location.href=`/courses/${this.props.match.params.coursesId}/informs`
} }
} }

@ -18,20 +18,23 @@ class Certifiedprofessional extends Component {
componentDidMount() { componentDidMount() {
// console.log("加入金品课堂"); // console.log("加入金品课堂");
// console.log(this.props); // console.log(this.props);
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 410) {
try {
this.props.ModalshowCancelsy();
}catch (e) {
} }
componentDidMount() {
// axios.interceptors.response.use((response) => { }
// if (response != undefined) return response;
// if (response && response.data.status === -1) { }, (error) => {
//
// } });
// return response;
// }, (error) => {
// //TODO 这里如果样式变了会出现css不加载的情况
//
// });
} }
modalCancel=()=>{ modalCancel=()=>{
this.props.ModalCancelsy(); this.props.ModalCancelsy();
}; };

Loading…
Cancel
Save