perfectInfo_win.html 2.33 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>完善设备信息_win</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
      <style>
        html,
        body{
          background-color: #F4F6F9;
        }
      </style>
  </head>
  <body>
    <header class="aui-header-bar" style="padding-top:30px;background-color:#5B7FF8;">
      <div class="aui-header-left" tapmode onclick="closeWin();">
        <span style="color:#FFFFFF;">取消</span>
      </div>
      <div class="aui-title" style="color:#FFFFFF;">完善设备信息</div>
      <div class="aui-header-right">
      </div>
    </header>
    <footer></footer>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript">
      apiready = function(){
        api.parseTapmode();
        var header = $api.dom('header'); // 获取 header 标签元素
        var footer = $api.dom('footer'); // 获取 footer 标签元素
        var headerH = $api.fixStatusBar(header);
        var footerH = $api.fixTabBar(footer);

        api.openFrame({
            name: 'perfectInfo_frm',
            url: './perfectInfo.html',
            rect: {
                x: 0,
                y: headerH,
                w: api.winWidth,
                h: api.winHeight-footerH-headerH

            },
            pageParam: {
                code: api.pageParam.code,
                isEmpty: api.pageParam.isEmpty
            },
        });

        api.addEventListener({
            name: 'closeAddDevicePage'
        }, function(ret, err){
          if( ret ){
            if(api.pageParam.isEmpty && !ret.value.isAdd){
              openCanner(true);
            }else{
              api.closeWin();
            }
          }
        });

      };

      function closeWin() {
        console.log(api.pageParam.isEmpty);
        if(api.pageParam.isEmpty){
          openCanner(true);
        }else{
          api.closeWin();
        }
      }
  </script>
  </html>