import Cookies from 'js-cookie'

const signedInKey = 's_pass'
// 设置已登录状态cookie
export function setSignedIn() {
  return Cookies.set(signedInKey, 1)
}
// 判断是否已登录
export function checkSignedInStatus() {
  return (Cookies.get(signedInKey) * 1) === 1
}
// 删除登录状态cookie
export function setNotLoggedIn() {
  sessionStorage.clear()
  return Cookies.remove(signedInKey)
}