|
@@ -97,13 +97,12 @@ function body(props) {
|
97
|
97
|
okText: '确认',
|
98
|
98
|
cancelText: '取消',
|
99
|
99
|
onOk() {
|
100
|
|
- request({
|
101
|
|
- url: '/api/admin/taNews/' + newsId,
|
102
|
|
- method: 'DELETE',
|
103
|
|
- // data: { ...row },
|
104
|
|
- }).then((data) => {
|
|
100
|
+ request({ ...apis.news.delete, urlData: { id: newsId },}).then((data) => {
|
105
|
101
|
message.info('操作成功!')
|
106
|
102
|
getList({ pageNum: 1, pageSize: 10 });
|
|
103
|
+ }).catch((err) => {
|
|
104
|
+ console.log(err)
|
|
105
|
+ message.info(err.msg || err.message)
|
107
|
106
|
})
|
108
|
107
|
}
|
109
|
108
|
});
|
|
@@ -127,13 +126,12 @@ function body(props) {
|
127
|
126
|
okText: '确认',
|
128
|
127
|
cancelText: '取消',
|
129
|
128
|
onOk() {
|
130
|
|
- request({
|
131
|
|
- url: '/api/admin/taNews/' + newsId,
|
132
|
|
- method: 'PUT',
|
133
|
|
- data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId },
|
134
|
|
- }).then((data) => {
|
|
129
|
+ request({ ...apis.news.cancel, data:{"newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId}, urlData: { id: newsId },}).then((data) => {
|
135
|
130
|
message.info('操作成功!')
|
136
|
131
|
getList({ pageNum: 1, pageSize: 10 });
|
|
132
|
+ }).catch((err) => {
|
|
133
|
+ console.log(err)
|
|
134
|
+ message.info(err.msg || err.message)
|
137
|
135
|
})
|
138
|
136
|
},
|
139
|
137
|
onCancel() {
|
|
@@ -146,13 +144,12 @@ function body(props) {
|
146
|
144
|
okText: '确认',
|
147
|
145
|
cancelText: '取消',
|
148
|
146
|
onOk() {
|
149
|
|
- request({
|
150
|
|
- url: '/api/admin/taNews/' + newsId,
|
151
|
|
- method: 'PUT',
|
152
|
|
- data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId },
|
153
|
|
- }).then((data) => {
|
|
147
|
+ request({ ...apis.news.cancel, data:{"newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId}, urlData: { id: newsId },}).then((data) => {
|
154
|
148
|
message.info('操作成功!')
|
155
|
149
|
getList({ pageNum: 1, pageSize: 10 });
|
|
150
|
+ }).catch((err) => {
|
|
151
|
+ console.log(err)
|
|
152
|
+ message.info(err.msg || err.message)
|
156
|
153
|
})
|
157
|
154
|
},
|
158
|
155
|
onCancel() {
|
|
@@ -175,11 +172,11 @@ function body(props) {
|
175
|
172
|
<Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
|
176
|
173
|
</span>
|
177
|
174
|
{data.newsStatus === 0 ?
|
178
|
|
- <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
|
|
175
|
+ <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48',zIndex:1 }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
|
179
|
176
|
取消发布
|
180
|
177
|
<Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
|
181
|
178
|
</span> :
|
182
|
|
- <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
|
|
179
|
+ <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48',zIndex:1 }} onClick={cancelRelease.bind(this, data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
|
183
|
180
|
发布
|
184
|
181
|
<Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
|
185
|
182
|
</span>
|