123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- $module = Yii::$app->hostserver->module['module'];
- ?>
- <!-- 导航 -->
- <div class="hu_nav" id="wdemo07">
- <div class="hu_nav_main scroller">
- <ul class="c clearfix">
- <li>
- <a href="/house/<?= $hid ?>">
- <span><?= \common\fm\Opencc::ConvertHn('楼盘首页') ?></span>
- <i></i>
- </a>
- </li>
- <li <?php if (strpos($_SERVER['REQUEST_URI'], 'house/details') > 0) echo 'class="on"' ?>>
- <a href="/house/details/<?= $hid ?>">
- <span><?= \common\fm\Opencc::ConvertHn('详情') ?></span>
- <i></i>
- </a>
- </li>
- <li <?php if (strpos($_SERVER['REQUEST_URI'], 'house/album') > 0) echo 'class="on"' ?>>
- <a href="/house/album/<?= $hid ?>">
- <span><?= \common\fm\Opencc::ConvertHn('相册') ?></span>
- <i></i>
- </a>
- </li>
- <li <?php if (strpos($_SERVER['REQUEST_URI'], 'house/type') > 0) echo 'class="on"' ?>>
- <a href="/house/type/<?= $hid ?>">
- <span><?= \common\fm\Opencc::ConvertHn('户型') ?></span>
- <i></i>
- </a>
- </li>
- </ul>
- </div>
- </div>
- <script>
- /**
- * 动态加载JS
- * url JS路径
- * callback 回调函数
- */
- function dynamicLoadJs(url, callback) {
- var head = document.getElementsByTagName('head')[0];
- var script = document.createElement('script');
- script.type = 'text/javascript';
- script.src = url;
- if (typeof (callback) == 'function') {
- script.onload = script.onreadystatechange = function () {
- if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
- callback();
- script.onload = script.onreadystatechange = null;
- }
- };
- }
- head.appendChild(script);
- }
- // 调用方法
- // dynamicLoadJs('/js/menu/lpnav.js',function(){});
- </script>
|