mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-05 19:41:59 +08:00
17 lines
299 B
TypeScript
17 lines
299 B
TypeScript
import Mock from 'mockjs'
|
|
|
|
export function resultSuccess(data: any, msg?: string) {
|
|
return Mock.mock({
|
|
code: 200,
|
|
data,
|
|
msg: msg || 'success',
|
|
})
|
|
}
|
|
export function resultFailed(data: any, msg?: string) {
|
|
return Mock.mock({
|
|
code: 500,
|
|
data,
|
|
msg: msg || 'failed',
|
|
})
|
|
}
|