forked from Gitlink/forgeplus-react
修复Safari兼容问题
This commit is contained in:
parent
bf9da54fe8
commit
589e60abad
|
@ -23,7 +23,7 @@ function Check({ current_user, showNotification, history }) {
|
|||
const [taskId, setTaskId] = useState();
|
||||
const [havePass, setHavePass] = useState(false);
|
||||
|
||||
const disabledCheck = new Date().getTime() > new Date('2022-07-01 00:00:00').getTime();
|
||||
const disabledCheck = new Date().getTime() > new Date('2022/07/01 00:00:00').getTime();
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ function Check({ current_user, showNotification, history }) {
|
|||
];
|
||||
|
||||
useEffect(() => {
|
||||
if(new Date().getTime() > new Date('2022-07-01 0:0').getTime()){
|
||||
if(new Date().getTime() > new Date('2022/07/01 0:0').getTime()){
|
||||
history.push('/403');
|
||||
}
|
||||
if (!current_user.user_id) {
|
||||
|
|
|
@ -22,16 +22,16 @@ function CheckResult({current_user, history}) {
|
|||
const [pageSize, setPageSize] = useState(20);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
|
||||
const time = new Date().getTime() > new Date('2022-06-28 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime();
|
||||
const time = new Date().getTime() > new Date('2022/06/28 1:0').getTime() && new Date().getTime() < new Date('2022/07/01 0:0').getTime();
|
||||
|
||||
useEffect(()=>{
|
||||
// 未到时间
|
||||
if(new Date().getTime() < new Date('2022-06-28 1:0').getTime()){
|
||||
if(new Date().getTime() < new Date('2022/06/28 1:0').getTime()){
|
||||
history.push('/glcc');
|
||||
}
|
||||
hasAuditRole({ userId: current_user.user_id }).then(res => {
|
||||
// 7.1之前 普通用户不可以进入此页面
|
||||
if (!(res && res.message == 'success' && res.data.hasRole) && new Date().getTime() < new Date('2022-07-01 12:0').getTime()) {
|
||||
if (!(res && res.message == 'success' && res.data.hasRole) && new Date().getTime() < new Date('2022/07/01 12:0').getTime()) {
|
||||
history.push('/glcc');
|
||||
}
|
||||
})
|
||||
|
@ -108,7 +108,7 @@ function CheckResult({current_user, history}) {
|
|||
return (
|
||||
<div className="resultListBox">
|
||||
{time && <img className="resultBanner" src={resultBanner} alt=""></img>}
|
||||
{new Date().getTime() > new Date('2022-07-01 12:0').getTime() && <img className="resultBanner" src={resultBanner2} alt=""></img>}
|
||||
{new Date().getTime() > new Date('2022/07/01 12:0').getTime() && <img className="resultBanner" src={resultBanner2} alt=""></img>}
|
||||
<div className='bgBox'>
|
||||
<div className="resultList">
|
||||
<div className='goBackBox'><a href='/glcc'>开源夏令营 / </a>入选学生名单{time && '预'}公示</div>
|
||||
|
|
|
@ -34,8 +34,8 @@ export default (props) => {
|
|||
// }
|
||||
|
||||
const [hasRole, setHasRole] = useState(false);
|
||||
const resultTime1 = new Date().getTime() > new Date('2022-06-28 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime();
|
||||
const resultTime2 = new Date().getTime() > new Date('2022-07-01 12:0').getTime() && new Date().getTime() < new Date('2022-08-12 0:0').getTime();
|
||||
const resultTime1 = new Date().getTime() > new Date('2022/06/28 1:0').getTime() && new Date().getTime() < new Date('2022/07/01 0:0').getTime();
|
||||
const resultTime2 = new Date().getTime() > new Date('2022/07/01 12:0').getTime() && new Date().getTime() < new Date('2022/08/12 0:0').getTime();
|
||||
|
||||
useEffect(() => {
|
||||
if (!current_user.user_id) {
|
||||
|
@ -132,7 +132,7 @@ export default (props) => {
|
|||
</div> */}
|
||||
|
||||
{/* 导师审核 */}
|
||||
{/* {hasRole && new Date().getTime() < new Date('2022-07-01 0:0').getTime() && <div className="apply" onClick={goToCheck}>
|
||||
{/* {hasRole && new Date().getTime() < new Date('2022/07/01 0:0').getTime() && <div className="apply" onClick={goToCheck}>
|
||||
<div>
|
||||
<img src={teacher} alt="" className="applyIcon" />
|
||||
<span className="til">导师审核</span>
|
||||
|
|
|
@ -82,15 +82,15 @@ const Glcc = (propsF) => {
|
|||
const isGlccApplyDate = Date.parse(new Date()) < 1653062400000;
|
||||
|
||||
// 学生报名时间
|
||||
const studentApplyStart = new Date().getTime() > new Date('2022-05-26').getTime();
|
||||
const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25 0:0').getTime();
|
||||
const secondStudentApplyDate = new Date().getTime() > new Date('2022-06-29 1:0').getTime() && new Date().getTime() < new Date('2022-06-30 0:0').getTime();
|
||||
const studentApplyStart = new Date().getTime() > new Date('2022/05/26').getTime();
|
||||
const isStudentApplyDate = new Date().getTime() > new Date('2022/05/26').getTime() && new Date().getTime() < new Date('2022/06/25 0:0').getTime();
|
||||
const secondStudentApplyDate = new Date().getTime() > new Date('2022/06/29 1:0').getTime() && new Date().getTime() < new Date('2022/06/30 0:0').getTime();
|
||||
// 学生中期考核入口可见时间
|
||||
const checkTime1 = new Date().getTime() > new Date('2022-08-12 8:0').getTime() && new Date().getTime() < new Date('2022-08-25 24:0').getTime();
|
||||
// 导师中期考核时间 && new Date().getTime() < new Date('2022-08-25 24:0').getTime()
|
||||
const checkTime2 = new Date().getTime() > new Date('2022-08-12 10:0').getTime();
|
||||
const checkTime1 = new Date().getTime() > new Date('2022/08/12 8:0').getTime() && new Date().getTime() < new Date('2022/08/25 24:0').getTime();
|
||||
// 导师中期考核时间 && new Date().getTime() < new Date('2022/08/25 24:0').getTime()
|
||||
const checkTime2 = new Date().getTime() > new Date('2022/08/12 10:0').getTime();
|
||||
// 中期考核结果公示8月26日0点
|
||||
const checkTime3 = new Date().getTime() > new Date('2022-08-26 0:0').getTime();
|
||||
const checkTime3 = new Date().getTime() > new Date('2022/08/26 0:0').getTime();
|
||||
|
||||
// 用户已报名课题id数组
|
||||
const [applyTaskId, setApplyTaskId] = useState({});
|
||||
|
|
|
@ -15,9 +15,9 @@ function StudentSubmit(props){
|
|||
const [reload, setReload] = useState(undefined);
|
||||
const [fileList, setFileList] = useState(undefined);
|
||||
// 学生提交材料时间
|
||||
const submitTime = new Date().getTime() < new Date('2022-08-21 24:0').getTime();
|
||||
const submitTime = new Date().getTime() < new Date('2022/08/21 24:0').getTime();
|
||||
// 学生查看导师评分时间
|
||||
const lookTime = new Date().getTime() > new Date('2022-08-24 24:0').getTime() && new Date().getTime() < new Date('2022-08-25 24:0').getTime();
|
||||
const lookTime = new Date().getTime() > new Date('2022/08/24 24:0').getTime() && new Date().getTime() < new Date('2022/08/25 24:0').getTime();
|
||||
|
||||
useEffect(()=>{
|
||||
if(!checkTime1){
|
||||
|
|
|
@ -29,8 +29,8 @@ function Apply(props) {
|
|||
// 可用于开发时不同账号报名
|
||||
// current_user && (current_user.user_id = 6)
|
||||
// current_user && (current_user.userName = "创新使者")
|
||||
const isStudentApplyDate = new Date().getTime() > new Date('2022-06-29 01:00:00').getTime() && new Date().getTime() < new Date('2022-07-01 01:00:00').getTime();
|
||||
const studentApplyEnd = new Date().getTime() > new Date('2022-07-01 01:00:00').getTime();
|
||||
const isStudentApplyDate = new Date().getTime() > new Date('2022/06/29 01:00:00').getTime() && new Date().getTime() < new Date('2022/07/01 01:00:00').getTime();
|
||||
const studentApplyEnd = new Date().getTime() > new Date('2022/07/01 01:00:00').getTime();
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
|
||||
const [imageUrl, setImageUrl] = useState(undefined);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
@ -63,7 +63,7 @@ function Apply(props) {
|
|||
// },200);
|
||||
window.scrollTo(0, 50);
|
||||
|
||||
if (new Date().getTime() < new Date('2022-05-26').getTime()) {
|
||||
if (new Date().getTime() < new Date('2022/05/26').getTime()) {
|
||||
// 不在开源夏令营报名时间之内
|
||||
window.location.href = "/glcc/subjects";
|
||||
} else if (current_user && current_user.login) {
|
||||
|
|
Loading…
Reference in New Issue