zhengyiming
5 天以前 613d1a6ff31ca384c51d786819b27136d393a181
src/services/api/auth.ts
@@ -2,6 +2,21 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 绑定手机号 POST /api/user/auth/bindPhoneNumber */
export async function bindPhoneNumber(
  body: API.BindPhoneNumberCommand,
  options?: API.RequestConfig
) {
  return request<boolean>('/api/user/auth/bindPhoneNumber', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取阿里云OSS授权信息 GET /api/user/auth/getAliyunOSSAcs */
export async function getAliyunOSSAcs(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
@@ -53,7 +68,7 @@
/** 密码登录 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',
@@ -63,9 +78,36 @@
  });
}
/** 发送验证码 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',
    },
    data: body,
    ...(options || {}),
  });
}
/** 微信小程序登录 POST /api/user/auth/wxmpLogin */
export async function wxmpLogin(body: API.WxmpLoginCommand, options?: API.RequestConfig) {
  return request<API.LoginCommandCallback>('/api/user/auth/wxmpLogin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',