function getParam(paramName) {
    // let paramValue = "";
    // let isFound = false;
    // if (location.search.indexOf("?") == 0 && location.search.indexOf("=") > 1) {
    //     let arrSource = decodeURI(location.search).substring(1, location.search.length).split("&"), i = 0;
    //     while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
    // }
    // return paramValue == "" && (paramValue = null), paramValue
    console.log(paramName, sessionStorage.getItem('processInfo') ? JSON.parse(sessionStorage.getItem('processInfo'))[paramName] : null)
    return sessionStorage.getItem('processInfo') ? JSON.parse(sessionStorage.getItem('processInfo'))[paramName] : null
}
function getParamUrl(paramName) { // 第一次打开读取URL里的参数
    let paramValue = "";
    let isFound = false;
    if (location.search.indexOf("?") == 0 && location.search.indexOf("=") > 1) {
        let arrSource = decodeURI(location.search).substring(1, location.search.length).split("&"), i = 0;
        while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
    }
    return paramValue == "" && (paramValue = null), paramValue
}

export {getParam, getParamUrl}
// export default {getParam, getParamUrl};
