forked from Gitlink/forgeplus-react
判断是否登录-checkiflogin
This commit is contained in:
parent
794cf1f283
commit
da58b17ca2
|
@ -395,14 +395,14 @@ class App extends Component {
|
|||
}
|
||||
}>
|
||||
</Route>
|
||||
<Route
|
||||
{/* <Route
|
||||
path={"/"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Projects {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
</Route> */}
|
||||
|
||||
{/* 判断为用户/组织,并进入对应页面 */}
|
||||
{
|
||||
|
|
|
@ -111,6 +111,7 @@ function List(props){
|
|||
}
|
||||
</div>
|
||||
<Right
|
||||
{...props}
|
||||
admin={organizeDetail && organizeDetail.is_admin}
|
||||
OIdentifier={OIdentifier}
|
||||
showCompeleteDialog={props.showCompeleteDialog}
|
||||
|
|
|
@ -37,10 +37,9 @@ const Img = styled.img`{
|
|||
height:45px;
|
||||
margin-right:12px;
|
||||
}`
|
||||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile }) {
|
||||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile ,checkIfLogin , showLoginDialog , current_user }) {
|
||||
const [ memberData, setMemberData ] = useState(undefined);
|
||||
const [ groupData, setGroupData ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
if(OIdentifier){
|
||||
getMember(OIdentifier);
|
||||
|
@ -91,6 +90,9 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
|||
bottom={
|
||||
admin &&
|
||||
<CheckProfile
|
||||
current_user={current_user}
|
||||
checkIfLogin={checkIfLogin}
|
||||
showLoginDialog={showLoginDialog}
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
completeProfile={completeProfile}
|
||||
sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
|
||||
|
|
|
@ -5,7 +5,7 @@ import CheckProfile from '../../Component/ProfileModal/Profile';
|
|||
|
||||
const { Search } = Input;
|
||||
const limit = 20;
|
||||
function ConcentrateBox({ visible , onCancel , onSure , username , choosed , history , showCompeleteDialog , completeProfile , current_user }) {
|
||||
function ConcentrateBox({ visible , onCancel , onSure , username , choosed , history , showCompeleteDialog , completeProfile , current_user,checkIfLogin,showLoginDialog }) {
|
||||
const [ page , setPage ]= useState(1);
|
||||
const [ total , setTotal ]= useState(0);
|
||||
const [ pageSize , setPageSize ] = useState(false);
|
||||
|
@ -173,6 +173,8 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
|
|||
(list && list.length === 0) && (copyList && copyList.length === 0) &&
|
||||
<div style={{textAlign:"center"}}>您还没有公开的{search && `“${search}”`}项目,先去
|
||||
<CheckProfile
|
||||
checkIfLogin={checkIfLogin}
|
||||
showLoginDialog={showLoginDialog}
|
||||
current_user={current_user}
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
completeProfile={completeProfile}
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
|
|||
import axios from 'axios';
|
||||
import Box from './ConcentrateBox';
|
||||
|
||||
function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile,history}) {
|
||||
function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile,history,checkIfLogin,showLoginDialog}) {
|
||||
const [ list , setList ] = useState(undefined);
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ value , setValue ] = useState([]);
|
||||
|
@ -54,6 +54,8 @@ function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfi
|
|||
completeProfile={completeProfile}
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
history={history}
|
||||
checkIfLogin={checkIfLogin}
|
||||
showLoginDialog={showLoginDialog}
|
||||
/>
|
||||
{
|
||||
list && list.length>0 &&
|
||||
|
|
Loading…
Reference in New Issue