yangan
2024-07-05 76f5ad404069bbecca98d441b4f7cbc2aba51c75
utils/status.js
@@ -4,7 +4,9 @@
   UsernameKey,
   SuccessRedirect,
   FailRedirect,
   customerIdKey
   customerIdKey,
   nameKey,
   userId
} from './status.config.js';
const SetStorage = (key) => (value) => uni.setStorageSync(key, value);
@@ -12,7 +14,9 @@
export const setToken = SetStorage(TokenKey);
export const setRefreshToken = SetStorage(RefreshToken);
export const setUsernameKey = SetStorage(UsernameKey);
export const setCustomerId = SetStorage(customerIdKey)
export const setCustomerId = SetStorage(customerIdKey);
export const setName = SetStorage(nameKey)
export const setUserId = SetStorage(userId)
export const redirectHome = (path) => {
   uni.switchTab({
      url: path || SuccessRedirect