hotelmobile.html 13.5 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商旅服务</title>
    <!--<meta name="viewport" content="width=device-width, initial-scale=1" />-->
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1043230_hcei2fa3b4q.css">
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/common.css">
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/slfw_2.css">
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/dropload.css">
    <link rel="stylesheet" type="text/css" href="https://api.map.baidu.com/res/13/bmap.css">

    <script src="__TMPL__/public/assets/js/base.js"></script>
    <script src="__TMPL__/public/assets/js/jquery.min.js"></script>
    <style>
        .iconfont{
            font-size: 0.38rem;
        }
        .icon-zuo{
            color: #959595;
            font-size: 0.38rem;
        }
        .icon-iconfont-edu12{
            color: #959595;
            font-size: 0.5rem;
        }
        table{
            margin-top: 0.1rem;
            border: 1px solid #ffffff;
        }
        th{
            width: 2rem;
            height: 1rem;
            font-size: 0.2rem;
            background-color: #4C79B2;
            list-style: none;
            color: #fff;
        }
        td{
            width: 1.6rem;
            height: 1rem;
            font-size: 0.2rem;
            background-color: #CED5D5;
            text-align: center;
        }
        .icon-fangdajing{
            color: #ffffff;
        }
        .addr{
            font-size: 0.2rem;
        }
        .phone{
            font-size: 0.2rem;
        }
        /*引入百度地图*/
        #allmap,.BMap_mask {
            height: 100%;
            width: 100%;
            overflow: hidden;
        }
        .anchorBL{
            display:none;
        }

        .icon-iconfont-edu12{
            color: #959595;
            font-size: 0.5rem;
            position: relative;
        }
        .icon-shangsanjiao{
            height: 0.5rem;
            font-size: 0.6rem;
            margin-left: 1.2rem;
            position: absolute;
            top: -0.28rem;
            color: #F4F5F9;
        }
        .margin_lef{
            margin-left: 0.2rem;
        }
        .menu{
            /*display: flex;*/
            position: absolute;
            top: 0.69rem;
            left: -1.4rem;
            z-index: 999;
        }
        .menu_color{
            color: #EA474B;
        }
    </style>
</head>
<body>
<div class="container">
    <!--头部信息-->
    <div class="head">
        <!--左图标-->
        <div class="iconfont icon-zuo">

        </div>
        <!--内容详情-->
        <div class="head_new">
            商旅服务
        </div>
        <!--右菜单-->
        <div class="iconfont icon-iconfont-edu12">
            <!--菜单栏功能-->
            <div class="menu" style="display: none;">

                <!--菜单列表-->
                <div class="head_menu">
                    <!--箭头-->
                    <div class="iconfont icon-shangsanjiao"></div>
                    <!--菜单-->
                    <div class="head_menu_item menu_index">
                        <!--图标-->
                        <div class="iconfont icon-zhuye2 margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            首页
                        </div>
                    </div>
                    <div class="head_menu_item menu_gyzh">
                        <!--图标-->
                        <div class="iconfont icon-fangzi margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            关于展品
                        </div>
                    </div>
                    <div class="head_menu_item menu_zpfw">
                        <!--图标-->
                        <div class="iconfont icon-fangkuai margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            展品范围
                        </div>
                    </div>
                    <div class="head_menu_item menu_zsml">
                        <!--图标-->
                        <div class="iconfont icon-diqiu1 margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            展商名录
                        </div>
                    </div>
                    <div class="head_menu_item menu_czsq">
                        <!--图标-->
                        <div class="iconfont icon-zuanshi margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            参展申请
                        </div>
                    </div>
                    <div class="head_menu_item menu_gzml">
                        <!--图标-->
                        <div class="iconfont icon-lanzi margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            观众名录
                        </div>
                    </div>
                    <div class="head_menu_item menu_cgdj">
                        <!--图标-->
                        <div class="iconfont icon-gouwuche1 margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            参观登记
                        </div>
                    </div>
                    <div class="head_menu_item menu_lthd">
                        <!--图标-->
                        <div class="iconfont icon-luyin margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            论坛活动
                        </div>
                    </div>
                    <div class="head_menu_item menu_xwbd">
                        <!--图标-->
                        <div class="iconfont icon-ic_language_px margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            新闻报道
                        </div>
                    </div>
                    <div class="head_menu_item menu_slfw">
                        <!--图标-->
                        <div class="iconfont icon-shuben margin_lef"></div>
                        <!--文字-->
                        <div class="head_menu_item_text">
                            商旅服务
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>


    <!--顶部菜单-->
    <div class="top">
        <div class="top_item">
            交通信息
        </div>
        <div class="top_item top_color">
            酒店住宿
        </div>
        <div class="top_item ">
            周边美食
        </div>
        <div class="top_item ">
            天津旅游
        </div>
    </div>

    <div class="box">
        <!------------ 酒店住宿 ------------->
        <div class="item_a hotel">
            <div class="items_box" >

            </div>
        </div>
    </div>

    <!--底部菜单-->
    <include file="public@footer"/>

