2024-10-13 15:40:15 +08:00
|
|
|
const TokenKey = 'YanZhu-XD-App-Token'
|
|
|
|
const OpenIdKey = 'YanZhu-XD-App-OpenId'
|
2024-10-15 00:32:25 +08:00
|
|
|
const SessionKey = 'YanZhu-XD-App-SessionKey';
|
2024-10-13 15:40:15 +08:00
|
|
|
|
2024-10-13 11:24:45 +08:00
|
|
|
export function getToken() {
|
|
|
|
return wx.getStorageSync(TokenKey)
|
|
|
|
}
|
|
|
|
export function setToken(token) {
|
|
|
|
return wx.setStorageSync(TokenKey, token)
|
|
|
|
}
|
|
|
|
export function removeToken() {
|
|
|
|
return wx.removeStorageSync(TokenKey)
|
2024-10-13 15:40:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function getOpenId() {
|
|
|
|
return wx.getStorageSync(OpenIdKey)
|
|
|
|
}
|
|
|
|
export function setOpenId(openId) {
|
|
|
|
return wx.setStorageSync(OpenIdKey, openId)
|
|
|
|
}
|
|
|
|
export function removeOpenId() {
|
|
|
|
return wx.removeStorageSync(OpenIdKey)
|
|
|
|
}
|
2024-10-15 00:32:25 +08:00
|
|
|
|
|
|
|
export function getSessionKey() {
|
|
|
|
return wx.getStorageSync(SessionKey)
|
|
|
|
}
|
|
|
|
export function setSessionKey(sessionKey) {
|
|
|
|
return wx.setStorageSync(SessionKey, sessionKey)
|
|
|
|
}
|
|
|
|
export function removeSessionKey() {
|
|
|
|
return wx.removeStorageSync(SessionKey)
|
|
|
|
}
|