Переглянути джерело

feat(云机分辨率): 分辨率变更广播改为中台发送

zengzhixiang 2 роки тому
батько
коміт
3b4cb4a18a

+ 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 (

+ 13 - 13
static/screenAndroid/WXtrialInterface.html

@@ -1799,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 (

+ 14 - 13
static/screenIos/WXtrialInterface.html

@@ -1602,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: