Blame view

src/utils/auth.js 271 Bytes
80a28914e   吉鹏   init
1
  import Cookies from 'js-cookie'
d7d9c38c2   Adam   auto commit the c...
2
  const TokenKey = 'Admin-Token'
80a28914e   吉鹏   init
3
4
5
6
7
8
9
10
11
12
13
14
  
  export function getToken() {
    return Cookies.get(TokenKey)
  }
  
  export function setToken(token) {
    return Cookies.set(TokenKey, token)
  }
  
  export function removeToken() {
    return Cookies.remove(TokenKey)
  }