Minh họa cấu hình danh mục trò chơi mẫu cho môi trường thử nghiệm giao diện.
{ } starterConfig.js{ } starterConfig.json
Sao chép mã
JavaScript
// Cấu hình danh mục trò chơi tân thủ cục bộ cho u889
const starterCatalog = {
platform: 'u889' ,
region: 'vn' ,
recommendedGames: [
{ id: '162' , title: 'Three Cz Pigs' , tag: 'Hot' },
{ id: '163' , title: 'Oishi Delights' , tag: 'Featured' },
{ id: '003' , title: 'Fortune Gods' , tag: 'Classic' }
],
welcomeRewardActive: true
};
function getStarterGames(config) {
if (!config || !config.recommendedGames) {
return [];
}
return config.recommendedGames.map((game) => ({
gameId: game.id,
displayName: game.title
}));
}
// Xuất danh sách để hiển thị giao diện mẫu
const initialList = getStarterGames(starterCatalog);JSON
{
"platform" : "u889" ,
"region" : "vn" ,
"recommendedGames" : [
{
"id" : "162" ,
"title" : "Three Cz Pigs" ,
"tag" : "Hot"
},
{
"id" : "163" ,
"title" : "Oishi Delights" ,
"tag" : "Featured"
},
{
"id" : "003" ,
"title" : "Fortune Gods" ,
"tag" : "Classic"
}
],
"welcomeRewardActive" : true
}