|
@@ -56,15 +56,15 @@ function header(props) {
|
56
|
56
|
}
|
57
|
57
|
|
58
|
58
|
|
59
|
|
- const changeNewsStatus = (row) => () => {
|
|
59
|
+ const changeNewsStatus = (row, newsId) => () => {
|
60
|
60
|
Modal.confirm({
|
61
|
61
|
title: '确认删除该商品?',
|
62
|
62
|
okText: '确认',
|
63
|
63
|
cancelText: '取消',
|
64
|
64
|
onOk() {
|
65
|
65
|
request({
|
66
|
|
- url: '/api/admin/taNewsType',
|
67
|
|
- method: 'PUT',
|
|
66
|
+ url: '/api/admin/taNewsType/' + newsId,
|
|
67
|
+ method: 'DELETE',
|
68
|
68
|
data: { ...row },
|
69
|
69
|
}).then((data) => {
|
70
|
70
|
message.info('操作成功!')
|
|
@@ -99,7 +99,7 @@ function header(props) {
|
99
|
99
|
dataIndex: 'handle',
|
100
|
100
|
key: 'handle',
|
101
|
101
|
align: 'center',
|
102
|
|
- render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row)}>{row.status == 1 ? '下架' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
|
|
102
|
+ render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row, row.newsTypeId)}>{row.status == 1 ? '删除' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
|
103
|
103
|
</span><span style={{ color: '#FF925C' }} onClick={toEditNews(row.newsTypeId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
|
104
|
104
|
},
|
105
|
105
|
];
|