diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index 77b82eb0..1855da42 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React , { useEffect } from 'react'; import { WhiteBack } from '../Component/layout'; import './ops.scss'; @@ -15,6 +15,19 @@ const Infos = Loadable({ loading: Loading, }) export default ((props)=>{ + const { projectsId , owner } = props.match.params; + const open_devops = props.projectDetail && props.projectDetail.open_devops; + + // 工作流:两种状态进入的链接不同 + useEffect(()=>{ + if(open_devops !== undefined){ + if(open_devops){ + props.history.replace(`/projects/${owner}/${projectsId}/devops/list`); + }else{ + props.history.replace(`/projects/${owner}/${projectsId}/devops`); + } + } + },[open_devops]) return(