Bladeren bron

Merge branch 'feature/云机分辨率' of Software/android-cloud-H5 into develop

zengzhixiang 2 jaren geleden
bovenliggende
commit
4ac5240358

+ 1 - 1
static/screenAndroid/WXdraw.js

@@ -193,7 +193,7 @@ function doConnectDirectives() {
       });
       return;
     }
-    if (result.type === 'getPhoneSize') {
+    if (result.type === 'getPhoneSize' || result.type === 'setPhoneSize') {
       // console.log(result);
       const data = window.phoneSizeList.find(function (v) {
         return (

+ 26 - 17
static/screenAndroid/WXtrialInterface.html

@@ -507,7 +507,9 @@
                   quit();
                 }, 3000);
               }
-            } else if (res.status === 5200) {
+              return;
+            }
+            if (res.status === 5200) {
               if (timeInterval > 7) {
                 $.toast('网络异常,请稍后重试', 'text');
                 setTimeout(() => {
@@ -521,13 +523,20 @@
                 connect(type);
                 timeInterval += 1;
               }, 3000);
-            } else {
-              $.toast('画面异常,请重新进入', 'text');
+              return;
+            }
+            if (res.status === 5220) {
+              $.toast('云手机正在一键修复中', 'text');
               setTimeout(() => {
-                clearInterval(intervaler);
                 quit();
               }, 3000);
+              return;
             }
+            $.toast('画面异常,请重新进入', 'text');
+            setTimeout(() => {
+              clearInterval(intervaler);
+              quit();
+            }, 3000);
           },
         });
       }
@@ -1790,19 +1799,19 @@
           }),
         );
         // 通知其他在线端
-        wsss.send(
-          JSON.stringify({
-            type: 'forwardMsg',
-            data: {
-              code: 'phoneSizeChange',
-              id: config.id,
-              width: config.width,
-              height: config.height,
-              dpi: config.dpi,
-              desc: '分辨率修改', // 可选
-            },
-          }),
-        );
+        // wsss.send(
+        //   JSON.stringify({
+        //     type: 'forwardMsg',
+        //     data: {
+        //       code: 'phoneSizeChange',
+        //       id: config.id,
+        //       width: config.width,
+        //       height: config.height,
+        //       dpi: config.dpi,
+        //       desc: '分辨率修改', // 可选
+        //     },
+        //   }),
+        // );
         // 上报分辨率
         $.ajax({
           url:

+ 10 - 10
static/screenIos/WXdraw.js

@@ -158,15 +158,15 @@ function doConnectDirectives() {
           );
           return;
         }
-        case 'phoneSizeChange': {
-          window.currentPhoneSize = {
-            id: result.data.id,
-            width: result.data.width,
-            height: result.data.height,
-            dpi: result.data.dpi,
-          };
-          return;
-        }
+        // case 'phoneSizeChange': {
+        //   window.currentPhoneSize = {
+        //     id: result.data.id,
+        //     width: result.data.width,
+        //     height: result.data.height,
+        //     dpi: result.data.dpi,
+        //   };
+        //   return;
+        // }
         default: {
           return;
         }
@@ -202,7 +202,7 @@ function doConnectDirectives() {
       });
       return;
     }
-    if (result.type === 'getPhoneSize') {
+    if (result.type === 'getPhoneSize' || result.type === 'setPhoneSize') {
       // console.log(result);
       const data = window.phoneSizeList.find(function (v) {
         return (

+ 26 - 16
static/screenIos/WXtrialInterface.html

@@ -528,7 +528,9 @@
                   quit();
                 }, 3000);
               }
-            } else if (res.status === 5200) {
+              return;
+            }
+            if (res.status === 5200) {
               if (timeInterval > 7) {
                 $.toast('网络异常,请稍后重试', 'text');
                 timerInterval = clearTimeout();
@@ -541,12 +543,19 @@
                 connect(type);
                 timeInterval += 1;
               }, 3000);
-            } else {
-              $.toast('画面异常,请重新进入', 'text');
+              return;
+            }
+            if (res.status === 5220) {
+              $.toast('云手机正在一键修复中', 'text');
               setTimeout(() => {
                 quit();
               }, 3000);
+              return;
             }
+            $.toast('画面异常,请重新进入', 'text');
+            setTimeout(() => {
+              quit();
+            }, 3000);
           },
         });
       }
@@ -1593,20 +1602,21 @@
             },
           }),
         );
+        // XXX: 去除了,改为中台发送
         // 通知其他在线端
-        wsss.send(
-          JSON.stringify({
-            type: 'forwardMsg',
-            data: {
-              code: 'phoneSizeChange',
-              id: config.id,
-              width: config.width,
-              height: config.height,
-              dpi: config.dpi,
-              desc: '分辨率修改', // 可选
-            },
-          }),
-        );
+        // wsss.send(
+        //   JSON.stringify({
+        //     type: 'forwardMsg',
+        //     data: {
+        //       code: 'phoneSizeChange',
+        //       id: config.id,
+        //       width: config.width,
+        //       height: config.height,
+        //       dpi: config.dpi,
+        //       desc: '分辨率修改', // 可选
+        //     },
+        //   }),
+        // );
         // 上报分辨率
         $.ajax({
           url: