/**
 * Created by baoyinghai on 4/13/17.
 */
if (!sessionStorage) {
  console.error('not support sessionStorage');
}

const sessionCache = sessionStorage || {};

export const saveProcessMenuCode = code => {
  if (!code) {
    sessionCache.processMenuId = '';
  } else {
    sessionCache.processMenuId = code;
  }
};

export const saveEnterMenuId = code => {
  if (!code) {
    sessionCache.enterMenuId = '';
  } else {
    sessionCache.enterMenuId = code;
  }
};

export const getRecMenuId = () => {
  return {
    enterMenuId: sessionCache.enterMenuId,
    processMenuId: sessionCache.processMenuId,
  };
};
