|
|
@ -44,18 +44,14 @@ class Trialapplication extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
|
|
|
// isRenders:nextProps.isRenders
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// console.log("componentWillReceiveProps");
|
|
|
|
|
|
|
|
// console.log(nextProps);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//初始化数据
|
|
|
|
//初始化数据
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
// console.log("53");
|
|
|
|
console.log("53");
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.props.isRenders);
|
|
|
|
console.log(this.props.isRenders);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.props.isRenders != undefined) {
|
|
|
|
if (this.props.isRenders != undefined) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -69,22 +65,6 @@ class Trialapplication extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 是否不显示手机栏
|
|
|
|
|
|
|
|
let url = `/users/get_user_info.json`
|
|
|
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
|
|
|
school:1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
).then((response) => {
|
|
|
|
|
|
|
|
if(response !==undefined){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
user_phone_binded:response.data.user_phone_binded
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.interceptors.response.use((response) => {
|
|
|
|
axios.interceptors.response.use((response) => {
|
|
|
|
if (response != undefined)
|
|
|
|
if (response != undefined)
|
|
|
|
if (response && response.data.status === 407) {
|
|
|
|
if (response && response.data.status === 407) {
|
|
|
@ -94,10 +74,22 @@ class Trialapplication extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return response;
|
|
|
|
return response;
|
|
|
|
}, (error) => {
|
|
|
|
}, (error) => {
|
|
|
|
// // // TODO 这里如果样式变了会出现css不加载的情况
|
|
|
|
//TODO 这里如果样式变了会出现css不加载的情况
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// console.log("89");
|
|
|
|
console.log("89");
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (this.state.props.user !== undefined) {
|
|
|
|
|
|
|
|
console.log(this.state.props.user && this.state.props.user.user_phone_binded);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
user_phone_binded: this.state.props.user.user_phone_binded,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -217,6 +209,7 @@ class Trialapplication extends Component {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
isRenders: false
|
|
|
|
isRenders: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.Cancel();
|
|
|
|
window.location.href = "/";
|
|
|
|
window.location.href = "/";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -278,6 +271,8 @@ class Trialapplication extends Component {
|
|
|
|
thiss.setState({
|
|
|
|
thiss.setState({
|
|
|
|
isRenders: false
|
|
|
|
isRenders: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
thiss.Cancel();
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
thiss.setState({
|
|
|
|
thiss.setState({
|
|
|
|
isRenders: false
|
|
|
|
isRenders: false
|
|
|
|