Quellcode durchsuchen

Merge branch 'develop' of Software/android-cloud-H5 into release/v5.4.0

zengzhixiang vor 2 Jahren
Ursprung
Commit
9fb3231630
2 geänderte Dateien mit 27 neuen und 23 gelöschten Zeilen
  1. 13 11
      static/screenAndroid/WXtrialInterface.html
  2. 14 12
      static/screenIos/WXtrialInterface.html

+ 13 - 11
static/screenAndroid/WXtrialInterface.html

@@ -818,17 +818,19 @@
             }
           }
           if (input[23] == 0x05) {
-            //横竖屏标识
-            var state = CheckScreenDirection(input.slice(24, 24 + 8));
-
-            if (state == 1) {
-              console.log('安卓卡此时竖屏');
-              //竖屏处理
-              resolving = 1;
-            } else {
-              console.log('安卓卡此时横屏');
-              //横屏处理
-              resolving = 0;
+            if (input[28] == 0x01 && input[29] == 0x01) {
+              //横竖屏标识
+              var state = CheckScreenDirection(input.slice(24, 24 + 8));
+  
+              if (state == 1) {
+                console.log('安卓卡此时竖屏');
+                //竖屏处理
+                resolving = 1;
+              } else {
+                console.log('安卓卡此时横屏');
+                //横屏处理
+                resolving = 0;
+              }
             }
             // window.phoneSizeList = window.phoneSizeListBack.map(function (
             //   item,

+ 14 - 12
static/screenIos/WXtrialInterface.html

@@ -1152,18 +1152,20 @@
             }
             if (input[23] == 0x05) {
               //横竖屏标识
-              var state = CheckScreenDirection(input.slice(24, 24 + 8));
-
-              if (state == 1) {
-                console.log('安卓卡此时竖屏');
-                //竖屏处理
-                resolving = 1;
-                // $('#playCanvas').removeClass('horizontal').addClass('vertical');
-              } else {
-                console.log('安卓卡此时横屏');
-                //横屏处理
-                resolving = 0;
-                // $('#playCanvas').removeClass('vertical').addClass('horizontal');
+              if (input[28] == 0x01 && input[29] == 0x01) {
+                var state = CheckScreenDirection(input.slice(24, 24 + 8));
+  
+                if (state == 1) {
+                  console.log('安卓卡此时竖屏');
+                  //竖屏处理
+                  resolving = 1;
+                  // $('#playCanvas').removeClass('horizontal').addClass('vertical');
+                } else {
+                  console.log('安卓卡此时横屏');
+                  //横屏处理
+                  resolving = 0;
+                  // $('#playCanvas').removeClass('vertical').addClass('horizontal');
+                }
               }
               // window.phoneSizeList = window.phoneSizeListBack.map(function (
               //   item,