/*
 * @Author: your name
 * @Date: 2021-04-23 15:39:41
 * @LastEditTime: 2021-04-29 17:56:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /react-antd-admin-template/src/api/login.js
 */
import request from '@/utils/request'

export function reqLogin(data) {
  console.log({data});
  const getParam=()=>{
      if(data.hospSign){
        return {
          account:data.username,
          password:data.password,
          hospSign:data.hospSign 
        }
      }else{
        return {
          account:data.username,
          password:data.password,
        }
      }
  };

  return request({
    url: '/employee/login',
    method: 'post',
    data:{
      ...getParam()
       //vdQpm2OvmLVTPnXL
    }
  })
}

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