// 20250522 change the pass the param way from posting message to store in window.objGlobalParam
/*
Name:
Function: main of this function
1.store the nature onmessage function
2.return the param by post message to main onmessage
3.reset the onmessage function
4.tell the parent msg loop task is complete
Param: window.objAryParam
Return: onmessage.name==fnCallBackMainGetInhouseReservationList
let objParam = {
"strName": "fnCallbackGetInhouseReservationList",
"objAryValue": aryObjReservationList
}
*/
function fnMainFunction()*
{
window.fnOldOnmessage= window.onmessage;
window.onmessage= function(objMsg){
if( objMsg.data.strName.match("fnCallBackFunction"))*
{
//alert('fnCallbackGetInhouseReservationList');
fnResetOnmessage();
//console.log("a");
objMsg.data.strName= "fnCallBackMainFunction";*
objMsg.data.bIfContinue= true;
window.postMessage(objMsg.data);
}
else
window.fnOldOnmessage(objMsg);
}
fnFunction();*
}
function fnResetOnmessage( )
{
window.onmessage = window.fnOldOnmessage;
window.fnOldOnmessage= null;
}
/*
Name:
Function:
Param:
Return:
future:
*/
function fnFunction()*
{
let xmlhttp= new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
let objParam = {
"strName": "fnCallbackGetInhouseReservationList",*
"objValue": JSON.parse(xmlhttp.responseText).InOutData*
}
window.postMessage(objParam);
}
}
xmlhttp.open("POST","https://app9.rmscloud.cn/api/Reservation/InOutScreen/RetrieveScreenData");*
xmlhttp.setRequestHeader('content-Type','application/json; charset=utf-8');
xmlhttp.send(JSON.stringify(objParam));
}