auth.js 351 B

1234567891011121314151617
  1. const SessionKey = 'JSESSIONID'
  2. export function getSession() {
  3. return uni.getStorageSync(SessionKey)
  4. }
  5. export function getUserInfo() {
  6. return uni.getStorageSync('userInfo')
  7. }
  8. export function setSession(session) {
  9. return uni.setStorageSync(SessionKey, session)
  10. }
  11. export function removeSession() {
  12. return uni.removeStorageSync(SessionKey)
  13. }