auth.js 271 B

1234567891011
  1. export default function async(redirect = true) {
  2. const id = uni.getStorageSync("id");
  3. const token = uni.getStorageSync("token");
  4. if (!id || !token) {
  5. redirect && uni.navigateTo({
  6. url: "/pages/account/login",
  7. });
  8. return false;
  9. }
  10. return true;
  11. }