import axios from '@/libs/api.request'

// export const GetConfigAppFrontHome = () => {
//   return axios.request({
//     method: 'get',
//     url: '?r=AjaxApiMallConfig/GetConfigAppFrontHome'
//   })
// }

export const Register = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.User.Register',
    data
  })
}

export const Login = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.User.UserLogin',
    data
  })
}

// 获取当前登录用户自己的个人信息
export const GetAccountInfo = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.User.Profile',
    data
  })
}

// 修改个人信息
export const SetAccountInfo = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.User.UpdateProfile',
    data
  })
}

// 获取最近登录

// 修改密码
export const ResetPwd = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.User.AlterPass',
    data
  })
}

// 获取用户信息
export const GetMyPermission = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.Permission.GetMyPermission',
    data
  })
}

// 获取第三方绑定信息
export const AuthorizationBindResult = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.UserBind.AuthorizationBindResult',
    data
  })
}

// 读取第三方配置
export const AuthorizationConfig = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.Authorization_Authorization.AuthorizationConfig',
    data
  })
}

// 解除绑定
export const AuthorizationUnBind = (data) => {
  return axios.request({
    method: 'post',
    url: 'platform.php?s=Platform.UserBind.AuthorizationUnBind',
    data
  })
}
