Mẫu cấu hình cục bộ danh mục trò chơi cho hệ thống giao diện.
{ } game_config.js{ } game_config.json
Sao chép mã
JavaScript
// Cấu hình thông số khởi tạo danh sách trò chơi rr888
const gameConfig = {
platform: 'rr888' ,
locale: 'vi-VN' ,
defaultGameId: '042' ,
catalog: [
{ id: '042' , name: 'Journey To The Wealth' , category: 'Nổ hũ' },
{ id: '102' , name: 'Buffalo Win' , category: 'Nổ hũ' },
{ id: '137' , name: 'Fruity Candy' , category: 'Nổ hũ' }
],
displayOptions: {
showBetSelector: true ,
autoPlayLimit: 50
}
};
function getGameInfo(id) {
return gameConfig.catalog.find(item => item.id === id) || null ;
} JSON
{
"platform" : "rr888" ,
"locale" : "vi-VN" ,
"defaultGameId" : "042" ,
"catalog" : [
{
"id" : "042" ,
"name" : "Journey To The Wealth" ,
"category" : "Nổ hũ"
},
{
"id" : "102" ,
"name" : "Buffalo Win" ,
"category" : "Nổ hũ"
},
{
"id" : "137" ,
"name" : "Fruity Candy" ,
"category" : "Nổ hũ"
}
],
"displayOptions" : {
"showBetSelector" : true ,
"autoPlayLimit" : 50
}
}