czt
3 天以前 2c3098821a1f3e9825b6903810675feddb135de2
dzhwk/unpackage/cache/wgt/H560379C1/index.html
@@ -111,7 +111,11 @@
   <script type="text/javascript" charset="utf-8">
      mui.init();
      // 先设置 APP 全局全屏(隐藏状态栏)
      plus.navigator.setFullscreen(true);
      mui.plusReady(function() {
         var user = JSON.parse(localStorage.getItem('user'));
         console.log(JSON.stringify(user));
         if (user) {
@@ -151,19 +155,38 @@
         var URL = url + "?sid=" + sid;
         // var wv = plus.webview.create(URL);
         // wv.show();
          // 1. 全屏创建 Webview
         var wv = plus.webview.create(
            URL,
            "",
             'targetWebview', // 唯一id
            {
               width: "100%",        // 宽度全屏
               height: "100%",       // 高度全屏
               scrollIndicator: "none", // 隐藏滚动条
               statusbar: { background: "#ffffff" }, // 状态栏透明/同色
               fullscreen: false,    // 不隐藏状态栏(需要隐藏改成true)
               softinputMode: "adjustResize" // 键盘弹出不挤压页面
               top: '0px',      // 顶边距0
               bottom: '0px',   // 底边距0
               left: '0px',     // 左边距0
               right: '0px',    // 右边距0
               width: '100%',
               height: '100%',
               scrollIndicator: 'none', // 隐藏滚动条(可选)
               hardwareAccelerated: true // 开启硬件加速(Android)
            }
         );
           // 2. 显示 Webview
         wv.show();
           // 3. 可选:Webview 加载完成后再强制网页全屏
         wv.addEventListener('loaded', function() {
             // 注入JS让网页自身占满视口
             wv.evalJS(`
               document.documentElement.style.width = '100%';
               document.documentElement.style.height = '100%';
               document.body.style.width = '100%';
               document.body.style.height = '100%';
               document.body.style.margin = '0';
               document.body.style.padding = '0';
               document.body.style.overflow = 'hidden';
             `);
         });
      }
   </script>
</html>