{"size": 1185, "ext": "js", "max_stars_repo_path": "vulfocus-frontend/src/api/user.js", "max_stars_repo_name": "LiuYuH-hash/vulfocus", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "vulfocus-frontend/src/api/user.js", "max_issues_repo_name": "LiuYuH-hash/vulfocus", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "vulfocus-frontend/src/api/user.js", "max_forks_repo_name": "LiuYuH-hash/vulfocus", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 14.8125, "max_line_length": 40, "alphanum_fraction": 0.5805907173}
import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function userList(page) {
  return request({
    url: '/user/?page='+page,
    method: 'get'
  })
}

export function userChangePwd(data,id) {
  return request({
    url: '/user/'+id+'/',
    method: 'PUT',
    data
  })
}

export function getInfo() {
  return request({
    url: '/user/info',
    method: 'get'
    // params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}

export function register(data) {
  return request({
    url: '/user/register/',
    method: 'post',
    data
  })
}

export function login_auth(data) {
  return request({
    url: '/login/',
    method: 'post',
    data
  })
}

export function sendMail(data) {
  return request({
    url: '/send_email/',
    method: 'post',
    data
  })
}

export function valMail(data) {
  return request({
    url: '/reset_password/1/',
    method: 'patch',
    data
  })
}

export function updatePassword(data) {
  return request({
    url: '/changepassword/1/',
    method: 'patch',
    data
  })
}
