同上-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' :
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() {
cookie.remove('_educoder_session', { path: '/' });

View File

@ -202,8 +202,7 @@ class Detail extends Component {
// 工作流:两种状态进入的链接不同
const pathname = this.props.history.location.pathname;
let p = checkPathname(pathname);
if(p==="devops"){
if(pathname===`/projects/${owner}/${projectsId}/devops`){
if(result.data.open_devops && pathname === `/projects/${owner}/${projectsId}/devops`){
this.props.history.push(`/projects/${owner}/${projectsId}/devops/list`);
}else if(result.data.open_devops===false && pathname !== `/projects/${owner}/${projectsId}/devops`){

View File

@ -26,19 +26,20 @@ class IndexItem extends Component {
projectHref=(link , user_apply_signatures,project_id,is_secret , id)=>{
const { user , showLoginDialog } = this.props;
if(user && user.login){
let signa = user_apply_signatures && user_apply_signatures[0];
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
this.setState({
visible:true,
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
project_id
})
}else{
this.props.history.push(link);
}
debugger;
if(is_secret && (!user || (user && !user.login))){
showLoginDialog();
return;
}
let signa = user_apply_signatures && user_apply_signatures[0];
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
this.setState({
visible:true,
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
project_id
})
}else{
showLoginDialog && showLoginDialog();
this.props.history.push(link);
}
}
hideModal=()=>{