Mẫu cấu hình tham số trò chơi Nổ hũ cục bộ dành cho môi trường hiển thị giao diện.
{ } game_catalog_config.js{ } game_catalog_config.json
Sao chép mã
JavaScript
// Cấu hình cục bộ danh sách trò chơi Nổ hũ tại 88OK
const localGameCatalog = {
platform: "88OK" ,
country: "vn" ,
language: "Tiếng Việt" ,
featuredGames: [
{ id: "128" , name: "Midas Fortune" , category: "Nổ hũ" },
{ id: "194" , name: "Mighty Mania" , category: "Nổ hũ" },
{ id: "006" , name: "Medusa2" , category: "Nổ hũ" },
{ id: "177" , name: "Dragons Treas" , category: "Nổ hũ" },
{ id: "135" , name: "Spr Golf Drive" , category: "Nổ hũ" }
],
defaultSettings: {
audioEnabled: true ,
quickSpin: false
}
};
function getGameInfo(gameId) {
return localGameCatalog.featuredGames.find(item => item.id === gameId) || null ;
}
// Ví dụ kiểm tra dữ liệu trò chơi Midas Fortune
const selectedGame = getGameInfo("128" );
console.log("Trò chơi được chọn:" , selectedGame?.name); JSON
{
"platform" : "88OK" ,
"country" : "vn" ,
"language" : "Tiếng Việt" ,
"featuredGames" : [
{
"id" : "128" ,
"name" : "Midas Fortune" ,
"category" : "Nổ hũ"
},
{
"id" : "194" ,
"name" : "Mighty Mania" ,
"category" : "Nổ hũ"
},
{
"id" : "006" ,
"name" : "Medusa2" ,
"category" : "Nổ hũ"
},
{
"id" : "177" ,
"name" : "Dragons Treas" ,
"category" : "Nổ hũ"
},
{
"id" : "135" ,
"name" : "Spr Golf Drive" ,
"category" : "Nổ hũ"
}
],
"defaultSettings" : {
"audioEnabled" : true ,
"quickSpin" : false
}
}