Explorar el Código

Merge branch 'master' into v3.5

魏熙美 hace 5 años
padre
commit
a39671c960
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  1. 3
    3
      src/pages/news/list/NewsList.jsx
  2. 2
    1
      src/pages/news/type/NewsType.jsx

+ 3
- 3
src/pages/news/list/NewsList.jsx Ver fichero

@@ -92,13 +92,13 @@ function body(props) {
92 92
     }
93 93
 
94 94
     //删除资讯
95
-    const changeNewsListStatus = (newsId) => () => {
95
+    const changeNewsListStatus = (row, newsId) => () => {
96 96
       Modal.confirm({
97 97
         title: '确认删除该资讯?',
98 98
         okText: '确认',
99 99
         cancelText: '取消',
100 100
         onOk() {
101
-          request({ ...apis.news.delete, urlData: { id: newsId }, }).then((data) => {
101
+          request({ ...apis.news.put, urlData: { id: newsId }, data: { ...row, status: -1 } }).then((data) => {
102 102
             message.info('操作成功!')
103 103
             getList({ pageNum: 1, pageSize: 10 });
104 104
           }).catch((err) => {
@@ -201,7 +201,7 @@ function body(props) {
201 201
           }
202 202
         </AuthButton>
203 203
         <AuthButton name="admin.taNews.id.delete" noRight={null}>
204
-          <span style={{ position: 'absolute', right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer' }} onClick={changeNewsListStatus(data.newsId)}>
204
+          <span style={{ position: 'absolute', right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer', zIndex: 1 }} onClick={changeNewsListStatus(data, data.newsId)}>
205 205
             删除
206 206
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
207 207
           </span>

+ 2
- 1
src/pages/news/type/NewsType.jsx Ver fichero

@@ -60,7 +60,8 @@ function header(props) {
60 60
       okText: '确认',
61 61
       cancelText: '取消',
62 62
       onOk() {
63
-        request({ ...apis.newsType.delete, urlData: { id: newsId },}).then((data) => {
63
+
64
+        request({ ...apis.newsType.put, urlData: { id: newsId }, data: { ...row, status: -1 } }).then((data) => {
64 65
           message.info('操作成功!')
65 66
           getList({ pageNum: 1, pageSize: 10 });
66 67
         }).catch((err) => {