Skip to content

Commit 21500bf

Browse files
committed
refactor🎨: 岗位删除修改为data传值方式
1 parent 56b2adf commit 21500bf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/api/admin/sys-post.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ export function updatePost(data, id) {
3838
// 删除岗位
3939
export function delPost(postId) {
4040
return request({
41-
url: '/api/v1/post/' + postId,
42-
method: 'delete'
41+
url: '/api/v1/post',
42+
method: 'delete',
43+
data: postId
4344
})
4445
}
4546

src/views/admin/sys-post/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export default {
313313
/** 删除按钮操作 */
314314
handleDelete(row) {
315315
// const postIds = row.postId || this.ids
316-
const Ids = (row.id && [row.id]) || this.ids
316+
const Ids = (row.postId && [row.postId]) || this.ids
317317
this.$confirm('是否确认删除岗位编号为"' + Ids + '"的数据项?', '警告', {
318318
confirmButtonText: '确定',
319319
cancelButtonText: '取消',

0 commit comments

Comments
 (0)