dev_forum
杨树明 5 years ago
parent f7b4316df9
commit 620dbd461e

@ -139,20 +139,19 @@ class PathDetailIndex extends Component{
let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status == 407 || result.data.status == 401) {
if (result.data.status === 407 || result.data.status === 401) {
return;
}
if (result.data.status === 403) {
return;
}
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
items: getItems(result.data.members.length),
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
}).catch((error)=>{
@ -168,6 +167,9 @@ class PathDetailIndex extends Component{
if (result.data.status == 407 || result.data.status == 401) {
return;
}
if (result.data.status === 403 ) {
return;
}
if(result.data.allow_visit===true){
this.setState({
@ -175,13 +177,8 @@ class PathDetailIndex extends Component{
items: getItems(result.data.members.length),
user_id:undefined,
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
}).catch((error)=>{
console.log(error);
})

Loading…
Cancel
Save