shuishen
2025-09-29 ab22f6e51f812d3faa4758e59712a6ea269d128f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const TokenKey = "admin-token"
const TokenPrefix = "Bearer "
function isLogin() {
  return !!uni.getStorageSync(TokenKey)
}
function getToken() {
  return uni.getStorageSync(TokenKey)
}
function setToken(token) {
  uni.setStorageSync(TokenKey, token)
}
function clearToken() {
  uni.removeStorageSync(TokenKey)
}
export { clearToken, getToken, isLogin, setToken, TokenPrefix }