cosed #9 Done.

This commit is contained in:
Paul Kim
2023-02-15 02:19:51 +09:00
parent 4fd1762d4b
commit c5c22a5897
5 changed files with 521 additions and 208 deletions

View File

@@ -6,7 +6,7 @@
* @summary short description for the file
* @author Joel <joel.kim@centirm.com>
*
* Created at : 2020-11-26 02:21:56
* Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40
*/
// importScripts('./lib/hoteltv.js');
@@ -33,7 +33,7 @@ function __svcfxn_get_base_url() {
}
/**
* API Wrapper Function::>
* API Wrapper Function::>
* @param {string} api_type api type.
* @param {callback} callback is callback object
*/
@@ -238,7 +238,12 @@ async function sworker_service(args) {
}
if (_bNeed_Update.weather == true) {
g_port.postMessage({ "event": "update_weather", "ret": "OK", "data": _bNeed_Update.weather });
let sz_api_url = __svcfxn_get_api_url("get_flight");
__svcfxn_CallCmsApi(sz_api_url, "GetFlight", null).then(_result => {
g_port.postMessage({ "event": "update_weather", "ret": "OK", "data": JSON.parse(_result.data) });
}).catch(_error => {
g_port.postMessage({ "event": "update_weather", "ret": "ERROR", "data": null });
});
}
if (_bNeed_Update.report == true) {