diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 3ced6b94b..880afc226 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1637302844926') format('woff2'), - url('iconfont.woff?t=1637302844926') format('woff'), - url('iconfont.ttf?t=1637302844926') format('truetype'); + src: url('iconfont.woff2?t=1637544235157') format('woff2'), + url('iconfont.woff?t=1637544235157') format('woff'), + url('iconfont.ttf?t=1637544235157') format('truetype'); } .iconfont { diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index 6f5159504..da292d237 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -313,17 +313,17 @@ li.ant-menu-item{ } } .-task-sidebar>div { - height: 40px; - line-height: 40px; + height: 48px; + line-height: 48px; box-sizing: border-box; - width: 40px; + width: 48px; color: #999; font-size: 20px; text-align: center; margin-bottom: 20px; border-radius: 50%; background: #FFFFFF; - box-shadow: 0px 0px 10px 1px #F1F1F1; + box-shadow: 0px 0px 12px 5px rgba(208, 208, 208, 0.2); } .-task-sidebar>div i { @@ -334,36 +334,40 @@ li.ant-menu-item{ color: #fff !important; } .-task-sidebar>div:hover{ - background: #1890FF; + background: #466AFF; box-shadow: 0px 0px 10px 2px #B6D0FC; } .helpBox{ width: 260px; z-index: 103; &.shareContent{ - width: 200px; + width: 160px; + } + .ant-popover-title{ + font-size: 16px; } .ant-popover-inner-content{ padding:0px; } p.titlecontent{ - font-size: 18px; + font-size: 16px; color: #333; line-height: 20px; padding:15px 20px; } .faqUl{ - padding:0px 20px 10px; + padding:10px 15px; max-height: 230px; overflow-y: auto; + font-size: 13px; li{ background: #F5F5F5; border-radius: 20px; - padding:0px 20px; + padding:0px 15px; color: #333; - height: 34px; - line-height: 34px; - margin-bottom: 10px!important; + height: 30px; + line-height: 30px; + margin-bottom: 3px !important; a{ display: block; overflow: hidden; @@ -379,19 +383,18 @@ li.ant-menu-item{ } } .shareUl{ - padding:10px 0px; display: flex; align-items: center; - .titlecontent{ - margin-right: 20px; - } li > i{ font-size: 32px!important; } } } - - +// tooltip样式 +.tooltipBox .ant-tooltip-inner{ + padding: 8px 12px; + font-size: 15px; +} .-task-desc { background: #494949; @@ -439,3 +442,21 @@ li.ant-menu-item{ border-left: 5px solid #494949; border-bottom: 6px solid transparent } +//头部输入框样式 +.headSerach{ + background: rgba(255, 255, 255, 0.1); + border-radius: 4px; + padding-left: 20px; + //修改antd输入框默认样式 + .ant-input,.ant-input:focus{ + border: none !important; + background-color: rgba(255, 255, 255, 0) !important; + } + &:hover{ + padding: 2px 20px 2px 20px; + background: #FFF; + & i{ + color: #333; + } + } +} diff --git a/src/forge/Component/SiderBar.js b/src/forge/Component/SiderBar.js index 3d6b8acf8..a5c4836d9 100644 --- a/src/forge/Component/SiderBar.js +++ b/src/forge/Component/SiderBar.js @@ -23,9 +23,13 @@ $(window).scroll(function () { function SiderBar() { const [ data , setData ] = useState([]); const [ visible , setVisible ] = useState(false); + const [ login , setLogin ]= useState(false); useEffect(()=>{ getFAQ(); + getCurrentUser(); + //页面加载完成之后隐藏回到顶点 + $(".-task-sidebar .gotop").hide(); },[]) function getFAQ(){ @@ -36,9 +40,19 @@ function SiderBar() { } }).catch(error=>{}) } + + //获取当前登录账号信息->用于建议反馈 + function getCurrentUser(){ + let url = `/users/get_user_info.json`; + axios.get(url).then((response) => { + if (response && response.data && response.data.login) { + setLogin(response.data.login); + } + }).catch(error=>{}) + } + function content(list){ return
-

