Mẫu tệp cấu hình JavaScript và JSON phục vụ đối soát dữ liệu trò chơi.
JavaScript
// Cấu hình danh mục trò chơi cục bộ cho nh88
const nh88LocalConfig = {
brand: "nh88",
country: "vn",
platform: "android",
featuredGames: [
{ id: "162", name: "Three Cz Pigs", category: "Slot game" },
{ id: "047", name: "Ninja Vs Samurai", category: "Slot game" },
{ id: "190", name: "Mayan Destiny", category: "Slot game" },
{ id: "164", name: "Museum Wonders", category: "Slot game" },
{ id: "130", name: "Rave Party Fvr", category: "Slot game" }
],
supportStatus: "active"
};
function getGameTitle(gameId) {
const game = nh88LocalConfig.featuredGames.find(item => item.id === gameId);
return game ? game.name : "Trò chơi không xác định";
}
// Ví dụ kiểm tra tiêu đề trò chơi
console.log(getGameTitle("047"));
JSON
{
"brand": "nh88",
"country": "vn",
"platform": "android",
"featuredGames": [
{
"id": "162",
"name": "Three Cz Pigs",
"category": "Slot game"
},
{
"id": "047",
"name": "Ninja Vs Samurai",
"category": "Slot game"
},
{
"id": "190",
"name": "Mayan Destiny",
"category": "Slot game"
},
{
"id": "164",
"name": "Museum Wonders",
"category": "Slot game"
},
{
"id": "130",
"name": "Rave Party Fvr",
"category": "Slot game"
}
],
"supportStatus": "active"
}