fix: mock api error

This commit is contained in:
张传龙 2022-09-03 22:43:57 +08:00
parent b760cc34dd
commit 3a38adc71e

View File

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