@opentiny/tiny-toolkit-pro
Version:
TinyPro Vue:开箱即用、前后端分离的 Vue 后台管理模板
28 lines (25 loc) • 424 B
text/typescript
export interface requestParam {
body: string | null;
type: string;
url: string;
}
export const successResponseWrapper = (data: unknown) => {
return {
data,
status: 'ok',
msg: '请求成功',
code: 20000,
};
};
export const failResponseWrapper = (
data: unknown,
msg: string,
code = 50000
) => {
return {
data,
status: 'fail',
msg,
code,
};
};