周立森 5 gadus atpakaļ
vecāks
revīzija
c5b345edad

+ 6
- 6
src/pages/news/list/NewsList.jsx Parādīt failu

@@ -100,7 +100,7 @@ function body(props) {
100 100
         onOk() {
101 101
           request({ ...apis.news.put, urlData: { id: newsId }, data: { ...row, status: -1 } }).then((data) => {
102 102
             message.info('操作成功!')
103
-            getList({ pageNum: 1, pageSize: 10 });
103
+            getList({ pageNum: 1, pageSize: 6 });
104 104
           }).catch((err) => {
105 105
             console.log(err)
106 106
             message.info(err.msg || err.message)
@@ -125,7 +125,7 @@ function body(props) {
125 125
       request({ ...apis.news.weight, params: {newsId: newsId, weight} }).then((data) => {
126 126
           console.log(data)
127 127
           message.info('操作成功!')
128
-          getList({ pageNum: 1, pageSize: 10 })
128
+          getList({ pageNum: 1, pageSize: 6 })
129 129
       }).catch((err) => {
130 130
           console.log(err)
131 131
           message.info(err.msg || err.message)
@@ -142,7 +142,7 @@ function body(props) {
142 142
           onOk() {
143 143
             request({ ...apis.news.cancel, data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId }, urlData: { id: newsId }, }).then((data) => {
144 144
               message.info('操作成功!')
145
-              getList({ pageNum: 1, pageSize: 10 });
145
+              getList({ pageNum: 1, pageSize: 6 });
146 146
             }).catch((err) => {
147 147
               console.log(err)
148 148
               message.info(err.msg || err.message)
@@ -160,7 +160,7 @@ function body(props) {
160 160
           onOk() {
161 161
             request({ ...apis.news.cancel, data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId }, urlData: { id: newsId }, }).then((data) => {
162 162
               message.info('操作成功!')
163
-              getList({ pageNum: 1, pageSize: 10 });
163
+              getList({ pageNum: 1, pageSize: 6 });
164 164
             }).catch((err) => {
165 165
               console.log(err)
166 166
               message.info(err.msg || err.message)
@@ -318,8 +318,8 @@ function body(props) {
318 318
         }
319 319
       </Row>
320 320
       {/* 分页 */}
321
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
322
-        <Pagination showQuickJumper defaultCurrent={1} total={dataSource.total} onChange={onChange} current={dataSource.current}/>
321
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>     
322
+        <Pagination showQuickJumper defaultCurrent={1} total={dataSource.total} pageSize={6} onChange={onChange} current={dataSource.current}/>
323 323
       </div>
324 324
     </>
325 325
   );

+ 2
- 0
src/pages/news/list/editNewsList.jsx Parādīt failu

@@ -107,6 +107,7 @@ const { TextArea } = Input;
107 107
         request({ ...apis.news.put, urlData: {id: newsId}, data: { ...submitValue },}).then((data) => {
108 108
           // cancelPage();
109 109
           message.info("保存成功")
110
+          console.log(data,'data1')
110 111
         }).catch((err) => {
111 112
           message.info(err.msg || err.message)
112 113
         })
@@ -114,6 +115,7 @@ const { TextArea } = Input;
114 115
         request({ ...apis.news.post, data: { ...submitValue },}).then((data) => {
115 116
           // cancelPage();
116 117
           message.info("保存成功")
118
+          console.log(data,'data2')
117 119
         }).catch((err) => {
118 120
           message.info(err.msg || err.message)
119 121
         })