| | |
| | | |
| | | /** 密码登录 POST /api/user/auth/passwordLogin */ |
| | | export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 发送验证码 POST /api/user/auth/sendVerifyCode */ |
| | | export async function sendVerifyCode(body: API.SendVerifyCodeCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/user/auth/sendVerifyCode', { |
| | | /** 发送登录或注册短信 POST /api/user/auth/sendLoginOrRegisterVerifyCode */ |
| | | export async function sendLoginOrRegisterVerifyCode( |
| | | body: API.SendLoginOrRegisterVerifyCodeCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/auth/sendLoginOrRegisterVerifyCode', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 短信登录 POST /api/user/auth/smsLogin */ |
| | | export async function smsLogin(body: API.SmsLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/smsLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |