123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- {eyou:if condition='($is_mobile === false)'}
-
- <!--pc端-->
- <div class="part" style="height: 120px;padding:10px 15px;">
-
- <span style="color: #6b7386;">选择地区 :</span>
- <ul>
- {eyou:php}
- $class = '';
- if((int)$area_id == 0){
- $class = 'active-a';
- }
- {/eyou:php}
- <li class="" style="float: left; padding: 2px 10px;list-style: none;">
- <a href='/zc' class="{$class}">综合</a>
- </li>
- {eyou:php}
- $area_name = '';
- $sql = "SELECT id,name,domain FROM ey_citysite WHERE level = 1";
- {/eyou:php}
- {eyou:sql sql='$sql' cachetime='3600' id='area'}
- {eyou:php}
- $class = '';
- if((int)$area['id'] === (int)$area_id){
- $class = 'active-a';
- }
- {/eyou:php}
- <li class="" style="float: left; padding: 2px 10px;list-style: none;">
- <a href='/zc/{$area.domain}' class="{$class}">{$area.name}</a>
- </li>
- {/eyou:sql}
- </ul>
- </div>
-
-
- {eyou:else /}
-
-
-
- <div style="position:absolute;right: 10px;top: -40px;">
-
-
-
-
-
- <form class="layui-form" action="">
- <div class="layui-form-item" style="width: 100px;">
- <!-- <label class="layui-form-label"></label>-->
- <div class="layui-input-block" style="margin-left: 0px; height: 30px;">
- <select name="interest" lay-filter="aihao" style="height: 30px;">
-
- {eyou:php}
- $class = '';
- if((int)$area_id == 0){
- $class = 'selected';
- }
- {/eyou:php}
- <option value="" {$class}>
- <a href='/zc' class="{$class}">全部</a>
- </option>
- {eyou:php}
- $area_name = '';
- $sql = "SELECT id,name,domain FROM ey_citysite WHERE level = 1";
- {/eyou:php}
- {eyou:sql sql='$sql' cachetime='3600' id='area'}
- {eyou:php}
- $class = '';
- if((int)$area['id'] === (int)$area_id){
- $class = 'selected';
- }
- {/eyou:php}
- <option value="/zc/{$area.domain}" {$class}>
- <a href='/zc/{$area.domain}' class="{$class}">{$area.name}</a>
- </option>
- {/eyou:sql}
-
-
- </select>
- </div>
- </div>
- </form>
- </div>
-
- <script>
- layui.use(['form'], function(){
- var form = layui.form
- ,layer = layui.layer;
-
- form.on('select(aihao)', function(data){
- console.log(data.elem); //得到select原始DOM对象
- console.log(data.value); //得到被选中的值
- console.log(data.othis); //得到美化后的DOM对象
- if(data.value == ''){
- data.value = '/zc';
- }
- location.href = 'https://www.zc10000.com' + data.value;
- });
-
-
- });
- </script>
-
- <style>
- .layui-anim-upbit{
- z-index: 200 !important;
- }
- .layui-form-select{
- height: 30px !important;
- }
- .layui-select-title{
- height: 30px !important;
- }
- .layui-form-select .layui-input{
- height: 30px !important;
- font-size: 14px !important;
- }
- .layui-form-select dl{
- top: 30px !important;
- }
- .layui-anim-upbit dd{
- height: 30px !important;
- line-height: 30px !important;
- font-size: 14px !important;
- }
- </style>
-
-
-
- {/eyou:if}
|