Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

style1.htm 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {eyou:if condition='($is_mobile === false)'}
  2. <!--pc端-->
  3. <div class="part" style="height: 120px;padding:10px 15px;">
  4. <span style="color: #6b7386;">选择地区 :</span>
  5. <ul>
  6. {eyou:php}
  7. $class = '';
  8. if((int)$area_id == 0){
  9. $class = 'active-a';
  10. }
  11. {/eyou:php}
  12. <li class="" style="float: left; padding: 2px 10px;list-style: none;">
  13. <a href='/zc' class="{$class}">综合</a>
  14. </li>
  15. {eyou:php}
  16. $area_name = '';
  17. $sql = "SELECT id,name,domain FROM ey_citysite WHERE level = 1";
  18. {/eyou:php}
  19. {eyou:sql sql='$sql' cachetime='3600' id='area'}
  20. {eyou:php}
  21. $class = '';
  22. if((int)$area['id'] === (int)$area_id){
  23. $class = 'active-a';
  24. }
  25. {/eyou:php}
  26. <li class="" style="float: left; padding: 2px 10px;list-style: none;">
  27. <a href='/zc/{$area.domain}' class="{$class}">{$area.name}</a>
  28. </li>
  29. {/eyou:sql}
  30. </ul>
  31. </div>
  32. {eyou:else /}
  33. <div style="position:absolute;right: 10px;top: -40px;">
  34. <form class="layui-form" action="">
  35. <div class="layui-form-item" style="width: 100px;">
  36. <!-- <label class="layui-form-label"></label>-->
  37. <div class="layui-input-block" style="margin-left: 0px; height: 30px;">
  38. <select name="interest" lay-filter="aihao" style="height: 30px;">
  39. {eyou:php}
  40. $class = '';
  41. if((int)$area_id == 0){
  42. $class = 'selected';
  43. }
  44. {/eyou:php}
  45. <option value="" {$class}>
  46. <a href='/zc' class="{$class}">全部</a>
  47. </option>
  48. {eyou:php}
  49. $area_name = '';
  50. $sql = "SELECT id,name,domain FROM ey_citysite WHERE level = 1";
  51. {/eyou:php}
  52. {eyou:sql sql='$sql' cachetime='3600' id='area'}
  53. {eyou:php}
  54. $class = '';
  55. if((int)$area['id'] === (int)$area_id){
  56. $class = 'selected';
  57. }
  58. {/eyou:php}
  59. <option value="/zc/{$area.domain}" {$class}>
  60. <a href='/zc/{$area.domain}' class="{$class}">{$area.name}</a>
  61. </option>
  62. {/eyou:sql}
  63. </select>
  64. </div>
  65. </div>
  66. </form>
  67. </div>
  68. <script>
  69. layui.use(['form'], function(){
  70. var form = layui.form
  71. ,layer = layui.layer;
  72. form.on('select(aihao)', function(data){
  73. console.log(data.elem); //得到select原始DOM对象
  74. console.log(data.value); //得到被选中的值
  75. console.log(data.othis); //得到美化后的DOM对象
  76. if(data.value == ''){
  77. data.value = '/zc';
  78. }
  79. location.href = 'https://www.zc10000.com' + data.value;
  80. });
  81. });
  82. </script>
  83. <style>
  84. .layui-anim-upbit{
  85. z-index: 200 !important;
  86. }
  87. .layui-form-select{
  88. height: 30px !important;
  89. }
  90. .layui-select-title{
  91. height: 30px !important;
  92. }
  93. .layui-form-select .layui-input{
  94. height: 30px !important;
  95. font-size: 14px !important;
  96. }
  97. .layui-form-select dl{
  98. top: 30px !important;
  99. }
  100. .layui-anim-upbit dd{
  101. height: 30px !important;
  102. line-height: 30px !important;
  103. font-size: 14px !important;
  104. }
  105. </style>
  106. {/eyou:if}