/*
 * @Author: guanxiaoyan guanxiaoyan@pb-station.com
 * @Deion:
 * @Date: 2023-12-13 15:47:51
 * @LastEditors: guanxiaoyan guanxiaoyan@pb-station.com
 * @LastEditTime: 2024-01-30 20:06:33
 * @FilePath: /followUp-admin/src/api/common/login.js
 */
import request from "@/utils/request";
import mockAdminPermissions from "@/assets/json/permissions.admin.json";
import mockHospitalPermissions from "@/assets/json/permissions.hospital.json";

// 登录方法
export function login(username, password, clientId) {
  const data = {
    username,
    password,
    clientId,
  };
  return request({
    url: "/user/login",
    headers: {
      isToken: false,
    },
    method: "post",
    data: data,
  });
}

// 退出方法
export function logout() {
  return request({
    url: "/logout",
    method: "get",
  });
}

// 获取用户资源
export function getUserPermissions() {
  return request({
    baseURL: "/hisca",
    url: "/sys/user/initUserMenu",
    method: "get",
  });
}
