feat: add Login and fix res error

This commit is contained in:
2024-09-29 01:40:51 +08:00
parent 77485b34c0
commit 029710f31c
18 changed files with 178 additions and 118 deletions

View File

@@ -80,7 +80,7 @@ export const Preview = () => {
};
init([code]);
} else {
message.error(res.msg || 'Failed to fetch data');
message.error(res.message || 'Failed to fetch data');
}
};
const refresh = (data: any) => {
@@ -131,7 +131,7 @@ export const PreviewWrapper = () => {
fetch();
}, []);
const fetch = async () => {
const res = await query.post({
const res = await query.post<any, any>({
path: 'container',
key: 'get',
id,
@@ -149,7 +149,7 @@ export const PreviewWrapper = () => {
};
init([code]);
} else {
message.error(res.msg || 'Failed to fetch data');
message.error(res.message || 'Failed to fetch data');
}
};
const refresh = (data: any) => {