import service from '../utils/request_axios';
function login_api(user_name, password) {
  return service({
    url: '/admin/users/login',
    method: 'POST',
    data: {
      loginName: user_name,
      loginPassword: password,
    },
  });
}

function menu_api(token) {
  return service({
    url: '/admin/module/list',
    method: 'GET',
  });
}

function login_out_api(token) {
  return service({
    url: '/admin/users/logout',
    method: 'GET',
  });
}

export default {
  login_api,
  menu_api,
  login_out_api,
};
