rescue-driver/utils/auth.js

20 lines
456 B
JavaScript
Raw Normal View History

2024-08-28 22:02:00 +08:00
const TokenKey = 'App-Token'
const TenantIdKey = 'TENANT_ID'
export function getToken() {
return uni.getStorageSync(TokenKey)
}
export function setToken(token) {
return uni.setStorageSync(TokenKey, token)
}
export function removeToken() {
return uni.removeStorageSync(TokenKey)
}
export function setTenantId(TenantId) {
return uni.setStorageSync(TenantIdKey, TenantId);
}
export function getTenantId(){
return uni.getStorageSync(TenantIdKey)
}