mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-06 03:57:54 +08:00
17 lines
290 B
TypeScript
17 lines
290 B
TypeScript
import Mock from 'mockjs';
|
|
|
|
export function resultSuccess(data: any, { msg = 'success' } = {}) {
|
|
return Mock.mock({
|
|
code: 200,
|
|
data,
|
|
msg,
|
|
});
|
|
}
|
|
export function resultFailed(data: any, { msg = 'failed' } = {}) {
|
|
return Mock.mock({
|
|
code: 400,
|
|
data,
|
|
msg,
|
|
});
|
|
}
|