scannerView.html 2.64 KB
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>添加设备</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
        html,body{
            background-color: transparent;
        }
        #line{
            width:200px;
            height:20px;
            position: absolute;
            left:10px;
            top: 10px;
            background:transparent;
            border-bottom:1px solid #FF5B5B;
        }
        #line:active{
            height:100px;
        }
    </style>
</head>

<body class="scanner-view">
  <div class="aui-content aui-margin-b-15">
      <header class="aui-bar aui-bar-nav" id="header">
          <a class="aui-btn aui-pull-left" tapmode onclick="closeWin()">
              <span class="aui-iconfont aui-icon-left"></span>
          </a>
          <div class="aui-title">添加设备</div>
      </header>
      <div class="scanner-view-content">
          <p>请扫一扫设备上的二维码获取设备编号</p>
          <div id="scanner_view">
            <i style="top:-1px;left:-1px;border-right:0;border-bottom:0;"></i>
            <i style="top:-1px;right:-1px;border-left:0;border-bottom:0;"></i>
            <i style="bottom:-1px;left:-1px;border-top:0;border-right:0;"></i>
            <i style="bottom:-1px;right:-1px;border-top:0;border-left:0;"></i>
            <!-- <div id="line"></div> -->
          </div>
      </div>
  </div>
  <div class="bar-shadow">
  </div>
</body>

</html>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
    var header = $api.byId('header');
    fixStatusBar_API(header);
    var h=0;
    apiready = function() {
        $api.css($api.byId('scanner_view'),"left:"+(((api.winWidth-220)/2)-1)+"px");
        $(".scanner-view").css("height",api.winHeight+"px");
        //setInterval(moveline,20);
    }
    // function moveline(){
    //       var line=$api.byId('line');
    //       if(h==200)
    //       {
    //               h=0;
    //       }else{
    //               h=h+1;
    //       }
    //       var hstr=h+'px';
    //        document.getElementById('line').style.cssText="height:"+hstr;
    // }
</script>