添加菜单报错问题【急】

收藏
1 234
JoshChen™
JoshChen™ 钻石会员 2018-03-11 18:35:54
付费话题:0 积分
ITKEE社区V3.0.1版本更新,补丁包下载了解详情 , 获取ITKEE社区版本,快速授权了解详情

未定义数组索引: child

<div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域(可配合layui已有的垂直导航) -->
                <?php if(is_array($left_nav) || $left_nav instanceof \think\Collection || $left_nav instanceof \think\Paginator): if( count($left_nav)==0 ) : echo "" ;else: foreach($left_nav as $key=>$vo): ?>
                <ul class="layui-nav layui-nav-tree menu-left" id="menu-left-<?php echo $key; ?>">
                    <?php if(is_array($vo) || $vo instanceof \think\Collection || $vo instanceof \think\Paginator): if( count($vo)==0 ) : echo "" ;else: foreach($vo as $key=>$voo): ?>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;"><i class="layui-icon">?</i>  <?php echo $voo['title']; ?></a>
                        <dl class="layui-nav-child">
                            <?php if(is_array($voo['child']) || $voo['child'] instanceof \think\Collection || $voo['child'] instanceof \think\Paginator): if( count($voo['child'])==0 ) : echo "" ;else: foreach($voo['child'] as $key=>$vooo): ?>
                            <dd><a class="<?php if(($key==0)): ?>open<?php endif; ?>" data-type="tabAdd" data-menu-id="1" data-herf="<?php echo url($vooo['name']); ?>"><?php echo $vooo['title']; ?></a></dd>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </dl>
                    </li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </div>
        </div>


评论话题
提交