魏熙美 5 lat temu
rodzic
commit
ad7b6a1dbb

+ 2
- 2
src/pages/building/list/add/components/imageSet.jsx Wyświetl plik

@@ -85,9 +85,9 @@ function imageSet(props) {
85 85
     // 网路请求
86 86
     request({ ...apis.building.buildingApartmentDelete, urlData: { id: record.apartmentId } }).then(res => {
87 87
       getList()
88
-      openNotificationWithIcon('error', '操作成功')
88
+      openNotificationWithIcon('success', '操作成功')
89 89
     }).catch(err => {
90
-      openNotificationWithIcon('error', err.message)
90
+      // openNotificationWithIcon('error', err.message)
91 91
     })
92 92
   }
93 93
 

+ 9
- 3
src/pages/building/list/add/components/modalImage.jsx Wyświetl plik

@@ -163,10 +163,14 @@ class ModalImage extends React.Component {
163 163
                   {getFieldDecorator('apartmentId')(<Input />)}
164 164
               </Form.Item>
165 165
               <Form.Item label="名称">
166
-                {getFieldDecorator('apartmentName')(<Input />)}
166
+                {getFieldDecorator('apartmentName', {
167
+                  rules: [{ required: true, message: '请输入名称' }],
168
+                })(<Input />)}
167 169
               </Form.Item>
168 170
               <Form.Item label="类型">
169
-                {getFieldDecorator('apartmentType')(
171
+                {getFieldDecorator('apartmentType', {
172
+                  rules: [{ required: true, message: '请选择类型' }],
173
+                })(
170 174
                   <Select placeholder="类型">
171 175
                     <Option value="apart">户型</Option>
172 176
                     <Option value="photo">相册</Option>
@@ -183,7 +187,9 @@ class ModalImage extends React.Component {
183 187
                 )}
184 188
               </Form.Item>
185 189
               <Form.Item label="图片">
186
-              {getFieldDecorator('img')(
190
+              {getFieldDecorator('img', {
191
+                  rules: [{ required: true, message: '请选择图片' }],
192
+              })(
187 193
                 <ImageListUpload />,
188 194
               )}
189 195
               </Form.Item>

+ 3
- 2
src/pages/building/type/edi.jsx Wyświetl plik

@@ -59,8 +59,7 @@ function body(props) {
59 59
       openNotificationWithIcon('success', '操作成功')
60 60
       router.go(-1)
61 61
     }).catch(err => {
62
-      // eslint-disable-next-line no-unused-expressions
63
-      openNotificationWithIcon('error', err)
62
+      
64 63
     })
65 64
   }
66 65
 
@@ -76,6 +75,8 @@ function body(props) {
76 75
         // eslint-disable-next-line no-unused-expressions
77 76
         openNotificationWithIcon('success', '操作成功')
78 77
         router.go(-1)
78
+      }).catch(err => {
79
+        
79 80
       })
80 81
     }
81 82
 

+ 8
- 2
src/pages/building/type/index.jsx Wyświetl plik

@@ -42,6 +42,12 @@ function body() {
42 42
             删除
43 43
             <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
44 44
           </Button>
45
+          <Button type="link" style={{
46
+            color: '#FF4A4A', right: '0',
47
+          }} onClick={() => toEdi(record.buildingTypeId)}>
48
+            编辑
49
+            <Icon type="copy" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
50
+          </Button>
45 51
         </span>
46 52
       ),
47 53
     },
@@ -65,7 +71,7 @@ function body() {
65 71
       setData(res)
66 72
     }).catch(err => {
67 73
       // eslint-disable-next-line no-unused-expressions
68
-      openNotificationWithIcon('error', err)
74
+      // openNotificationWithIcon('error', err)
69 75
     })
70 76
   }
71 77
 
@@ -84,7 +90,7 @@ function body() {
84 90
     }).then(() => {
85 91
       openNotificationWithIcon('success', '操作成功')
86 92
     }).catch(err => {
87
-      //openNotificationWithIcon('error', err.message)
93
+      // openNotificationWithIcon('error', err.message)
88 94
     })
89 95
   }
90 96
 

+ 2
- 1
src/pages/integralMall/GoodsList.jsx Wyświetl plik

@@ -43,6 +43,7 @@ function header(props) {
43 43
 
44 44
   function handleReset() {
45 45
     props.form.resetFields();
46
+    getList({ pageNum: 1, pageSize: 10 });
46 47
   }
47 48
 
48 49
   // 跳转到编辑商品
@@ -64,7 +65,7 @@ function header(props) {
64 65
       onOk() {
65 66
         request({ ...apis.integralMall.changeTaGoods, data: { ...row },}).then((data) => {
66 67
           message.info('操作成功!')
67
-          getList({ pageNum: 1, pageSize: 10 });
68
+          getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
68 69
         })
69 70
       }
70 71
     });

+ 4
- 4
src/utils/request.js Wyświetl plik

@@ -86,14 +86,14 @@ request.interceptors.response.use(async (response, options) => {
86 86
       if (code != 1000) {
87 87
         if (code === 1001) {
88 88
           notification.error({
89
-            message: `请求错误`,
90
-            description: '请登录系统',
89
+            message: `请登录系统`,
90
+            // description: '请登录系统',
91 91
           });
92 92
           throw new Error('请登录系统');
93 93
         } else {
94 94
           notification.error({
95
-            message: `请求错误`,
96
-            description: message,
95
+            message,
96
+            // description: message,
97 97
           });
98 98
           throw new Error(message);
99 99
         }