diff --git a/public/index.html b/public/index.html index 9a3bbc126..0cd671ef0 100755 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,6 @@ + 红山开源社区 @@ -9,55 +10,68 @@ - + <%= htmlWebpackPlugin.tags.headTags %> - + + -
不支持当前浏览器,请更换浏览器!
推荐使用谷歌浏览器、360浏览器极速模式、火狐浏览器或Edge浏览器!
+
不支持当前浏览器,请更换浏览器!
推荐使用谷歌浏览器、360浏览器极速模式、火狐浏览器或Edge浏览器!
+ else if (compare("Opera") && !ie11) { return 'Opera'; } + else if (compare("Safari") && !ie11) { return 'Safari'; } + })() + if (getExplorer == 'ie') { + $('#ie_info').css({ display: 'block' }); + $('#root').css({ display: 'none' }); + } + <%= htmlWebpackPlugin.tags.bodyTags %> + + \ No newline at end of file diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 74104926c..1a80b0cc4 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -526,7 +526,7 @@ .projectBannerBox{ .imgBox{ - max-height: 250px; + max-height: 14vw; } .slick-arrow{ width: 70px; diff --git a/src/home/FirstSection/index.jsx b/src/home/FirstSection/index.jsx index 8fabd64a3..72fe7134f 100644 --- a/src/home/FirstSection/index.jsx +++ b/src/home/FirstSection/index.jsx @@ -39,14 +39,14 @@ function FirstSection({ first }) { }, [first]); - function goNext(){ - window.scrollTo({ - letf:0, - top:document.querySelector(".home-second-section").offsetTop, - behavior:"smooth" - } - ) - } + // function goNext(){ + // window.scrollTo({ + // letf:0, + // top:document.querySelector(".home-second-section").offsetTop, + // behavior:"smooth" + // } + // ) + // } return (
diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx index 6dbf817fe..54e400038 100644 --- a/src/military/task/taskDetail/index.jsx +++ b/src/military/task/taskDetail/index.jsx @@ -581,7 +581,7 @@ export default Form.create()( {/* 若后台为“手动公示”,则显示按钮,是否公示由雇主与管理员是否点击“应征者名单公示”按钮决定,同时必须有成果,非关闭状态 */} - {!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode === 2 && 应征者名单公示 >>} + {!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode === 2 && [5,6,7,8].includes(detailData.status)&&应征者名单公示 >>} {detailData.isProofBoolean && 评审结果公示} diff --git a/src/military/task/taskList/index.jsx b/src/military/task/taskList/index.jsx index fa6c66598..4d6df5988 100644 --- a/src/military/task/taskList/index.jsx +++ b/src/military/task/taskList/index.jsx @@ -35,6 +35,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta // 手机端适配 useEffect(() => { + window.scrollTo(0, 0) if (!IsPC()) { // 手动添加mate标签 addMeta( diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index e21ce0140..102d085d2 100644 --- a/src/modules/login/LoginDialog.js +++ b/src/modules/login/LoginDialog.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Base64 } from 'js-base64'; import Dialog from 'material-ui/Dialog'; -import { notification } from 'antd'; +import { notification,Input } from 'antd'; import axios from 'axios'; import educoderLogo from './educoder.png'; @@ -178,8 +178,7 @@ class LoginDialog extends Component { }; passwordChange = () => { - let value = this.refs.passwordText.value; - + let value = this.refs.passwordText.input.value; let valuenum = value.length; this.setState({ disabled: false }) this.setState({ bottonclass: 'log-botton mt5 edu-back-blue' }) @@ -531,8 +530,8 @@ class LoginDialog extends Component {

{Phonenumberisnotco}

-
- {settings && 红山开源} + {settings && 红山开源}
欢迎登录 红山开源 @@ -118,7 +118,7 @@ function Login(props) { { settings && !is_local && settings.third_party_test && settings.third_party_test.length > 0 ? -

+

———————— 快速登录 ————————

{settings.third_party_test.map((item, key) => { diff --git a/src/modules/loginRegister/LoginRegisterPage.scss b/src/modules/loginRegister/LoginRegisterPage.scss index ea40f32be..f75bf2573 100644 --- a/src/modules/loginRegister/LoginRegisterPage.scss +++ b/src/modules/loginRegister/LoginRegisterPage.scss @@ -257,7 +257,7 @@ } .logoimgbox{ text-align: center; - .logoimg{ + .loginlogo{ width: 100px; max-width: 30vw; margin-bottom: 1vh; @@ -278,7 +278,7 @@ display: block; } .logoimgbox{ - .logoimg{ + .loginlogo{ width: 150px; } } diff --git a/src/modules/loginRegister/Register.jsx b/src/modules/loginRegister/Register.jsx index 66b60a95b..d75aaf483 100644 --- a/src/modules/loginRegister/Register.jsx +++ b/src/modules/loginRegister/Register.jsx @@ -186,7 +186,7 @@ function Register(props) { return (
- {settings&&红山开源} + {settings&&红山开源}
欢迎注册 红山开源 diff --git a/src/modules/loginRegister/ResetPassword.jsx b/src/modules/loginRegister/ResetPassword.jsx index a9746e2cd..8bd8c60b5 100644 --- a/src/modules/loginRegister/ResetPassword.jsx +++ b/src/modules/loginRegister/ResetPassword.jsx @@ -172,7 +172,7 @@ function ResetPassword(props) {
- {settings&&红山开源} + {settings&&红山开源}
找回密码 diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js index e1220ce45..2ada6db67 100644 --- a/src/modules/tpm/NewHeader.js +++ b/src/modules/tpm/NewHeader.js @@ -1,7 +1,7 @@ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import { Link } from "react-router-dom"; import AccountProfile from "../user/AccountProfile"; -import { getImageUrl,getLogoImageUrl } from 'educoder'; +import { getImageUrl, getLogoImageUrl } from 'educoder'; import { getUserInfo } from 'src/military/expert/api'; import axios from 'axios'; import { Modal, Input, message, notification, Button, Popover, Badge } from 'antd'; @@ -25,7 +25,7 @@ let old_url; window._header_componentHandler = null; // 非trustie链接则新开页跳转 -const str = ['www.trustie.net','forgeplus.trustie.net','forum.trustie.net','testforgeplus.trustie.net'] +const str = ['www.trustie.net', 'forgeplus.trustie.net', 'forum.trustie.net', 'testforgeplus.trustie.net'] class NewHeader extends Component { constructor(props) { super(props) @@ -54,7 +54,7 @@ class NewHeader extends Component { settings: null, goshowqqgtounp: false, visiblemyss: false, - visible:false, //浮动消息框展示控制 + visible: false, //浮动消息框展示控制 } } componentDidMount() { @@ -86,7 +86,7 @@ class NewHeader extends Component { //获取游览器地址 try { window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href)) - } catch (e) {} + } catch (e) { } } openNotification = (messge) => { @@ -580,24 +580,24 @@ class NewHeader extends Component { const hostname = window.location.hostname; const port = window.location.port; const isDev = hostname == "localhost"; - let isdev2= isDev ?'http://117.50.100.12:49999':`http://${hostname}`; + let isdev2 = isDev ? 'http://117.50.100.12:49999' : `http://${hostname}`; let str = ""; - if(url.indexOf("http")>-1){ - if(url.indexOf("https")>-1){ + if (url.indexOf("http") > -1) { + if (url.indexOf("https") > -1) { isdev2 = `https://${hostname}`; } - if(!isDev && port){ - isdev2+=`:${port}`; + if (!isDev && port) { + isdev2 += `:${port}`; } - str = isdev2+match.path; - }else{ + str = isdev2 + match.path; + } else { str = match.path; } - console.log(str,(url+"/"),url && str === url); - if (url && (str === url || str===(url+"/"))) { + console.log(str, (url + "/"), url && str === url); + if (url && (str === url || str === (url + "/"))) { return true - }else { + } else { return false } @@ -643,22 +643,22 @@ class NewHeader extends Component { goshowqqgtounp: bool }) } - needAdd=(url)=> { - let {current_user,mygetHelmetapi,history}=this.props; + needAdd = (url) => { + let { current_user, mygetHelmetapi, history } = this.props; if (current_user.authentication || current_user.enterprise_certification) { history.push('/needs/new') } else { Modal.confirm({ content: "请先完成实名认证再提交需求申请,是否前往认证?", onOk() { - window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`; + window.location.href = `${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`; } }) } } render() { - const { resetUserInfo , showNotification, match, current_user } = this.props; + const { resetUserInfo, showNotification, match, current_user } = this.props; let { Addcoursestypes, tojoinitemtype, @@ -677,7 +677,7 @@ class NewHeader extends Component { goshowqqgtounp, visible, } = this.state; - let activeIndex =match.path === '/' || (match.path&&match.path.startsWith('/managements')) || (match.path&&match.path.startsWith('/admin'))?true: ''; + let activeIndex = match.path === '/' || (match.path && match.path.startsWith('/managements')) || (match.path && match.path.startsWith('/admin')) ? true : ''; let headtypes = '/'; if (settings) { if (settings.navbar) { @@ -744,92 +744,92 @@ class NewHeader extends Component { /> : ""} { goshowqqgtounp === true ? - this.setgoshowqqgtounp(bool)}> - :"" + this.setgoshowqqgtounp(bool)}> + : "" } - + { settings && settings.nav_logo_url ? - 红山开源社区 - : - "" + 红山开源社区 + : + "" }
{ settings && settings.navbar && settings.navbar.length > 0 ? -
    - { - settings.navbar && settings.navbar.map((item, key) => { - var new_link = item.link; - var user_login = this.props.user && this.props.user.login; - var is_hidden = item.hidden - if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) { - if (user_login) { - if (new_link.indexOf("courses") > -1) { - new_link = new_link.replace(/courses/g, user_login + "/courses") - } else if (new_link.indexOf("contests") > -1) { - new_link = new_link.replace(/contests/g, user_login + "/contests") +
      + { + settings.navbar && settings.navbar.map((item, key) => { + var new_link = item.link; + var user_login = this.props.user && this.props.user.login; + var is_hidden = item.hidden + if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) { + if (user_login) { + if (new_link.indexOf("courses") > -1) { + new_link = new_link.replace(/courses/g, user_login + "/courses") + } else if (new_link.indexOf("contests") > -1) { + new_link = new_link.replace(/contests/g, user_login + "/contests") + } + } else { + is_hidden = true } - } else { - is_hidden = true } - } - if (user_login && (new_link && new_link.indexOf("homes") > -1)) { - new_link = new_link.replace(/homes/g, user_login + "/user_activities") - } - - var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) ); - var wl = waiLian && waiLian.length>0; - return ( -
    • this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}> - {item.name} -
    • - ) - }) - } -
    - : "" + if (user_login && (new_link && new_link.indexOf("homes") > -1)) { + new_link = new_link.replace(/homes/g, user_login + "/user_activities") + } + + var waiLian = (new_link && str.filter(item => new_link.indexOf(item) > -1)); + var wl = waiLian && waiLian.length > 0; + return ( +
  • this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}> + {item.name} +
  • + ) + }) + } +
+ : "" }
- {this.props.user && this.props.user.login && + {this.props.user && this.props.user.login && } {this.props.user && this.props.user.login &&
- +
{ (coursestypes === true && this.props.user.main_site === false && (settings && !settings.add && (settings.add && settings.add.length === 0))) ? "" : - + }
} - { (settings && settings.common && settings.common.notice) && (current_user && current_user.login)? + {(settings && settings.common && settings.common.notice) && (current_user && current_user.login) ? } + content={} visible={visible} onVisibleChange={this.handleVisibleChange} destroyTooltipOnHide @@ -837,7 +837,7 @@ class NewHeader extends Component { {current_user && {/* */} - + } @@ -872,27 +872,31 @@ class NewHeader extends Component {
{user === undefined || user.login === "" ? - this.educoderlogin()} className={`mr5 ${activeIndex ? 'color-home' : 'color-grey-6'}`}>登录 { - // settings && settings.new_course && settings.new_course.register_url && ( - activeIndex ? - : - 注册 - // ) + activeIndex ? + + 登录 + + + : + + this.educoderlogin()} className={`mr5 color-grey-6`}>登录 + 注册 + } :
{/* */} - - + + {/* */}
    -
  • {this.props.current_user.username}
  • +
  • {this.props.current_user.username}
  • { - settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{ - return( + settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item, key) => { + return (
  • {item.name}
  • ) })