diff --git a/wms/T8_APItest.php b/wms/T8_APItest.php index 191dba3b..d327c6e5 100644 --- a/wms/T8_APItest.php +++ b/wms/T8_APItest.php @@ -6,12 +6,13 @@ echo "ii"; get_Auth(); window.addEventListener('message', function(event) { if (event.origin === "http://localhost:3000" && (typeof event.data === "string")) { + // if (event.origin === "https://masada.com.tw" && (typeof event.data === "string")) { var validation = event.data; console.log("event"); console.log(validation); // var corsurl = 'http://cors-anywhere.herokuapp.com/'; - var apiurl = 'http://60.244.87.101:880/twWebAPI/V1/APCHECKBILL/PostERPData'; + var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/V1/SALDISPATCHLIST/GetERPData?pkValue=SS20230825001'; headerParam = { CHI_Authorization: `${validation}`, }; @@ -71,13 +72,13 @@ echo "ii"; ]; var json = JSON.stringify(body); obj = { - type: 'POST', + type: 'GET', // url: `${corsurl}${apiurl}`, url: `${apiurl}`, // dataType: 'json', headers: headerParam, - data: json, - dataType: "json", + // data: json, + // dataType: "json", success: function(res) { console.log(res.Status); console.log(res.ErrorMsg); diff --git a/wms/T8_Authorization.php b/wms/T8_Authorization.php index bc79e21c..0a18e7ed 100644 --- a/wms/T8_Authorization.php +++ b/wms/T8_Authorization.php @@ -2,16 +2,17 @@