import request from '@/axios'
export default {
  /**
   * 
   * @param {*} data 
   * @returns 
   * 登录
   */
  login(data) {
    return request({
      url: '/app/common/account_login',
			method: 'post',
			data: data,
			noToken: true
    })
  },

  /**
   * 
   * @param {*} data 
   * @returns 
   * 获取登录短信
   */
  getLoginSms(data) {
    return request({
      url: '/app/common/sms/login',
			method: 'post',
			data: data,
			noToken: true
    })
  },
  /**
   * 
   * @param {*} data 
   * @returns 
   * 短信登陆用户
   */
  loginSms(data) {
    return request({
      url: '/app/common/sms_login',
			method: 'post',
			data: data,
			noToken: true
    })
  },
  /**
   * 
   * @returns 获取用户登录信息
   */
  getInfo(data) {
		return request({
			url: '/app/user/getInfo',
			method: 'get',
      params:data,
		})
	},

  /**
   * 
   * @param {*} data 
   * @returns 
   * 注册用户
   */
	registerUser(data) {
		return request({
			url: '/app/common/register_small',
			method: 'post',
			data: data,
			noToken: true
		})
	},

  /**
   * 
   * @param {*} data 
   * @returns 
   * 绑定身份证号信息
   */
   bindIdCard(data) {
		return request({
      token:data.token,
      headers:{
        AuthorizationToken:"WX "+data.token
      },
			url: '/app/user/bind_idcard',
			method: 'post',
			data: data
		})
	},

  /**
   * 
   * @param {*} data 
   * @returns 
   * 获取注册短信
   */
  getRegisterSms(data) {
		return request({
			url: '/app/common/sms/register',
			method: 'post',
			data: data,
			noToken: true
		})
	},

  /**
   * 
   * @param {*} data 
   * @returns 
   * 找回密码
   */
	forgetUser(data) {
		return request({
			url: '/app/common/register_forget',
			method: 'post',
			data: data,
			noToken: true
		})
	},
  
  /**
   * 
   * @param {*} data 
   * @returns 
   * 获取找回密码短信
   */
   getRegisterSmsforget(data) {
		return request({
			url: '/app/common/sms/forget',
			method: 'post',
			data: data,
			noToken: true
		})
	},
}