function getTvFileMap($tvName, $remark) { $filsRoot = '../data/nmdi/'; $itrDir = $filsRoot . $tvName . "/2016资源简概/"; $nowDir = $filsRoot . $tvName . "/现推资源/"; $itrFiles = $nowFiles = array(); if (is_dir($itrDir)) { $itrFiles = getPureFiles($itrDir, null); } if (is_dir($nowDir)) { $nowFiles = getPureFiles($nowDir, null); } return array("itr" => $itrFiles, "now" => $nowFiles, "rmk" => $remark, "idx" => $tvName); }
scandir($eventRoot . $v); ?> <div class="eventCover detail-3-col" data-tar="<?php echo $v; ?> "><img src="../data/event/<?php echo $v; ?> /封面.jpg"><p><?php echo $v; ?> </p></div> <?php } # 组成json $JPGS = getPureFiles($eventRoot . $v, "封面.jpg"); $eventFilesForJson[$v] = $JPGS; } ?> <script> (function(){ var eventData = eval(<?php echo json_encode($eventFilesForJson); ?> ); console.log(eventData); /* 初始化信息栏 */ var tvDetail = window.parent.document.querySelector('#tvDetail'); var closeShell = window.parent.document.querySelector('#closeShell');