张凯
张凯
  • 发布:2016-06-02 15:45
  • 更新:2016-06-02 16:22
  • 阅读:1094

安卓兼容问题,压住了顶部电源状态栏【急】

分类:HTML5+
2016-06-02 15:45 1 条评论 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

是否设置了沉浸式?

  • 张凯 (作者)

    什么意思啊?没明白 【这是我的代码】

    <!DOCTYPE html>

    <html>


    <head>  
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="../js/mui.min.js"></script>
    <link href="../css/mui.min.css" rel="stylesheet" />
    <script type="text/javascript" charset="UTF-8">
    mui.init();
    </script>
    </head>

    <body>
    <header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">气象信息</h1>
    </header>
    <div class="mui-content">
    <div id="pullrefresh" class="mui-content mui-scroll-wrapper">
    <div class="mui-scroll">
    <!--数据列表-->
    <ul id="ul_List" class="mui-table-view mui-table-view-chevron" style="top:40px;">

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

    </div>
    </body>
    <script src="../js/jquery-1.10.2.min.js"></script>
    <script src="../ResourceJS/StaticModel.js"></script>
    <script>
    $(function() { 
    //if (GetUserData() == null) {
    //mui.openWindow({
    // url: "Account/Login.html",
    // id: "Account/Login.html"
    //});
    //}
    mui.toast("正在加载..."); //默认加载提示,加载mui的初始化中无效果
    });
    mui.init({
    pullRefresh: {
    container: '#pullrefresh',
    down: {
    callback: pulldownRefresh
    },
    up: {
    contentrefresh: '正在加载...',
    callback: pullupRefresh
    }
    }
    });
    /**
    * 下拉刷新具体业务实现
    */
    function pulldownRefresh() {
    setTimeout(function() {
    var table = document.body.querySelector('.mui-table-view');
    var cells = document.body.querySelectorAll('.mui-table-view-cell');
    $("#ul_List").html(""); //清空内容
    mui.ajax('http://101.200.178.75:8003/AppInterface/GetWeatherList_ZJ?NowRowCount=0', {
    data: {},
    dataType: 'josn', //服务器返回json格式数据【注意返回格式,返回格式也会影响是否成功】
    type: 'get', //HTTP请求类型
    timeout: 10000, //超时时间设置为10秒;
    success: function(data) {
    var dataObj = eval("(" + data + ")");
    $.each(dataObj, function(i, item) {
    var li = document.createElement('li');
    li.className = 'mui-table-view-cell';
    var Title = ' <h4 class="mui-ellipsis">' + item.trafficstation_name + '</h4>'; //标题
    var contenttxt = ' <div class="mui-table-cell mui-col-xs-10">' + Title + '</div>'; //中间整体内容
    var timetxt = ' <div class="mui-table-cell mui-col-xs-2 mui-text-right"> <span class="mui-h5">' + item.road_state1 + '</span></div>';
    li.innerHTML = ' <div class="mui-table">' + contenttxt + timetxt + ' </div>';
    li.addEventListener("tap", function() {
    openurl('WeatherMap_ZJZ.html?ID=' + item.ID);
    });
    table.appendChild(li);
    });
    },
    error: function(xhr, type, errorThrown) {
    //异常处理;
    console.log(errorThrown);
    }
    });
    mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
    }, 1500);
    }
    var count = 0;
    /**
    * 上拉加载具体业务实现
    */
    function pullupRefresh() {
    setTimeout(function() {
    mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 10000)); //参数为true代表没有更多数据了。
    var table = document.body.querySelector('.mui-table-view');
    var cells = document.body.querySelectorAll('.mui-table-view-cell');
    mui.ajax('http://101.200.178.75:8003/AppInterface/GetWeatherList_ZJ?NowRowCount=' + cells.length, {
    data: {},
    dataType: 'josn', //服务器返回json格式数据【注意返回格式,返回格式也会影响是否成功】
    type: 'get', //HTTP请求类型
    timeout: 10000, //超时时间设置为10秒;
    success: function(data) {
    var dataObj = eval("(" + data + ")");
    $.each(dataObj, function(i, item) {
    var li = document.createElement('li');
    li.className = 'mui-table-view-cell';
    var Title = ' <h4 class="mui-ellipsis">' + item.trafficstation_name + '</h4>'; //标题
    var contenttxt = ' <div class="mui-table-cell mui-col-xs-10">' + Title + '</div>'; //中间整体内容
    var timetxt = ' <div class="mui-table-cell mui-col-xs-2 mui-text-right"> <span class="mui-h5">' + item.road_state1 + '</span></div>';
    li.innerHTML = ' <div class="mui-table">' + contenttxt + timetxt + ' </div>';
    li.addEventListener("tap", function() {
    openurl('WeatherMap_ZJZ.html?ID=' + item.ID);
    });
    table.appendChild(li);
    });
    },
    error: function(xhr, type, errorThrown) {
    //异常处理;
    console.log(errorThrown);
    }
    });
    }, 1500);
    }
    if (mui.os.plus) {
    mui.plusReady(function() {
    setTimeout(function() {
    mui('#pullrefresh').pullRefresh().pullupLoading();
    }, 1000);
    });
    } else {
    mui.ready(function() {
    mui('#pullrefresh').pulldownRefresh().pullupLoading();
    });
    }

    function openurl(url) {
    mui.openWindow({
    url: url,
    id: url
    });
    }
    </script>

    </html>

    2016-06-02 16:49

该问题目前已经被锁定, 无法添加新回复