初始化 ui.

This commit is contained in:
lijiahang
2023-07-24 10:05:07 +08:00
parent 99725eb97a
commit f01f696d37
235 changed files with 39010 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import debug from './env';
export default ({ mock, setup }: { mock?: boolean; setup: () => void }) => {
if (mock !== false && debug) setup();
};
export const successResponseWrap = (data: unknown) => {
return {
data,
status: 'ok',
msg: '请求成功',
code: 20000,
};
};
export const failResponseWrap = (data: unknown, msg: string, code = 50000) => {
return {
data,
status: 'fail',
msg,
code,
};
};