auth.js 453 B

1234567891011121314151617181920212223242526
  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. //用户名,密码
  9. export function getLoginInfo() {
  10. return uni.getStorageSync('loginInfo')
  11. }
  12. export function setSession(session) {
  13. return uni.setStorageSync(SessionKey, session)
  14. }
  15. export function removeSession() {
  16. return uni.removeStorageSync(SessionKey)
  17. }