杨磊
2 天以前 87d2fac9c381de99f75ce6c6c39b7d638b980d7e
src/assets/js/middleGround/api/identity.js
@@ -1,181 +1,194 @@
import request from "@/plugin/axios/index.ts";
import request from '@/plugin/axios/index.ts'
const identityApi = {
  // 获取图形验证码
  getImgCode() {
    return request({
      url: "/identity/NewCaptcha",
      method: "post",
    });
      url: '/identity/NewCaptcha',
      method: 'post',
    })
  },
  // 验证图形验证码
  verificationImgCode(data) {
    return request({
      url: "/identity/ValidCaptcha",
      method: "post",
      url: '/identity/ValidCaptcha',
      method: 'post',
      data,
    });
    })
  },
  // 获取短信验证码
  getPhoneCode(data) {
    return request({
      url: "/identity/NewSms",
      method: "post",
      url: '/identity/NewSms',
      method: 'post',
      data,
    });
    })
  },
  // 验证短信验证码
  verificationPhoneCode(data) {
    return request({
      url: "/identity/api/ApiValidMobilePhone",
      method: "post",
      url: '/identity/api/ApiValidMobilePhone',
      method: 'post',
      data,
    });
    })
  },
  getSlideCaptchaImage(options) {
    return request('/identity/GetSlideCaptchaImage', {
      method: 'POST',
      data: options || {},
    })
  },
  // 验证滑动验证码
  validSlideCaptcha(options) {
    return request('/identity/ValidSlideCaptcha', {
      method: 'POST',
      data: options || {},
    })
  },
  // 通过手机号注册用户
  registerAppUserWithPhone(data) {
    return request({
      url: "/identity/api/RegisterAppUserWithPhone",
      method: "post",
      url: '/identity/api/RegisterAppUserWithPhone',
      method: 'post',
      data,
    });
    })
  },
  // 账号密码登录
  loginByPassword(data) {
    return request({
      url: "/identity/api/LoginByPassword",
      method: "post",
      url: '/identity/api/LoginByPassword',
      method: 'post',
      data,
    });
    })
  },
  // 短信验证码登录
  loginByMobilePhone(data) {
    return request({
      url: "/identity/api/LoginByMobilePhone",
      method: "post",
      url: '/identity/api/LoginByMobilePhone',
      method: 'post',
      data,
    });
    })
  },
  // 设置用户key
  setUserKey(data) {
    return request({
      url: "/identity/api/ApiAppUserSetKey",
      method: "post",
      url: '/identity/api/ApiAppUserSetKey',
      method: 'post',
      data,
    });
    })
  },
  // 获取用户key
  getUserKey(data) {
    return request({
      url: "/identity/api/ApiGetAppUserKey",
      method: "post",
      url: '/identity/api/ApiGetAppUserKey',
      method: 'post',
      data,
    });
    })
  },
  // 删除用户key
  delUserKey(data) {
    return request({
      url: "/identity/api/ApiDelAppUserKey",
      method: "post",
      url: '/identity/api/ApiDelAppUserKey',
      method: 'post',
      data,
    });
    })
  },
  // 获取去当前用户信息
  getCurrentAppUser() {
    return request({
      url: "/identity/api/GetCurrentAppUser",
      method: "post",
    });
      url: '/identity/api/GetCurrentAppUser',
      method: 'post',
    })
  },
  // 添加用户信息
  setAppUserInfo(data) {
    return request({
      url: "/identity/api/SetAppUserInfoRequest",
      method: "post",
      url: '/identity/api/SetAppUserInfoRequest',
      method: 'post',
      data,
    });
    })
  },
  // 用户更换绑定手机号,如没有绑定手机则自动创建
  userSetPhoneNumber(data) {
    return request({
      url: "/identity/api/ApiUserSetPhoneNumber",
      method: "post",
      url: '/identity/api/ApiUserSetPhoneNumber',
      method: 'post',
      data,
    });
    })
  },
  // 检测用户是否绑定微信
  checkBuildingWeChat(data) {
    return request({
      url: "/identity/api/ApiCheckBuildingWeChat",
      method: "post",
      url: '/identity/api/ApiCheckBuildingWeChat',
      method: 'post',
      data,
    });
    })
  },
  // 通过手机号重置密码
  changePasswordByMobilePhone(data) {
    return request({
      url: "/identity/api/ChangePasswordByMobilePhone",
      method: "post",
      url: '/identity/api/ChangePasswordByMobilePhone',
      method: 'post',
      data,
    });
    })
  },
  // 微信开放平台扫码登录
  loginByWeChatOpenCode(data) {
    return request({
      url: "/identity/api/LoginByWeChatOpenCode",
      method: "post",
      url: '/identity/api/LoginByWeChatOpenCode',
      method: 'post',
      data,
    });
    })
  },
  // 用户绑定微信号
  bindingWeChat(data) {
    return request({
      url: "/identity/api/ApiBindingWeChat",
      method: "post",
      url: '/identity/api/ApiBindingWeChat',
      method: 'post',
      data,
    });
    })
  },
  // 设置登录的用户名和密码,用户名和密码至少6位
  setLoginNameAndPassword(data) {
    return request({
      url: "/identity/api/ApiUserSetLoginNameAndPassword",
      method: "post",
      url: '/identity/api/ApiUserSetLoginNameAndPassword',
      method: 'post',
      data,
    });
    })
  },
  // 获取邮箱验证码
  getEmailCode(data) {
    return request({
      url: "/identity/api/SendVerifyEMail",
      method: "post",
      url: '/identity/api/SendVerifyEMail',
      method: 'post',
      data,
    });
    })
  },
  // 用户绑定邮箱
  bindingEmail(data) {
    return request({
      url: "/identity/api/ApiBindEMail",
      method: "post",
      url: '/identity/api/ApiBindEMail',
      method: 'post',
      data,
    });
    })
  },
};
}
export default identityApi;
export default identityApi