import { setCookie } from '@/webPublic/one_stop_public/utils/cookie';

/**
 * 获取token
 * */
export function getToken() {
  const x = localStorage.getItem('antd-pro-token-onestop');
  if (x && x.length > 11) {
    setCookie('token', x, 1);
    return x;
  }
  const y = localStorage.getItem('antd-pro-token');
  if (y && y.length > 11) {
    setCookie('token', x, 1);
    return y;
  }

  return null;
}