login.js 671 Bytes
/*
 * @Description: 登录api文件
 * @Autor: renchao
 * @LastEditTime: 2023-05-08 15:03:10
 */
import request from "@/utils/request";
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
 * @description: loginIn
 * @param {*} username
 * @param {*} password
 * @author: renchao
 */
export function loginIn (username, password) {
  return request({
    url: `${SERVER.MANAGEMENTAPI}/login?username=${username}&password=${password}`,
    method: "post",
  });
}
/**
 * @description: logout
 * @author: renchao
 */
export function logout () {
  return request({
    url: `${SERVER.MANAGEMENTAPI}/logout`,
    method: "post",
  });
}