fix: mock api error
This commit is contained in:
parent
b760cc34dd
commit
3a38adc71e
@ -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,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user