You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
482 B
TypeScript

1 month ago
// services/userService.ts
import { apiClient } from '../utils/apiClient';
1 month ago
import { type User } from '@/types/User'
1 month ago
export interface LoginParams {
UserName: string;
PassWord: string;
}
1 month ago
// 登录响应类型
export interface LoginResponse {
Code: string;
Data: {
user: any;
token: string;
},
Msg: string;
}
1 month ago
1 month ago
export const login = async (params: LoginParams) => {
return apiClient<LoginResponse>('/User/login', {
method: 'POST',
body: params
});
};