import {
  splicingParam,
  get,
  post
} from '../utils/request'

// 登录
const login = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.oauthServiceUrl + '/user/login?' + str)
}

// 退出登录
const logout = () => {
  return get(systemConfig.oauthServiceUrl + '/account/logout')
}

// auth
const getToken = (params) => {
  return post(systemConfig.oauthServiceUrl + '/v1.0/account/auth', params)
}

export default {
  login,
  logout,
  getToken
}
