dingxin 5 jaren geleden
bovenliggende
commit
adb8980309

+ 6
- 0
src/pages/activity/groupActivity/editGroupActivity.jsx Bestand weergeven

@@ -85,6 +85,9 @@ const Edit = props => {
85 85
         name: 'mainImg',
86 86
         type: FieldTypes.ImageUploader,
87 87
         value: dynamicData.mainImg,
88
+        rules: [
89
+          { required: true, message: '请输入活动主图' },
90
+        ],
88 91
         help: '建议尺寸375*312px',
89 92
       },
90 93
       {
@@ -122,6 +125,9 @@ const Edit = props => {
122 125
         name: 'descImg',
123 126
         type: FieldTypes.ImageUploader,
124 127
         value: dynamicData.descImg,
128
+        rules: [
129
+          { required: true, message: '请输入活动说明' },
130
+        ],
125 131
         help: '建议宽度:335px,高度不限',
126 132
       },
127 133
     ]

+ 7
- 1
src/pages/activity/groupActivity/helpRecord.jsx Bestand weergeven

@@ -395,6 +395,12 @@ function helpRecord(row) {
395 395
   getList({ pageNumber: 1, pageSize: 10, ...e});
396 396
  }
397 397
 
398
+ function returnList(params) {
399
+  router.push({
400
+      pathname: '/activity/groupActivity/list',
401
+    });
402
+}
403
+
398 404
   const publicColumns = [
399 405
     {
400 406
       title: '拼团者',
@@ -514,7 +520,7 @@ function helpRecord(row) {
514 520
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
515 521
               重置
516 522
             </Button>
517
-            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
523
+            <Button style={{ marginLeft: 8 }} onClick={returnList}>
518 524
               返回
519 525
             </Button>
520 526
         </Form.Item>

+ 2
- 2
src/pages/activity/groupActivity/list.jsx Bestand weergeven

@@ -60,7 +60,7 @@ const toEditActivity = (groupActivityId) => () => {
60 60
       dataIndex: 'startTime',
61 61
       key: 'startTime',
62 62
       align: 'center',
63
-      render: (x, row) => <><span>{`${moment(row.startTime).format('YYYY-MM-DD hh:mm:ss')} —— ${moment(row.endTime).format('YYYY-MM-DD hh:mm:ss')}`}</span></>
63
+      render: (x, row) => <><span>{`${moment(row.startTime).format('YYYY-MM-DD HH:mm:ss')} —— ${moment(row.endTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
64 64
     },
65 65
     {
66 66
         title: '所需积分',
@@ -246,7 +246,7 @@ const handleSubmit = (e, props) => {
246 246
           )}
247 247
         </Form.Item>
248 248
         <Form.Item>
249
-          {getFieldDecorator('status')(
249
+          {getFieldDecorator('activityStatus')(
250 250
             <Select style={{ width: '180px' }} placeholder="活动状态">
251 251
               <Option value="0">进行中</Option>
252 252
               <Option value="1">未开始</Option>