auth.js 265 B

12345678910111213
  1. const TokenKey = 'App-Token'
  2. // token
  3. export function getToken() {
  4. return uni.getStorageSync(TokenKey)
  5. }
  6. export function setToken(token) {
  7. return uni.setStorageSync(TokenKey, token)
  8. }
  9. export function removeToken() {
  10. return uni.removeStorageSync(TokenKey)
  11. }