forked from Gitlink/forgeplus-react
同上-update
This commit is contained in:
parent
3f8f1b8083
commit
dde7fa730a
|
@ -27,7 +27,7 @@ if (isDev) {
|
||||||
}
|
}
|
||||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '15243705227'
|
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
|
||||||
}
|
}
|
||||||
function clearAllCookie() {
|
function clearAllCookie() {
|
||||||
cookie.remove('_educoder_session', { path: '/' });
|
cookie.remove('_educoder_session', { path: '/' });
|
||||||
|
|
|
@ -202,8 +202,7 @@ class Detail extends Component {
|
||||||
|
|
||||||
// 工作流:两种状态进入的链接不同
|
// 工作流:两种状态进入的链接不同
|
||||||
const pathname = this.props.history.location.pathname;
|
const pathname = this.props.history.location.pathname;
|
||||||
let p = checkPathname(pathname);
|
if(pathname===`/projects/${owner}/${projectsId}/devops`){
|
||||||
if(p==="devops"){
|
|
||||||
if(result.data.open_devops && pathname === `/projects/${owner}/${projectsId}/devops`){
|
if(result.data.open_devops && pathname === `/projects/${owner}/${projectsId}/devops`){
|
||||||
this.props.history.push(`/projects/${owner}/${projectsId}/devops/list`);
|
this.props.history.push(`/projects/${owner}/${projectsId}/devops/list`);
|
||||||
}else if(result.data.open_devops===false && pathname !== `/projects/${owner}/${projectsId}/devops`){
|
}else if(result.data.open_devops===false && pathname !== `/projects/${owner}/${projectsId}/devops`){
|
||||||
|
|
|
@ -26,19 +26,20 @@ class IndexItem extends Component {
|
||||||
|
|
||||||
projectHref=(link , user_apply_signatures,project_id,is_secret , id)=>{
|
projectHref=(link , user_apply_signatures,project_id,is_secret , id)=>{
|
||||||
const { user , showLoginDialog } = this.props;
|
const { user , showLoginDialog } = this.props;
|
||||||
if(user && user.login){
|
debugger;
|
||||||
let signa = user_apply_signatures && user_apply_signatures[0];
|
if(is_secret && (!user || (user && !user.login))){
|
||||||
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
|
showLoginDialog();
|
||||||
this.setState({
|
return;
|
||||||
visible:true,
|
}
|
||||||
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
|
let signa = user_apply_signatures && user_apply_signatures[0];
|
||||||
project_id
|
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
|
||||||
})
|
this.setState({
|
||||||
}else{
|
visible:true,
|
||||||
this.props.history.push(link);
|
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
|
||||||
}
|
project_id
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
showLoginDialog && showLoginDialog();
|
this.props.history.push(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hideModal=()=>{
|
hideModal=()=>{
|
||||||
|
|
Loading…
Reference in New Issue