forked from Gitlink/forgeplus-react
去掉身份校验、内网不要三方登陆、创客任务编辑时不重新加载等
This commit is contained in:
parent
5923d91bec
commit
f8383b43c1
|
@ -221,5 +221,8 @@
|
|||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"webpack": "^4.42.1",
|
||||
"webpack-bundle-analyzer": "^3.7.0"
|
||||
},
|
||||
"volta":{
|
||||
"node":"8.12.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState , forwardRef, useEffect } from 'react';
|
||||
import { Form , Modal , Input , Radio } from 'antd';
|
||||
import { Form , Modal , Input , Radio ,Button} from 'antd';
|
||||
import Axios from 'axios';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
function AddProjectModal(props){
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
|
@ -78,7 +78,9 @@ function AddProjectModal(props){
|
|||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
<CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile>
|
||||
{/* 红山无资料要求限制,暂时注释 */}
|
||||
{/* <CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile> */}
|
||||
<Button type="primary" onClick={()=>setVisible(true)}>加入项目</Button>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -233,11 +233,12 @@ function CoderDepot(props){
|
|||
let checkvalue = turnbar(b);
|
||||
return (
|
||||
<Menu className="fileMenu">
|
||||
<Menu.Item>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile>
|
||||
<Menu.Item onClick={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>
|
||||
上传文件
|
||||
{/* <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile> */}
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</CheckProfile>
|
||||
<Menu.Item onClick={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件
|
||||
{/* <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</CheckProfile> */}
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ import axios from 'axios';
|
|||
import img_new from '../Images/new.png';
|
||||
import img_array from '../Images/array.png';
|
||||
import banner from '../Images/banner_list.png';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import Slider from 'react-slick';
|
||||
import left from './img/left.png';
|
||||
import right from './img/right.png';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from "react";
|
||||
import { Input, Dropdown, Menu, Icon, Pagination, Spin } from "antd";
|
||||
import { Input, Dropdown, Menu, Icon, Pagination, Spin, Button } from "antd";
|
||||
import "./merge.css";
|
||||
import "../Order/order.css";
|
||||
import "../Order/index.scss";
|
||||
|
@ -257,9 +257,10 @@ class merge extends Component {
|
|||
</div>
|
||||
{
|
||||
data && data.user_admin_or_developer &&
|
||||
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
|
||||
+ 新建合并请求
|
||||
</CheckProfile>
|
||||
<Button className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>+ 新建合并请求</Button>
|
||||
// <CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
|
||||
// + 新建合并请求
|
||||
// </CheckProfile>
|
||||
}
|
||||
</div>
|
||||
<div className="f-wrap-between screenWrap">
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Dropdown, Icon, Menu, Pagination, Typography, Popconfirm, Spin } from '
|
|||
import NoneData from '../Nodata';
|
||||
import axios from 'axios';
|
||||
import './order.css';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
|
@ -189,7 +189,8 @@ class Milepost extends Component {
|
|||
</ul>
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
|
||||
// <CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
|
||||
<Link className="topWrapper_btn" to={`/${owner}/${projectsId}/milestones/new`}>新的里程碑</Link>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
|
|||
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
|
||||
import './order.css';
|
||||
import { FlexAJ } from '../Component/layout';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import NoneData from '../Nodata';
|
||||
import OrderItem from './OrderItem';
|
||||
|
@ -246,7 +246,8 @@ class MilepostDetail extends Component {
|
|||
}
|
||||
{
|
||||
current_user && current_user.login ?
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建疑修</CheckProfile>
|
||||
// <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建疑修</CheckProfile>
|
||||
<Link className="topWrapper_btn" to={`/${owner}/${projectsId}/issues/${meilid}/new`}>创建疑修</Link>
|
||||
:
|
||||
<a className="topWrapper_btn" onClick={showLoginDialog}>创建疑修</a>
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import './Index.scss';
|
|||
import Item from './ListItem';
|
||||
import Right from './RightBox';
|
||||
import NoData from '../Nodata';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import RenderHtml from 'src/components/render-html';
|
||||
import img from '../Images/organizationImg.png';
|
||||
import Box from '../users/GeneralView/ConcentrateBox';
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getImageUrl } from 'educoder';
|
|||
import { Link } from 'react-router-dom';
|
||||
import Nodata from '../Nodata';
|
||||
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import { Progress } from 'antd';
|
||||
|
||||
const Span = styled.span`{
|
||||
|
@ -124,13 +124,13 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
|||
name="组织团队"
|
||||
count={groupData && groupData.total_count}
|
||||
bottom={
|
||||
admin &&
|
||||
<CheckProfile
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
completeProfile={completeProfile}
|
||||
sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
|
||||
className={"ant-btn ant-btn-primary"}
|
||||
>新建团队</CheckProfile>
|
||||
admin && <Link className="ant-btn ant-btn-primary" to={`/${OIdentifier}/teams/new`}>新建团队</Link>
|
||||
// <CheckProfile
|
||||
// showCompeleteDialog={showCompeleteDialog}
|
||||
// completeProfile={completeProfile}
|
||||
// sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
|
||||
// className={"ant-btn ant-btn-primary"}
|
||||
// >新建团队</CheckProfile>
|
||||
}
|
||||
url={`/${OIdentifier}/teams`}
|
||||
>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Modal , Checkbox , Spin , Input } from 'antd';
|
||||
import Axios from 'axios';
|
||||
import CheckProfile from '../../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../../Component/ProfileModal/Profile';
|
||||
import './Index.scss';
|
||||
|
||||
const { Search } = Input;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import axios from "axios";
|
||||
import ListItem from "../Main/IndexItem";
|
||||
|
|
|
@ -5,7 +5,7 @@ import Search from '../Component/Search';
|
|||
import Item from './Team-item';
|
||||
import Nodata from '../Nodata';
|
||||
import axios from 'axios';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
// import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const limit = 15;
|
||||
function Team(props){
|
||||
|
@ -57,7 +57,8 @@ function Team(props){
|
|||
<p>
|
||||
{
|
||||
current_user && current_user.login === username &&
|
||||
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||
// <CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||
<Link className="ant-btn ant-btn-primary" to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
|
||||
}
|
||||
<Dropdown overlay={menu}>
|
||||
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
|
||||
|
|
|
@ -60,6 +60,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
setPublished(true);
|
||||
setStatus(data.status);
|
||||
setPublishedAt(data.publishedAt || data.createdAt)
|
||||
}else{
|
||||
// 只有发布之前,才能更新发布人
|
||||
CompanyInfo();
|
||||
}
|
||||
let formValue = {
|
||||
name: data.name,
|
||||
|
@ -118,10 +121,11 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
};
|
||||
setFieldsValue(formValue);
|
||||
setCategoryId('7');
|
||||
CompanyInfo();
|
||||
}
|
||||
}, [id]);
|
||||
|
||||
useEffect(() => {
|
||||
function CompanyInfo(){
|
||||
getCompanyInfo().then(res => {
|
||||
if (res && res.message === 'success') {
|
||||
setEnterpriseName(res.data.enterpriseName);
|
||||
|
@ -133,7 +137,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
showNotification(res.message);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
getTaskCategory().then(data => {
|
||||
|
|
|
@ -463,6 +463,7 @@ class LoginDialog extends Component {
|
|||
render() {
|
||||
let { login, isGoing, isGoingValue, disabled, Phonenumberisnotco, dialogBox, isRender, weixinlogin, settings } = this.state;
|
||||
|
||||
|
||||
if (isRender === undefined) {
|
||||
isRender = false
|
||||
}
|
||||
|
@ -575,7 +576,7 @@ class LoginDialog extends Component {
|
|||
</span>
|
||||
</p>
|
||||
{
|
||||
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
settings && !settings.is_local && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className="thirdBox">
|
||||
|
|
|
@ -10,6 +10,9 @@ import { getImageUrl } from 'educoder';
|
|||
import './LoginRegisterPage.scss';
|
||||
|
||||
function Login(props) {
|
||||
const settings=localStorage.getItem('chromesetting')?JSON.parse(localStorage.getItem('chromesetting')):{};
|
||||
let is_local=settings.is_local;
|
||||
|
||||
const [message, setMessage] = useState();
|
||||
const [setting, setSetting] = useState(undefined);
|
||||
const { form, location } = props;
|
||||
|
@ -65,8 +68,6 @@ function Login(props) {
|
|||
}
|
||||
}
|
||||
|
||||
const settings = JSON.parse(localStorage.getItem('chromesetting'));
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="right_cont login_content">
|
||||
|
@ -116,7 +117,7 @@ function Login(props) {
|
|||
</Form>
|
||||
|
||||
{
|
||||
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
settings && !is_local && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className="thirdBox">
|
||||
|
|
|
@ -783,7 +783,7 @@ class NewHeader extends Component {
|
|||
settings && settings.add && settings.add.map((item,key)=>{
|
||||
return(
|
||||
<li key={key}>
|
||||
{ item.name!=="需求申请"?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
|
||||
{ item.url.indexOf('needs/new')<0?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
|
||||
</li>
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue