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