login.js 636 Bytes
/*
 * @Description: 
 * @Autor: renchao
 * @LastEditTime: 2023-03-23 17:19:52
 */
import request from "@/utils/request";
// let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// console.log(SERVER, 'SERVERSERVER');

export function loginIn (username, password) {
  return request({
    url: `${SERVER.MANAGEMENTAPI}/login?username=${username}&password=${password}`,
    method: "post",
  });
}
export function logout () {
  return request({
    url: `${SERVER.MANAGEMENTAPI}/logout`,
    method: "post",
  });
}