feat: add app serve

This commit is contained in:
2024-10-17 01:18:03 +08:00
parent edb0d56094
commit 5c3f454d8c
17 changed files with 1314 additions and 36 deletions

1
src/query/index.ts Normal file
View File

@@ -0,0 +1 @@
export * from './user/login.ts';

38
src/query/user/login.ts Normal file
View File

@@ -0,0 +1,38 @@
import { query } from '@/module/query.ts';
export const queryLogin = async (username: string, password: string) => {
return await query.post({
path: 'user',
key: 'login',
payload: {
username,
password,
},
});
};
export const queryMe = async () => {
return await query.post({
path: 'user',
key: 'me',
});
};
export const switchOrg = async (username) => {
return await query.post({
path: 'user',
key: 'switchOrg',
data: {
username,
},
});
};
export const switchMe = async () => {
return await query.post({
path: 'user',
key: 'switchOrg',
data: {
type: 'user',
},
});
};