// import { getCurrentUser, getToken } from '@/webPublic/one_stop_public/utils/token';

// import {getCurrentUser, getUserInfo} from '@/H5Public/utils/2022new/currentUser';
import { getIsBei_Dian, getToken } from '@/H5Public/utils/authority';
// import { getUrlParams } from '@/H5Public/utils/handleString';
export function getHeaders(url = '') {
  const token = getToken();
  // const currentInfo = getCurrentUser();
  // const onestopInfo = getUserInfo();
  // const id =  onestopInfo.id || currentInfo.xgUserId;
  // const timestamp = onestopInfo.differenceBetweenServerAndClientTime ? new Date().getTime() + onestopInfo.differenceBetweenServerAndClientTime : new Date().getTime();
  // const secretString = token + id + timestamp;

  const res = {
    headers: {
      Authorization: `bearer ${token}`,
    },
  };
  if(getIsBei_Dian() && window.location.origin.indexOf('localhost') > -1){
    res.headers.env = 'test';
  }
  //
  // if(getIsBei_Dian() && process.env.){
  // }
  return res;
}
