/* eslint-disable */
import {
  request
} from './network'

const identity = localStorage.getItem('index-identity')

//登录前获取营地主题
export function getCam(data) {
  data['identity'] = identity;
  return request({
    method: 'get',
    url: '/web/auth/getCam',
    params: data
  })
}
// 登录
export function login(data) {
  data['identity'] = identity;
  return request({
    method: 'post',
    url: '/web/auth/login',
    params: data

  })
}

// 退出
export function logout(data) {
  data['identity'] = identity;
  return request({
    method: 'post',
    url: '/web/auth/loginOut',
    data
  })
}

// 通过旧密码找回密码
export function changePassOld(data) {
  data['identity'] = identity;
  return request({
    method: 'post',
    url: '/web/auth/changePassOld',
    data
  })
}

// 通过验证码找回密码
export function changePassCode(data) {
  data['identity'] = identity;
  return request({
    method: 'post',
    url: '/web/auth/changePassCode',
    data
  })
}
