export let SKIP_SSO_URL_QUERY = { key: 'skipsso', val: '1' }; // export let locationUrl = 'http://' + window.location.host + '/'; export let openSso='true'; /** */ export function locationUrl() { console.log("----------------locationUrl-----host---------------------------"); console.log(window.location.host); return 'http://' + window.location.host + '/'; } /** * 获取url地址参数 * @param paraName */ export function getUrlParam(paraName) { if (process.env.VUE_APP_PLATFORM != 'h5'){ // 获取当前页面的实例 const pages = getCurrentPages(); // 获取当前页面的实例 const currentPage = pages[pages.length - 1]; // 获取页面的完整地址 const url = currentPage.options; console.log("----------------currentPage.options--------"+JSON.stringify(currentPage.options)); } else{ const url = window.location.toString(); console.log("----------------url--------"); console.log(url); const arrObj = url.split('?'); if (arrObj.length > 1) { const arrPara = arrObj[1].split('&'); let arr; for (let i = 0; i < arrPara.length; i++) { arr = arrPara[i].split('='); if (arr != null && arr[0] == paraName) { return arr[1]; } } return ''; } else { return ''; } } }