dev_forum
杨树林 5 years ago
parent 35781427ca
commit 86987a0422

@ -30,7 +30,7 @@ class Trialapplicationysl extends Component {
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
readonlyInput: true, readonlyInput: true,
user_phone_binded: props.user_phone_binded, user_phone_binded: undefined,
showTrial: false, showTrial: false,
user: undefined, user: undefined,
borredss:"bor-reds", borredss:"bor-reds",
@ -49,30 +49,44 @@ class Trialapplicationysl extends Component {
// console.log("46"); // console.log("46");
// console.log(nextProps); // console.log(nextProps);
// console.log(this.props); // console.log(this.props);
if (nextProps.user != this.props.user) { // if (nextProps.user != this.props.user) {
// console.log("50"); // // console.log("50");
// console.log(nextProps.user); // // console.log(nextProps.user);
if (nextProps.user !== undefined) { // if (nextProps.user !== undefined) {
// console.log("53"); // // console.log("53");
// console.log(nextProps.user); // // console.log(nextProps.user);
this.setState({ // this.setState({
user_phone_binded: nextProps.user.user_phone_binded, // 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() { componentDidMount() {
// console.log("53"); // console.log("53");
// //
// console.log(this.props.isRenders); // console.log(this.props.isRenders);
this.getipthon();
if (this.props.isRenders != undefined) { if (this.props.isRenders != undefined) {
this.setState({ this.setState({
isRenders: this.props.isRenders isRenders: this.props.isRenders
@ -88,9 +102,11 @@ class Trialapplicationysl extends Component {
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) {
this.getipthon();
this.setState({ this.setState({
isRenders: true isRenders: true
}) })
} }
return response; return response;
}, (error) => { }, (error) => {

Loading…
Cancel
Save