index.js 454 B

12345678910111213141516171819202122
  1. // auth
  2. export const USER_ID = 'USER_ID'
  3. export const USER_TOKEN = 'USER_TOKEN'
  4. export const USER_INFO = 'user_INFO'
  5. export const T_STORAGE_KEY = 'T_STORAGE_KEY'
  6. export const T_USER_TOKEN = 'T_USER_TOKEN'
  7. // 绑定
  8. export const T_REDIRECT_TYPE = 'T_REDIRECT_TYPE'
  9. export const clearAllCache = () => {
  10. [
  11. USER_ID,
  12. USER_TOKEN,
  13. USER_INFO,
  14. T_STORAGE_KEY,
  15. T_USER_TOKEN,
  16. T_REDIRECT_TYPE
  17. ].forEach((item) => {
  18. uni.removeStorageSync(item)
  19. })
  20. }