diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index 18875efa8..f38804810 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -30,7 +30,7 @@ class Trialapplicationysl extends Component { Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, readonlyInput: true, - user_phone_binded: props.user_phone_binded, + user_phone_binded: undefined, showTrial: false, user: undefined, borredss:"bor-reds", @@ -49,30 +49,44 @@ class Trialapplicationysl extends Component { // console.log("46"); // console.log(nextProps); // console.log(this.props); - if (nextProps.user != this.props.user) { - // console.log("50"); - // console.log(nextProps.user); - if (nextProps.user !== undefined) { - // console.log("53"); - // console.log(nextProps.user); - this.setState({ - user_phone_binded: nextProps.user.user_phone_binded, - }) - } - - - } + // if (nextProps.user != this.props.user) { + // // console.log("50"); + // // console.log(nextProps.user); + // if (nextProps.user !== undefined) { + // // console.log("53"); + // // console.log(nextProps.user); + // this.setState({ + // user_phone_binded: nextProps.user.user_phone_binded, + // }) + // } + // + // + // } } - + getipthon=()=>{ + // console.log("Trialapplicationysl"); + // console.log("70"); + let url = `/users/get_user_info.json` + axios.get(url).then((result)=> { + console.log(result); + if(result){ + this.setState({ + user_phone_binded:result.data.user_phone_binded, + }) + } + }).catch((error)=>{ + console.log(error) + }) + } //初始化数据 componentDidMount() { // console.log("53"); // // console.log(this.props.isRenders); - + this.getipthon(); if (this.props.isRenders != undefined) { this.setState({ isRenders: this.props.isRenders @@ -88,9 +102,11 @@ class Trialapplicationysl extends Component { axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { + this.getipthon(); this.setState({ isRenders: true }) + } return response; }, (error) => {