2024-04-17 11:16:37 +08:00
|
|
|
|
2024-03-22 15:50:26 +08:00
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
import vm from '@/main'
|
|
|
|
|
|
|
|
const TokenKey = 'merchantToken'
|
|
|
|
|
|
|
|
export function getToken() {
|
|
|
|
return Cookies.get(TokenKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function setToken(token) {
|
|
|
|
return Cookies.set(TokenKey, token)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function removeToken() {
|
|
|
|
vm && vm.closeNotice()
|
|
|
|
return Cookies.remove(TokenKey)
|
|
|
|
}
|