diff --git a/mock/api/post.js b/mock/api/post.js index 579c533..d869f7e 100644 --- a/mock/api/post.js +++ b/mock/api/post.js @@ -122,16 +122,12 @@ export default [ url: '/api/post/:id', method: 'delete', response: ({ query }) => { - if (!query.id) { - return { code: -1, message: '删除失败,id不能为空' } - } else { - return { - code: 0, - message: 'ok', - data: { - id: query.id, - }, - } + return { + code: 0, + message: 'ok', + data: { + id: query.id, + }, } }, },