/*
 * @Author: wj 1454560336@qq.com
 * @Date: 2023-09-18 10:57:47
 * @LastEditors: wj 1454560336@qq.com
 * @LastEditTime: 2023-12-15 09:30:05
 * @FilePath: \admin-manage\src\utils\auth.js
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import Cookies from 'js-cookie'

const TokenKey = 'admin_token'
const RETokenKey = 'admin_refreshtoken'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getREToken() {
  return Cookies.get(RETokenKey)
}

export function setREToken(token) {
  return Cookies.set(RETokenKey, token)
}

export function removeREToken() {
  return Cookies.remove(RETokenKey)
}

