import BaseAPI from './base_api'

export default class LoginAPI extends BaseAPI {
  /**
   * 获取验证码
   * @param {[string]} id resource_id
   */
  getSendCode = (obj) => this.post('/share/v1/live-activity/send-sms-code', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  /**
   * 注册
   * @param {[string]} id resource_id
   */
  register = (obj) => this.post('/share/v1/live-activity/register', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  /**
   * 登录
   * @param {[string]} id resource_id
   */
  login = (obj) => this.post('/share/v1/live-activity/login', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  /**
   * 获取用户信息
   * @param {[object]} obj
   */
  getUserInfo = () => this.get('/share/v1/live-activity/user', { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  /**
  * 退出登录
  */
 loginOut = () => this.get('/share/v1/live-activity/logout', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
}
