Browse Source

Merge branch 'master' into v3.5

魏熙美 5 years ago
parent
commit
a39671c960
2 changed files with 5 additions and 4 deletions
  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 View File

92
     }
92
     }
93
 
93
 
94
     //删除资讯
94
     //删除资讯
95
-    const changeNewsListStatus = (newsId) => () => {
95
+    const changeNewsListStatus = (row, newsId) => () => {
96
       Modal.confirm({
96
       Modal.confirm({
97
         title: '确认删除该资讯?',
97
         title: '确认删除该资讯?',
98
         okText: '确认',
98
         okText: '确认',
99
         cancelText: '取消',
99
         cancelText: '取消',
100
         onOk() {
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
             message.info('操作成功!')
102
             message.info('操作成功!')
103
             getList({ pageNum: 1, pageSize: 10 });
103
             getList({ pageNum: 1, pageSize: 10 });
104
           }).catch((err) => {
104
           }).catch((err) => {
201
           }
201
           }
202
         </AuthButton>
202
         </AuthButton>
203
         <AuthButton name="admin.taNews.id.delete" noRight={null}>
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
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
206
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
207
           </span>
207
           </span>

+ 2
- 1
src/pages/news/type/NewsType.jsx View File

60
       okText: '确认',
60
       okText: '确认',
61
       cancelText: '取消',
61
       cancelText: '取消',
62
       onOk() {
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
           message.info('操作成功!')
65
           message.info('操作成功!')
65
           getList({ pageNum: 1, pageSize: 10 });
66
           getList({ pageNum: 1, pageSize: 10 });
66
         }).catch((err) => {
67
         }).catch((err) => {