Mẫu khai báo dữ liệu cục bộ phục vụ định tuyến hiển thị giao diện trò chơi.
{ } example.js{ } example.json
Sao chép mã
JavaScript
// Cấu hình tham chiếu hiển thị danh mục trò chơi cục bộ
const x88Config = {
platform: 'web' ,
locale: 'vi-VN' ,
defaultGame: '090' ,
featuredGames: [
{ id: '090' , name: 'Majestic Ts' },
{ id: '094' , name: 'Heist Stakes' },
{ id: '185' , name: 'Poker Kingdom' },
{ id: '019' , name: 'Dragon Legend' },
{ id: '080' , name: 'Jack Frosts' }
]
};
function getGameInfo(gameId) {
return x88Config.featuredGames.find(item => item.id === gameId) || null ;
}
console.log('Khoi tao danh muc tro choi thanh cong' ); JSON
{
"platform" : "web" ,
"locale" : "vi-VN" ,
"defaultGame" : "090" ,
"featuredGames" : [
{ "id" : "090" , "name" : "Majestic Ts" },
{ "id" : "094" , "name" : "Heist Stakes" },
{ "id" : "185" , "name" : "Poker Kingdom" },
{ "id" : "019" , "name" : "Dragon Legend" },
{ "id" : "080" , "name" : "Jack Frosts" }
]
}