帮助

} + return (
- setVisible(false)}/> + {/* 平台反馈 */} + +
+ + + +
+
+ + {/* 帮助 */} { data && data.length > 0 && (data[0] && data[0].question) ? - +
- +
:"" } + + {/* 分享 */} {/*
*/} + setVisible(false)}/>
- +
-
- + + {/* 返回顶部 */} + +
- -
+
+
) } diff --git a/src/forge/Component/SiderBarShareModal.jsx b/src/forge/Component/SiderBarShareModal.jsx index aa8db379e..cf9115038 100644 --- a/src/forge/Component/SiderBarShareModal.jsx +++ b/src/forge/Component/SiderBarShareModal.jsx @@ -17,9 +17,9 @@ function SiderBarShareModal({visible,urlValue,onCancel}) { value={urlValue} size={200} fgColor="#000000" - style={{margin:"20px"}} + style={{margin:"0 20px 20px"}} />} -

打开微信“扫一扫”,点击右上角菜单,即可将网页分享至朋友圈

+

打开微信“扫一扫”,点击右上角菜单,即可将网页分享至朋友圈

) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 8327e232c..a00deb206 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -337,6 +337,15 @@ function CoderDepot(props){ } }) } + + function createIssue(){ + if(baseOper){ + window.open(`/${owner}/${projectsId}/issues/new`,'_blank'); + }else{ + props.showLoginDialog(`/${owner}/${projectsId}/issues/new`); + } + } + let n = fileInfo && fileInfo.name; const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; @@ -422,16 +431,16 @@ function CoderDepot(props){ { - (baseOperate || baseOper) &&
{ baseOperate && urlLink(`/${owner}/${projectsId}/compare/master...${branchName || defaultBranch}`)} >+ 合并请求 } - { + + 易修 + {/* { baseOper && urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 易修 - } + } */}
} { fileOperate && diff --git a/src/forge/Order/New.js b/src/forge/Order/New.js index f9562a7d0..691b3ad54 100644 --- a/src/forge/Order/New.js +++ b/src/forge/Order/New.js @@ -2,9 +2,23 @@ import React, { Component } from "react"; import OrderForm from './order_form' class New extends Component { + + constructor(props){ + super(props); + this.state = { + type : undefined, + } + } + + componentDidMount = () => { + const searchParams = new URLSearchParams(this.props.location.search.substring(1)); + this.setState({ + type : searchParams.get("type"), + }) + } render() { return ( - + ) } } diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 7275c759a..3508b2824 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -342,22 +342,26 @@ class order extends Component { console.log(error); }); }; - - islogin=()=>{ - this.props.showLoginDialog(); - } - renderNew =()=>{ + + createIssue = () => { const { data } = this.state; + const { projectsId , owner } = this.props.match.params; if(data && data.user_admin_or_member){ - const { projectsId , owner } = this.props.match.params; - return( - {window.open(`/${owner}/${projectsId}/issues/new`,'_blank')}}> - + 创建易修 - - ) + window.open(`/${owner}/${projectsId}/issues/new`,'_blank'); + }else{ + this.props.showLoginDialog(`/${owner}/${projectsId}/issues/new`); } } + renderNew =()=>{ + return( + // {createIssue()}}> + // + 创建易修 + // + + 创建易修 + ) + } + // 修改开始时间 changeBeginTime = (data, value) => { const { status_type } = this.state; diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index d3282d6df..fe30ec749 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -100,7 +100,22 @@ class order_form extends Component { isSpin:false }); - if(this.props.form_type !== "new"){ + if(this.props.form_type === "feedback"){ + let data ={ + //指派给段甲生,类型:缺陷,优先度:正常,issue状态:新增 + tracker_id: "1", + assigned_to_id: "36480", + priority_id: "2", + status_id: "1", + description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n", + } + this.setState({ ...data }); + this.props.form.setFieldsValue({ + ...this.state, + fixed_version_id: milepostId || "" + }); + + }else if(this.props.form_type !== "new"){ this.get_detail(); }else{ this.props.form.setFieldsValue({ @@ -321,7 +336,7 @@ class order_form extends Component {

- {form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}易修 + {form_type === "edit" ? "编辑" :( form_type === "copy" ? "复制" : "新建")}易修

{getFieldDecorator("subject", { @@ -378,14 +393,14 @@ class order_form extends Component { onClick={this.handleSubmit} > - {form_type === "new" ? "创建" : "提交"} + {form_type === "new" || form_type === "feedback" ? "创建" : "提交"} diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.scss b/src/forge/SecuritySetting/notice/myNotice/Index.scss index 8eab84c0c..c7e011a38 100644 --- a/src/forge/SecuritySetting/notice/myNotice/Index.scss +++ b/src/forge/SecuritySetting/notice/myNotice/Index.scss @@ -40,24 +40,22 @@ border-bottom: 0px solid #e8e8e8; } - button{ - padding:0 5px; - } + .but25{height: 32px; } } -button { - color: #333333; - background: #FAFBFC; - border: 1px solid #D0D0D0; - border-radius: 4px; - height: 32px; -} -button:hover { - background: #F3F4F6; -} -button:active { - background: #EBECF0; -} +// button { +// color: #333333; +// background: #FAFBFC; +// border: 1px solid #D0D0D0; +// border-radius: 4px; +// height: 32px; +// } +// button:hover { +// background: #F3F4F6; +// } +// button:active { +// background: #EBECF0; +// } .deleteBut{ color: #DF0002; diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index fd8c46738..7e1dee6b5 100644 --- a/src/modules/login/LoginDialog.js +++ b/src/modules/login/LoginDialog.js @@ -102,7 +102,8 @@ class LoginDialog extends Component { Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, weixinlogin: false, - qqlogin: false + qqlogin: false, + settings:undefined, }; } enter = (num) => { @@ -324,7 +325,9 @@ class LoginDialog extends Component { //true为PC端,false为手机端 let flag = this.IsPC(); this.setState({ - isphone: flag + isphone: flag, + //查询第三方登录信息 + settings: JSON.parse(localStorage.getItem("chromesetting")), }) if (this.props.isRender != undefined) { @@ -393,7 +396,8 @@ class LoginDialog extends Component { isRender: false }) this.props.Modifyloginvalue(response.data); - window.location.reload(); + this.props.gopage ? (window.location.href = this.props.gopage) : window.location.reload() + // window.location.reload(); } }).catch((error) => { console.log(error) @@ -454,8 +458,7 @@ class LoginDialog extends Component { } render() { - let { login, isGoing, isGoingValue, disabled , Phonenumberisnotco , dialogBox, isRender, weixinlogin } = this.state; - let { settings } = this.props; + let { login, isGoing, isGoingValue, disabled , Phonenumberisnotco , dialogBox, isRender, weixinlogin, settings } = this.state; if (isRender === undefined) { isRender = false diff --git a/src/modules/loginRegister/Login.jsx b/src/modules/loginRegister/Login.jsx index b5e930ba5..3f8350382 100644 --- a/src/modules/loginRegister/Login.jsx +++ b/src/modules/loginRegister/Login.jsx @@ -9,18 +9,15 @@ import './LoginRegisterPage.scss'; function Login(props){ const [message,setMessage] = useState(); const [setting, setSetting] = useState(undefined); - const {form} = props; + const {form, location} = props; const {getFieldDecorator } = form; + const {search} = location; useEffect(()=>{ //控制密码输入框在DOM不可见value clear; - //请求settings.json接口获取第三方登录平台信息 - axios.get(`/setting.json`).then((response) => { - if (response && response.data) { - setSetting(response.data.setting); - } - }) + //获取第三方登录平台信息 + setSetting(JSON.parse(localStorage.getItem("chromesetting"))); },[]) // 登录表单提交 @@ -37,7 +34,10 @@ function Login(props){ } else { //判断用户是否选择【下次自动登录】 cookie.save('autologin',values.remember); - window.location.href = "/"+response.data.login; + const searchParams = new URLSearchParams(search.substring(1)); + const goPage = searchParams.get("go_page"); + //意见反馈 + window.location.href = goPage ? goPage : `/${response.data.login}` } }).catch((error) => { console.log('error',error); diff --git a/src/modules/loginRegister/Register.jsx b/src/modules/loginRegister/Register.jsx index d9195837f..441ad46e5 100644 --- a/src/modules/loginRegister/Register.jsx +++ b/src/modules/loginRegister/Register.jsx @@ -8,7 +8,10 @@ import './LoginRegisterPage.scss'; function Register(props){ const {form} = props; const {getFieldDecorator } = form; + //用户输入的符合规则的邮箱(用于获取验证码) const [emailStr, setEmailStr] = useState(undefined); + //用户输入的符合规则的用户名,用于当用户输入符合规则的用户名之后再更改又去触发check.json接口 + const [loginStr, setLoginStr] = useState(undefined); const [secondsStr, setSecondsStr] = useState(60); const [countDown, setCountDown] = useState(false); const [getCaptchaBut, setGetCaptchaBut] = useState(false); @@ -50,27 +53,29 @@ function Register(props){ //判断用户名(username)是否注册 function usernameConfirm(rule, value, callback){ setUserNameGo(true); - value && userNameGo ? axios.post(`/accounts/check.json`, { + value && (userNameGo || value !== loginStr) ? axios.post(`/accounts/check.json`, { value: value, type: 1 }).then(response => { if (response.data.status === -1) { callback('该名称已经被使用'); } else { + setLoginStr(value); setUserNameGo(false); callback(); } - }):callback() + }):callback();setLoginStr(undefined); } //判断邮箱是否注册 function emailConfirm(rule, value, callback) { setEmailGo(true); - value && emailGo ? axios.post(`/accounts/check.json`, { + value && (emailGo || value !== emailStr) ? axios.post(`/accounts/check.json`, { value: value, type: 2 }).then(response => { if (response.data.status === -1) { + setGetCaptchaBut(false); callback('该邮箱已被注册'); } else { setEmailStr(value); diff --git a/src/modules/loginRegister/ResetPassword.jsx b/src/modules/loginRegister/ResetPassword.jsx index cb7e01a44..d1226995a 100644 --- a/src/modules/loginRegister/ResetPassword.jsx +++ b/src/modules/loginRegister/ResetPassword.jsx @@ -57,16 +57,17 @@ function ResetPassword(props) { //判断邮箱是否注册 function emailConfirm(rule, value, callback) { setEmailGo(true); - value && emailGo ? axios.post(`/accounts/check.json`, { + value && (emailGo || value !== emailStr) ? axios.post(`/accounts/check.json`, { value: value, type: 2 }).then(response => { if (response.data && response.data.status === -1) { - setEmailStr(value) + setEmailStr(value); setGetCaptchaBut(true); setEmailGo(false); callback(); } else { + setGetCaptchaBut(false); callback('此邮箱未注册'); } }):callback();setEmailStr(undefined); diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 5d976b7d5..b24f52ea9 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -29,7 +29,8 @@ export function TPMIndexHOC(WrappedComponent) { email:undefined, completeProfile:false, showCP:false, - showNotice:true + showNotice:true, + gopage: undefined, } } @@ -151,7 +152,6 @@ export function TPMIndexHOC(WrappedComponent) { } fetchUsers = () => { - console.log(this.props.match) if (this.props.match.path === "/") { this.setState({ publicNav:true @@ -197,10 +197,11 @@ export function TPMIndexHOC(WrappedComponent) { }) } - showLoginDialog = () => { + showLoginDialog = (gopage) => { this.setState({ isRender: true, - isloginCancel: "iscancel" + isloginCancel: "iscancel", + gopage: gopage, }) } //验证登录是否成功方法