dev_forum
杨树明 5 years ago
parent d2c134d797
commit 526c87c769

@ -29,11 +29,13 @@ class ShixunModal extends Component{
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
this.setState({ if(result.data.message===undefined){
shixunmodallist:result.data, this.setState({
hometypepvisible:false, shixunmodallist:result.data,
newshixunmodallist:result.data.shixun_list, hometypepvisible:false,
}) newshixunmodallist:result.data.shixun_list,
})
}
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
@ -59,18 +61,18 @@ class ShixunModal extends Component{
} }
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.message===undefined){
let shixun_list = result.data.shixun_list;
for (var i = 0; i < shixun_list.length; i++) {
newshixunmodallists.push(shixun_list[i])
}
this.setState({
shixunmodallist: result.data,
newshixunmodallist: newshixunmodallists,
hometypepvisible: false
})
let shixun_list=result.data.shixun_list;
for(var i=0; i<shixun_list.length;i++){
newshixunmodallists.push(shixun_list[i])
} }
this.setState({
shixunmodallist:result.data,
newshixunmodallist:newshixunmodallists,
hometypepvisible:false
})
} }
}).catch((error)=>{ }).catch((error)=>{

Loading…
Cancel
Save