sso.js 623 B

1234567891011121314151617181920212223242526272829
  1. export let SKIP_SSO_URL_QUERY = { key: 'skipsso', val: '1' };
  2. export let locationUrl = 'http://' + window.location.host + '/';
  3. export let openSso='true';
  4. /**
  5. * 获取url地址参数
  6. * @param paraName
  7. */
  8. export function getUrlParam(paraName) {
  9. const url = document.location.toString();
  10. const arrObj = url.split('?');
  11. if (arrObj.length > 1) {
  12. const arrPara = arrObj[1].split('&');
  13. let arr;
  14. for (let i = 0; i < arrPara.length; i++) {
  15. arr = arrPara[i].split('=');
  16. if (arr != null && arr[0] == paraName) {
  17. return arr[1];
  18. }
  19. }
  20. return '';
  21. } else {
  22. return '';
  23. }
  24. }