|
@@ -1,10 +1,11 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
2
|
import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
|
3
|
3
|
import { FormattedMessage } from 'umi-plugin-react/locale';
|
|
4
|
+import Prompt from 'umi/prompt';
|
|
5
|
+import router from 'umi/router';
|
4
|
6
|
import styles from '../style/GoodsList.less';
|
5
|
7
|
import apis from '../../services/apis';
|
6
|
8
|
import moment from 'moment';
|
7
|
|
-import router from 'umi/router';
|
8
|
9
|
import BuildSelect from '../../components/SelectButton/BuildSelect'
|
9
|
10
|
import XForm, { FieldTypes } from '../../components/XForm';
|
10
|
11
|
import Wangedit from '../../components/Wangedit/Wangedit'
|
|
@@ -16,7 +17,6 @@ import touxiang from '../../assets/touxiang.jpg';
|
16
|
17
|
import poster1 from '../../assets/poster1.png';
|
17
|
18
|
import poster2 from '../../assets/poster2.png';
|
18
|
19
|
import xiaochengxu from '../../assets/xiaochengxu.png'
|
19
|
|
-import Prompt from 'umi/prompt';
|
20
|
20
|
|
21
|
21
|
const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
|
22
|
22
|
const { TextArea } = Input;
|
|
@@ -72,16 +72,15 @@ const BasicForm = props => {
|
72
|
72
|
function compareDate(dateTime1, dateTime2) {
|
73
|
73
|
return new Date(dateTime1) > new Date(dateTime2)
|
74
|
74
|
}
|
75
|
|
-
|
76
|
75
|
// 1)修改后的开始时间不得大于当前时间(会存在已经成功报名的用户)
|
77
|
76
|
|
78
|
77
|
// (2)修改后开始时间<当前时间<修改后结束时间:活动进行中
|
79
|
78
|
|
80
|
79
|
// (3)修改后结束时间<当前时间:活动已结束
|
81
|
80
|
if (showSignupTime[0]) {
|
82
|
|
- const date = data.signupTime
|
|
81
|
+ // const date = data.signupTime
|
83
|
82
|
const nowDate = new Date()
|
84
|
|
- console.log(compareDate(nowDate, showSignupTime[0]))
|
|
83
|
+ // console.log(compareDate(nowDate, showSignupTime[0]))
|
85
|
84
|
if (compareDate(nowDate, showSignupTime[0])) {
|
86
|
85
|
return true
|
87
|
86
|
} else {
|