<?php /*a:1:{s:65:"/www/wwwroot/117.72.69.185/app/frontend/view/index/bbb/youxi.html";i:1735032631;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <?php echo head(); ?>
    <link rel="stylesheet" href="/template/bbb/assets/css/index.css">
    <!--<script src="assets/js/index.js"></script>-->
</head>


<body>
    <div id="app" data-v-app="">
        <div id="app">
            <div class="header">
                <div class="header_left"></div>
                <h1 class="header_title">游戏</h1>
                <div class="header_right"></div>
            </div>
            <div class="body accounts-scroll">
                <div class="gameContent">
                    <div class="left_menu">
                        <?php foreach($type as $k => $v): ?>
                            <div class="gmenu_item <?php if(($k == 0)): ?>activel<?php endif; ?>" data-category-id="<?php echo htmlentities($v['id']); ?>">
                                <img src="/template/bbb/assets/img/free_on.c34743c4.png" alt="" class="item_Img selectImg">
                                <img src="/template/bbb/assets/img/free_off.b3ac7d10.png" alt="" class="item_Img unSelectImg">
                                <div class="game-names" ><?php echo htmlentities($v['name']); ?></div>
                            </div>
                        <?php endforeach; ?>
                        
                                            </div>
                    
                    <?php foreach($type as $k => $v): ?>
                    <div class="right_gameList <?php if(($k == 0)): ?>active<?php endif; ?>" id="<?php echo htmlentities($v['id']); ?>">
                        <div class="innerBox">
                            <?php foreach($site as $k1 => $v1): if(($v1['type_id'] == $v['id'])): ?>
                            <div class="game_item game_page">
                                <img src="/template/bbb/assets/img/rtop.0b49ad02.png" alt="" class="rtop_img">
                                <div class="app_info_game">
                                    <img src="<?php echo htmlentities($v1['icon']); ?>" class="app_logo">
                                    <span class="game_name"><?php echo htmlentities($v1['title']); ?></span>
                                </div>
                                <span class="gameText"><?php echo $v1['description']; ?></span>
                                <a href="<?php echo htmlentities($v1['url']); ?>">
                                    <img src="/template/bbb/assets/img/start.d6d5366e.png" alt="进入" class="start_img_game">
                                </a>
                            </div>
                            <?php endif; ?>
                            <?php endforeach; ?>
                                                        
                                                    </div>
                    </div>
                    <?php endforeach; ?>

                    

                                        
                                        
                                        
                                        
                                    </div>
            </div>
                <div class="bottom-navigation" data-v-1129fe84="">
        <a href="lianxi.html" class="nav-item " data-v-1129fe84="">
            <div class="icon icon-contact" data-v-1129fe84=""></div><span data-v-1129fe84="">客服</span>
        </a>
        <a href="index.html" class="nav-item " data-v-1129fe84="">
            <div class="icon icon-home" data-v-1129fe84=""></div><span data-v-1129fe84="">首页</span>
        </a>
        <a href="" class="nav-item router-link-active router-link-exact-active" data-v-1129fe84="">
            <div class="icon icon-game" data-v-1129fe84=""></div><span data-v-1129fe84="">游戏</span>
        </a>
        <a href="gongju.html" class="nav-item " data-v-1129fe84="">
            <div class="icon icon-more" data-v-1129fe84=""></div><span data-v-1129fe84="">工具</span>
        </a>
    </div>
            </div>
    </div>

    <script>
        // 切换菜单项并显示相应的内容
        document.querySelectorAll('.gmenu_item').forEach(item => {
            item.addEventListener('click', function() {
                // 切换激活的菜单项
                document.querySelectorAll('.gmenu_item').forEach(el => {
                    el.classList.remove('activel');
                    // el.querySelector('.selectImg').style.display = 'none';
                    // el.querySelector('.unSelectImg').style.display = 'block';
                });
                this.classList.add('activel');
                // this.querySelector('.selectImg').style.display = 'block';
                // this.querySelector('.unSelectImg').style.display = 'none';

                // 隐藏所有的内容
                document.querySelectorAll('.right_gameList').forEach(el => el.style.display = 'none');

                // 显示当前选择的内容
                const categoryId = this.getAttribute('data-category-id');
                const selectedList = document.getElementById(categoryId);
                
                selectedList.style.display = 'block';
            });
        });
    </script>
</body>

</html>
