Skip to content

Commit

Permalink
fix: 修复 mock 模板请求无响应数据
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Mar 7, 2024
1 parent e802354 commit 7307410
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions plop-templates/mock/mock.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,40 @@ export default [
{
url: '/mock/{{#if relativePath}}{{ relativePath }}/{{/if}}{{ moduleName }}/create',
method: 'post',
response: {
error: '',
status: 1,
data: {
isSuccess: true,
},
response: () => {
return {
error: '',
status: 1,
data: {
isSuccess: true,
},
}
},
},
{
url: '/mock/{{#if relativePath}}{{ relativePath }}/{{/if}}{{ moduleName }}/edit',
method: 'post',
response: {
error: '',
status: 1,
data: {
isSuccess: true,
},
response: () => {
return {
error: '',
status: 1,
data: {
isSuccess: true,
},
}
},
},
{
url: '/mock/{{#if relativePath}}{{ relativePath }}/{{/if}}{{ moduleName }}/delete',
method: 'post',
response: {
error: '',
status: 1,
data: {
isSuccess: true,
},
response: () => {
return {
error: '',
status: 1,
data: {
isSuccess: true,
},
}
},
},
]

0 comments on commit 7307410

Please sign in to comment.