同上-update

This commit is contained in:
caishi 2021-01-04 16:43:15 +08:00
parent 3f8f1b8083
commit dde7fa730a
3 changed files with 15 additions and 15 deletions

View File

@ -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: '/' });

View File

@ -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`){

View File

@ -26,7 +26,11 @@ 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;
if(is_secret && (!user || (user && !user.login))){
showLoginDialog();
return;
}
let signa = user_apply_signatures && user_apply_signatures[0]; let signa = user_apply_signatures && user_apply_signatures[0];
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){ if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
this.setState({ this.setState({
@ -37,9 +41,6 @@ class IndexItem extends Component {
}else{ }else{
this.props.history.push(link); this.props.history.push(link);
} }
}else{
showLoginDialog && showLoginDialog();
}
} }
hideModal=()=>{ hideModal=()=>{
this.setState({ this.setState({