// 认证API端点 import type { AxiosInstance } from 'axios'; import type { LoginRequest, LoginResponse, User, SystemUser, ChangePasswordRequest } from '@smartcut/types'; import type { ApiResponse } from '@smartcut/types'; export class AuthApi { constructor(private client: AxiosInstance) {} /** * 用户登录 * 新增factory_id参数(Query参数传递) */ async login(data: LoginRequest): Promise { const response = await this.client.post>('/auth/login', data); return response.data.data; } /** * 获取当前用户信息 */ async getProfile(): Promise { const response = await this.client.get>('/auth/profile'); return response.data.data; } /** * 修改密码 */ async changePassword(data: ChangePasswordRequest): Promise { await this.client.put('/auth/password', data); } }