[FeaturedBrandsPanel] test, system alert (luna)

This commit is contained in:
younghoon100.park
2024-06-28 16:58:19 +09:00
parent 05a22e09eb
commit 8b75347763
2 changed files with 59 additions and 12 deletions

View File

@@ -269,3 +269,37 @@ export const deleteReservation = (scheduleIdList) => {
},
});
};
export const searchReservation = () => {
if (typeof window === "object" && !window.PalmSystem) {
console.log("LUNA SEND searchReservation");
return;
}
return new LS2Request().send({
service: "luna://com.palm.db",
method: "search",
parameters: {
query: {
from: "com.webos.service.tvReservationAgent.info:1",
orderBy: "startTime",
filter: [{ prop: "reserveType", op: "=", val: 6 }], // 6 LG Shopping 전용.
},
},
onSuccess: (res) => {
console.log("LUNA SEND searchReservation success", res);
let items = [];
res.result.forEach((item) => {
let obj = JSON.parse(item.information.information);
items.push({
_id: item._id,
showId: obj.showId,
});
});
return items;
},
onFailur: (err) => {
console.log("LUNA SEND searchReservation failed", err);
},
});
};