</div>

<script src="__TMPL__/public/assets/js/dropload.min.js"></script>
<script src="__TMPL__/public/assets/js/footer.js"></script>
<script>
    //左边菜单功能
    $(".icon-iconfont-edu12").click(function () {
        $(".menu").slideToggle();
    });

    //返回功能
    $('.icon-zuo').click(function () {
        window.history.back();
    });

    //下拉菜单
    $(document).ready(function () {
        //-------------酒店循环---------------
        var page = 0;
        // 每次循环展示10个
        $('.hotel').dropload({
            scrollArea : window,
            domUp : {
                domClass   : 'dropload-up',
                domRefresh : '<div class="dropload-refresh">↓下拉刷新</div>',
                domUpdate  : '<div class="dropload-update">↑释放更新</div>',
                domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>'
            },
            domDown : {
                domClass   : 'dropload-down',
                domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
                domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
                domNoData  : '<div class="dropload-noData">暂无数据</div>'
            },
            loadDownFn : function(me){
                page++;
                // 拼接HTML
                var result = '';
                $.ajax({
                    type: 'GET',
                    url:"{:url('travel/get_list')}",
                    dataType: 'json',
                    data:{cate_id:43,menu_id:49,page:page},
                    success: function(data){
                        console.log(data);
                        var arrLen = data.length;
                        if(arrLen > 0){
                            $.each(data,function(i,val) {
                                <!--左边-->
                                result += '<div class="item">';
                                result += '<input type="hidden" class="menu_id" value="'+val['menu_id']+'">';
                                result += '<input type="hidden" class="id" value="'+val['id']+'">';
                                result += '<div class="item_left">';
                                result += '<img src="'+val['thumb']+'">';
                                result += '</div>';
                                //中部
                                result += '<div class="item_mid">';
                                result += '<p class="item_mid_big">'+val['title']+'</p>';
                                result += '<div class="item_mid_small">';
                                //地址
                                result += '<div class="item_mid_small_item">';
                                result += '<div class="iconfont icon-user-address addr"></div>';
                                result += '<div class="item_mid_small_item_s">'+val['address']+'</div>';
                                result += '</div>';
                                <!--电话-->
                                result += '<div class="item_mid_small_item">';
                                result += '<div class="iconfont icon-dianhua-copy phone"></div>';
                                result += '<div class="item_mid_small_item_s">'+val['tel']+'</div>';
                                result += '</div></div></div>';
                                <!--右边-->
                                result += '<div class="item_right">';
                                result += '<p>'+val['m']+'月</p>';
                                result += '<p>'+val['d']+'日</p>';
                                result += '<p>星期'+val['w']+'</p>';
                                result += '</div>';
                                result += '</div>';
                                // 如果没有数据
                            });
                        }else{
                            // 锁定
                            me.lock();
                            // 无数据
                            me.noData();
                        }
                        // 为了测试,延迟1秒加载
                        setTimeout(function(){
                            // 插入数据到页面,放到最后面
                            $('.items_box').append(result);
                            if(page == 1){
                                $('.item:first').find('.item_right').addClass('color_red');
                            }
                            // 每次数据插入,必须重置
                            me.resetload();
                        },500);
                    },
                    error: function(xhr, type){
                        alert('Ajax error!');
                        // 即使加载出错,也得重置
                        me.resetload();
                    }
                });
            },
            threshold : 50
        });
        $(document).on('click','.item',function(){
            var id = $(this).find('.id').val();
            var menu_id = $(this).find('.menu_id').val();
            window.location.href = '/portal/travel/detail/menu_id/'+menu_id+'/id/'+id;
        });
    });

    //苹果input自动下滑兼容
    $("input").blur(function(){
        setTimeout(function() {
            var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
            window.scrollTo(0, Math.max(scrollHeight - 1, 0));
        }, 300);
    })
    //聚焦监听
    $('input').focus(function() {
        if((/Android/gi).test(navigator.userAgent)) {
            window.addEventListener('resize', function() {
                if(document.activeElement.tagName == 'INPUT' ||
                    document.activeElement.tagName == 'TEXTAREA') {
                    window.setTimeout(function() {
                        document.activeElement.scrollIntoViewIfNeeded();
                    }, 0);
                }
            });
        }
    })
</script>
</body>
</html>