个人资料是否完善-弹框
This commit is contained in:
parent
3b03ead3af
commit
105e1c61b8
|
@ -25,7 +25,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 || 'admin'
|
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
|
||||||
}
|
}
|
||||||
window._debugType = debugType;
|
window._debugType = debugType;
|
||||||
export function initAxiosInterceptors(props) {
|
export function initAxiosInterceptors(props) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { AlignCenter } from '../layout';
|
import { AlignCenter } from '../layout';
|
||||||
import { Modal , Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import './Index.scss';
|
import Modals from '../PublicModal/Index';
|
||||||
|
|
||||||
function DeleteBox({
|
function DeleteBox({
|
||||||
visible ,
|
visible ,
|
||||||
|
@ -12,24 +12,22 @@ function DeleteBox({
|
||||||
content
|
content
|
||||||
}) {
|
}) {
|
||||||
return(
|
return(
|
||||||
<Modal
|
<Modals
|
||||||
visible={visible}
|
|
||||||
onCancel={onCancel}
|
|
||||||
title={title}
|
title={title}
|
||||||
width="600px"
|
btn={
|
||||||
className="deleteBox"
|
|
||||||
footer={
|
|
||||||
<div>
|
<div>
|
||||||
<Button size={'large'} onClick={onCancel}>取消</Button>
|
<Button size={'large'} onClick={onCancel}>取消</Button>
|
||||||
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
|
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
onCancel={onCancel}
|
||||||
|
visible={visible}
|
||||||
>
|
>
|
||||||
<div className="desc">
|
<div className="desc">
|
||||||
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
|
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
|
||||||
<p>{subTitle}</p>
|
<p>{subTitle}</p>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modals>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default DeleteBox;
|
export default DeleteBox;
|
|
@ -1,6 +1,6 @@
|
||||||
.ant-modal-mask{
|
.ant-modal-mask{
|
||||||
z-index: 1001;
|
z-index: 1031;
|
||||||
}
|
}
|
||||||
.ant-modal-wrap{
|
.ant-modal-wrap{
|
||||||
z-index: 1002;
|
z-index: 1032;
|
||||||
}
|
}
|
|
@ -1,16 +1,54 @@
|
||||||
import React from 'react';
|
import React , { useEffect , useState } from 'react';
|
||||||
import { Modal } from 'antd';
|
import Modals from '../PublicModal/Index';
|
||||||
|
import { Button } from 'antd';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
|
|
||||||
function ProfileModal({visible}) {
|
function ProfileModal({visible,onCancel,history}) {
|
||||||
|
const [ modalVis , setModalVis ] = useState(visible);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
axios.interceptors.response.use((response) => {
|
||||||
|
if (response && response.data.status === 411) {
|
||||||
|
setModalVis(true);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}, (error) => {
|
||||||
|
});
|
||||||
|
},[])
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
setModalVis(visible);
|
||||||
|
},[visible])
|
||||||
|
|
||||||
|
function onOk(){
|
||||||
|
onCancel();
|
||||||
|
setModalVis(false);
|
||||||
|
setTimeout(function(){
|
||||||
|
window.open(`/settings/profile`,"_blank");
|
||||||
|
},200)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onNo() {
|
||||||
|
onCancel();
|
||||||
|
setModalVis(false);
|
||||||
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<Modal
|
<Modals
|
||||||
visible={visible}
|
title="完善资料"
|
||||||
width={"400px"}
|
onCancel={onNo}
|
||||||
|
visible={modalVis}
|
||||||
|
btn={
|
||||||
|
<div>
|
||||||
|
<Button size={"large"} onClick={onNo}>暂不补充</Button>
|
||||||
|
<Button type={'primary'} size={"large"} onClick={onOk}>好的</Button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<p>您目前的个人资料不完整,需要补充资料以进行后续操作。是否前往补充个人信息?</p>
|
<p>您目前的个人资料不完整,需要补充资料以进行后续操作。是否前往补充个人信息?</p>
|
||||||
</Modal>
|
</Modals>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default ProfileModal;
|
export default ProfileModal;
|
|
@ -0,0 +1,17 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className}) {
|
||||||
|
|
||||||
|
function checkProfile() {
|
||||||
|
if(!completeProfile){
|
||||||
|
showCompeleteDialog && showCompeleteDialog();
|
||||||
|
}else{
|
||||||
|
sureFunc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(
|
||||||
|
<a className={className} onClick={checkProfile}>{children}</a>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default Profile;
|
|
@ -0,0 +1,19 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { Modal } from 'antd';
|
||||||
|
import './Index.scss';
|
||||||
|
|
||||||
|
function Modals({title,children,btn,onCancel,visible}) {
|
||||||
|
return(
|
||||||
|
<Modal
|
||||||
|
visible={visible}
|
||||||
|
onCancel={onCancel}
|
||||||
|
title={title}
|
||||||
|
width="600px"
|
||||||
|
className="deleteBox"
|
||||||
|
footer={btn}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Modal>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default Modals;
|
|
@ -32,14 +32,23 @@
|
||||||
border-top: none;
|
border-top: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
button{
|
button,a{
|
||||||
width: 120px;
|
width: 120px;
|
||||||
margin:0px 20px;
|
margin:0px 20px;
|
||||||
|
&.ant-btn{
|
||||||
|
border-color: #D0D0D0;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
&.ant-btn-danger{
|
&.ant-btn-danger{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #DF0002;
|
color: #DF0002;
|
||||||
border-color: #D0D0D0;
|
border-color: #D0D0D0;
|
||||||
}
|
}
|
||||||
|
&.ant-btn.ant-btn-primary{
|
||||||
|
background-color: #fff;
|
||||||
|
color: #466AFF;
|
||||||
|
border-color: #D0D0D0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { useState , forwardRef, useEffect } from 'react';
|
import React, { useState , forwardRef, useEffect } from 'react';
|
||||||
import { Form , Modal , Input , Radio } from 'antd';
|
import { Form , Modal , Input , Radio } from 'antd';
|
||||||
import Axios from 'axios';
|
import Axios from 'axios';
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
export default Form.create()(
|
export default Form.create()(
|
||||||
forwardRef((props)=>{
|
forwardRef((props)=>{
|
||||||
|
@ -77,7 +78,7 @@ export default Form.create()(
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
<a onClick={()=>setVisible(true)}>加入项目</a>
|
<CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,6 +10,7 @@ import HeadSearch from '../Component/HeadSearch';
|
||||||
|
|
||||||
import AddProjectModal from './AddProjectModal';
|
import AddProjectModal from './AddProjectModal';
|
||||||
import '../../modules/tpm/TPMIndex.css';
|
import '../../modules/tpm/TPMIndex.css';
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
import './header.scss';
|
import './header.scss';
|
||||||
const $ = window.$
|
const $ = window.$
|
||||||
|
@ -225,15 +226,14 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
checkProfile=(url)=>{
|
checkProfile=(url)=>{
|
||||||
const { showCompeleteDialog , completeProfile } = this.props;
|
const { showCompeleteDialog , completeProfile } = this.props;
|
||||||
if(completeProfile){
|
if(!completeProfile){
|
||||||
showCompeleteDialog && showCompeleteDialog();
|
showCompeleteDialog && showCompeleteDialog();
|
||||||
}else{
|
}else{
|
||||||
this.props.history.push(url);
|
window.location.href(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addMenu=(list)=>{
|
addMenu=(list)=>{
|
||||||
console.log(this.props);
|
|
||||||
return(
|
return(
|
||||||
list && list.length >0 &&
|
list && list.length >0 &&
|
||||||
<div className="dropdownFlex">
|
<div className="dropdownFlex">
|
||||||
|
@ -242,11 +242,15 @@ class NewHeader extends Component {
|
||||||
list.map((item,key)=>{
|
list.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
(item.name !=="加入课堂" && item.name !=="加入开发项目") &&
|
(item.name !=="加入课堂" && item.name !=="加入开发项目") &&
|
||||||
<Menu.Item key={item.name+key}><a onClick={this.checkProfile(item.url)}>{item.name}</a></Menu.Item>
|
<Menu.Item key={item.name+key}>
|
||||||
|
<CheckProfile {...this.props} sureFunc={()=>{window.location.href=item.url}}>{item.name}</CheckProfile>
|
||||||
|
</Menu.Item>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
<Menu.Item><AddProjectModal showNotification={this.props.showNotification}/></Menu.Item>
|
<Menu.Item>
|
||||||
|
<AddProjectModal {...this.props} showNotification={this.props.showNotification}/>
|
||||||
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,6 +20,7 @@ import DrawerPanel from '../Component/DrawerPanel';
|
||||||
import UpdateDescModal from './sub/UpdateDescModal';
|
import UpdateDescModal from './sub/UpdateDescModal';
|
||||||
import Nodata from '../Nodata';
|
import Nodata from '../Nodata';
|
||||||
import Invite from './sub/Invite';
|
import Invite from './sub/Invite';
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
/**
|
/**
|
||||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||||
*/
|
*/
|
||||||
|
@ -364,11 +365,11 @@ function CoderDepot(props){
|
||||||
<div className="mr20 addOptionBtn">
|
<div className="mr20 addOptionBtn">
|
||||||
{
|
{
|
||||||
projectDetail.type !== 2 && pullsFlag &&
|
projectDetail.type !== 2 && pullsFlag &&
|
||||||
<a onClick={()=>urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
|
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</CheckProfile>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
issuesFlag &&
|
issuesFlag &&
|
||||||
<a onClick={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
|
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务</CheckProfile>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import MergeItem from "./MergeItem";
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
const Search = Input.Search;
|
const Search = Input.Search;
|
||||||
/**
|
/**
|
||||||
|
@ -256,9 +257,9 @@ class merge extends Component {
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
data && data.user_admin_or_developer &&
|
data && data.user_admin_or_developer &&
|
||||||
<a className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>
|
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
|
||||||
+ 新建合并请求
|
+ 新建合并请求
|
||||||
</a>
|
</CheckProfile>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className="f-wrap-between screenWrap">
|
<div className="f-wrap-between screenWrap">
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { Dropdown, Icon, Menu, Pagination, Typography, Popconfirm, Spin } from '
|
||||||
import NoneData from '../Nodata';
|
import NoneData from '../Nodata';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import './order.css';
|
import './order.css';
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ class Milepost extends Component {
|
||||||
</ul>
|
</ul>
|
||||||
{
|
{
|
||||||
data && data.user_admin_or_member ?
|
data && data.user_admin_or_member ?
|
||||||
<Link to={`/${owner}/${projectsId}/milestones/new`} className="topWrapper_btn">新的里程碑</Link>
|
<CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Input, Dropdown, Menu, Icon, Pagination, Spin, DatePicker, Checkbox } from "antd";
|
import { Input, Dropdown, Menu, Icon, Pagination, Spin, DatePicker, Checkbox } from "antd";
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import "./order.css";
|
import "./order.css";
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
import NoneData from "../Nodata";
|
import NoneData from "../Nodata";
|
||||||
import OrderItem from "./OrderItem";
|
import OrderItem from "./OrderItem";
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
@ -351,9 +351,9 @@ class order extends Component {
|
||||||
if(data && data.user_admin_or_member){
|
if(data && data.user_admin_or_member){
|
||||||
const { projectsId , owner } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
return(
|
return(
|
||||||
<Link className="topWrapper_btn ml10" target="_blank" to={`/${owner}/${projectsId}/issues/new`}>
|
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={()=>{window.open(`/${owner}/${projectsId}/issues/new`,'_blank')}}>
|
||||||
+ 创建易修
|
+ 创建易修
|
||||||
</Link>
|
</CheckProfile>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,6 @@
|
||||||
}
|
}
|
||||||
.deleteBox{
|
.deleteBox{
|
||||||
.ant-modal-header{
|
.ant-modal-header{
|
||||||
background-color: rgba(223, 0, 2, 0.06);
|
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
.ant-modal-title{
|
.ant-modal-title{
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import './Index.scss';
|
||||||
import Item from './ListItem';
|
import Item from './ListItem';
|
||||||
import Right from './RightBox';
|
import Right from './RightBox';
|
||||||
import NoData from '../Nodata';
|
import NoData from '../Nodata';
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
import { Menu , Pagination , Dropdown , Spin } from 'antd';
|
import { Menu , Pagination , Dropdown , Spin } from 'antd';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
@ -61,8 +62,12 @@ function List(props){
|
||||||
)
|
)
|
||||||
const menu_new=(
|
const menu_new=(
|
||||||
<Menu>
|
<Menu>
|
||||||
<Menu.Item key="updated_on"><Link to={`/deposit/new/${OIdentifier}`}>新建托管项目</Link></Menu.Item>
|
<Menu.Item key="updated_on">
|
||||||
<Menu.Item key="created_on"><Link to={`/mirror/new/${OIdentifier}`}>新建镜像项目</Link></Menu.Item>
|
<CheckProfile {...props} sureFunc={()=>{props.history.push(`/deposit/new/${OIdentifier}`)}}>新建托管项目</CheckProfile>
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item key="created_on">
|
||||||
|
<CheckProfile {...props} sureFunc={()=>{props.history.push(`/mirror/new/${OIdentifier}`)}}>新建镜像项目</CheckProfile>
|
||||||
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ class comments extends Component {
|
||||||
content: "",
|
content: "",
|
||||||
reply_content: undefined,
|
reply_content: undefined,
|
||||||
});
|
});
|
||||||
|
this.state.new_journal_id = result.data.id;
|
||||||
|
this.getjournalslist(page, limit);
|
||||||
this.setState({
|
this.setState({
|
||||||
showFiles: false,
|
showFiles: false,
|
||||||
content: "",
|
content: "",
|
||||||
|
@ -86,10 +88,13 @@ class comments extends Component {
|
||||||
journal_spin: false,
|
journal_spin: false,
|
||||||
attachment_clean: false,
|
attachment_clean: false,
|
||||||
});
|
});
|
||||||
this.state.new_journal_id = result.data.id;
|
|
||||||
this.getjournalslist(page, limit);
|
|
||||||
}
|
}
|
||||||
|
this.setState({
|
||||||
|
journal_spin: false
|
||||||
|
});
|
||||||
|
if(result && result.data.status !== 411){
|
||||||
this.props.showNotification(result.data.message);
|
this.props.showNotification(result.data.message);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
|
@ -218,6 +218,7 @@ ul.ant-menu.menuStyle{
|
||||||
border-bottom: 2px solid transparent!important;
|
border-bottom: 2px solid transparent!important;
|
||||||
position: relative;
|
position: relative;
|
||||||
a{
|
a{
|
||||||
|
font-size: 16px;
|
||||||
& >i{
|
& >i{
|
||||||
font-size: 15px!important;
|
font-size: 15px!important;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
|
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
|
||||||
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import ListItem from "../Main/IndexItem";
|
import ListItem from "../Main/IndexItem";
|
||||||
|
@ -115,14 +115,15 @@ class InfosUser extends Component {
|
||||||
newItem =()=> (
|
newItem =()=> (
|
||||||
<Menu>
|
<Menu>
|
||||||
<Menu.Item key="created_mirror">
|
<Menu.Item key="created_mirror">
|
||||||
<Link to={`/projects/mirror/new`}>新建镜像项目</Link>
|
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/mirror/new')}}>新建镜像项目</CheckProfile>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key="created_deposit">
|
<Menu.Item key="created_deposit">
|
||||||
<Link to={`/projects/deposit/new`}>新建托管项目</Link>
|
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}} >新建托管项目</CheckProfile>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
category_button=(category)=>{
|
category_button=(category)=>{
|
||||||
const { current_user, user } = this.props;
|
const { current_user, user } = this.props;
|
||||||
const button_lists =
|
const button_lists =
|
||||||
|
@ -187,7 +188,7 @@ class InfosUser extends Component {
|
||||||
{current_user && user && current_user.login === user.login && (
|
{current_user && user && current_user.login === user.login && (
|
||||||
<Popover
|
<Popover
|
||||||
content={this.newItem()}
|
content={this.newItem()}
|
||||||
trigger={["click"]}
|
trigger={["hover"]}
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
className="mr50"
|
className="mr50"
|
||||||
>
|
>
|
||||||
|
|
|
@ -15,3 +15,10 @@
|
||||||
width: 92px;
|
width: 92px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.infosRightMenu{
|
||||||
|
.ant-menu-item{
|
||||||
|
a{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,7 @@ import Search from '../Component/Search';
|
||||||
import Item from './Team-item';
|
import Item from './Team-item';
|
||||||
import Nodata from '../Nodata';
|
import Nodata from '../Nodata';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Link } from 'react-router-dom';
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
const limit = 15;
|
const limit = 15;
|
||||||
function Team(props){
|
function Team(props){
|
||||||
|
@ -48,6 +48,7 @@ function Team(props){
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div className="headerbox">
|
<div className="headerbox">
|
||||||
|
@ -57,7 +58,7 @@ function Team(props){
|
||||||
<p>
|
<p>
|
||||||
{
|
{
|
||||||
checkIfLogin() &&
|
checkIfLogin() &&
|
||||||
<Link to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
|
<CheckProfile {...props} sureFunc={()=>{this.props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||||
}
|
}
|
||||||
<Dropdown overlay={menu}>
|
<Dropdown overlay={menu}>
|
||||||
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
|
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
|
||||||
|
|
|
@ -155,7 +155,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
this.initCommonState(response.data)
|
this.initCommonState(response.data)
|
||||||
this.setState({
|
this.setState({
|
||||||
tpmLoading: false,
|
tpmLoading: false,
|
||||||
completeProfile:!response.data.profile_completed
|
completeProfile:response.data.profile_completed
|
||||||
})
|
})
|
||||||
if (this.props.match.path === "/" && response.data.login) {
|
if (this.props.match.path === "/" && response.data.login) {
|
||||||
this.props.history.push(`/${response.data.login}`);
|
this.props.history.push(`/${response.data.login}`);
|
||||||
|
@ -226,7 +226,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
return (
|
return (
|
||||||
<div className="indexHOC">
|
<div className="indexHOC">
|
||||||
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
|
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
|
||||||
<ProfileModal visible={!completeProfile && showCP}/>
|
<ProfileModal
|
||||||
|
visible={!completeProfile && showCP}
|
||||||
|
onCancel={()=>{this.setState({showCP:false})}}
|
||||||
|
history={this.props.history}
|
||||||
|
/>
|
||||||
{isRender === true ? <LoginDialog
|
{isRender === true ? <LoginDialog
|
||||||
Modifyloginvalue={() => this.hideLoginDialog()}
|
Modifyloginvalue={() => this.hideLoginDialog()}
|
||||||
{...this.props}
|
{...this.props}
|
||||||
|
|
Loading…
Reference in New Issue