Browse Source

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

zengzhixiang 2 years ago
parent
commit
56955323c8

+ 15 - 12
static/screenAndroid/WXdraw.js

@@ -77,9 +77,12 @@ function doConnectDirectives() {
     }
     }
   };
   };
   wsss.onmessage = function (res) {
   wsss.onmessage = function (res) {
-    console.log('res', res);
     var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
     var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
-    console.log('result.type', result.type);
+    console.log(
+      '🚀 ~ file: WXdraw.js ~ line 78 ~ doConnectDirectives ~ result',
+      result,
+    );
+
     if (result.type === 'cutting') {
     if (result.type === 'cutting') {
       if (result.data.status === 0) {
       if (result.data.status === 0) {
         $.toast('复制成功', 'text');
         $.toast('复制成功', 'text');
@@ -194,14 +197,14 @@ function doConnectDirectives() {
       // console.log(result);
       // console.log(result);
       const data = window.phoneSizeList.find(function (v) {
       const data = window.phoneSizeList.find(function (v) {
         return (
         return (
-          v.width === result.data.width &&
-          v.height === result.data.height &&
+          v.width === result.data[resolving ? 'width' : 'height'] &&
+          v.height === result.data[resolving ? 'height' : 'width'] &&
           v.pid === result.data.pid
           v.pid === result.data.pid
         );
         );
       });
       });
       window.currentPhoneSize = data || {
       window.currentPhoneSize = data || {
-        width: result.data.width,
-        height: result.data.height,
+        width: result.data[resolving ? 'width' : 'height'],
+        height: result.data[resolving ? 'height' : 'width'],
         pid: result.data.pid,
         pid: result.data.pid,
       };
       };
       return;
       return;
@@ -272,14 +275,14 @@ var draw_graph = function (graphType, obj) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },
@@ -309,14 +312,14 @@ var draw_graph = function (graphType, obj) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },
@@ -352,14 +355,14 @@ var draw_graph = function (graphType, obj) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },

+ 112 - 73
static/screenAndroid/WXtrialInterface.html

@@ -59,6 +59,34 @@
       </div>
       </div>
       {{~}}
       {{~}}
     </template>
     </template>
+    <template id="template-shear">
+      {{? it.length}}
+      <div class="title">
+        剪贴板
+        <div class="btn-clear">清空</div>
+      </div>
+      <div class="slide-wrapper-content">
+        {{~ it :item:index }}
+        <div class="slide-wrapper">
+          <div class="slide-scroll animate-slide-start">
+            <div
+              class="slide-content"
+              data-content="{{= encodeHtml(item.content)}}"
+            >
+              <div>{{= encodeHtml(item.content)}}</div>
+            </div>
+            <div class="slide-content-button" data-id="{{= item.id}}">
+              <button>删除</button>
+            </div>
+          </div>
+        </div>
+        {{~}}
+      </div>
+      {{??}}
+      <img class="empty" src="img/jianqieban_pic@2x.png" alt="" />
+      <div class="empty-txt">剪贴板为空</div>
+      {{?}}
+    </template>
     <div class="container" id="player">
     <div class="container" id="player">
       <div class="muted" id="btnMuted">
       <div class="muted" id="btnMuted">
         <div class="control-right-img" data-id="1">
         <div class="control-right-img" data-id="1">
@@ -764,16 +792,16 @@
               //横屏处理
               //横屏处理
               resolving = 0;
               resolving = 0;
             }
             }
-            window.phoneSizeList = window.phoneSizeListBack.map(function (
-              item,
-            ) {
-              return resolving
-                ? item
-                : Object.assign({}, item, {
-                    width: item.height,
-                    height: item.width,
-                  });
-            });
+            // window.phoneSizeList = window.phoneSizeListBack.map(function (
+            //   item,
+            // ) {
+            //   return resolving
+            //     ? item
+            //     : Object.assign({}, item, {
+            //         width: item.height,
+            //         height: item.width,
+            //       });
+            // });
 
 
             // wsss.send(
             // wsss.send(
             //   JSON.stringify({
             //   JSON.stringify({
@@ -781,13 +809,13 @@
             //   }),
             //   }),
             // );
             // );
             // 横竖屏变更时获取分辨率要延迟,不然会获取到变更前的分辨率
             // 横竖屏变更时获取分辨率要延迟,不然会获取到变更前的分辨率
-            setTimeout(function () {
-              wsss.send(
-                JSON.stringify({
-                  type: 'getPhoneSize',
-                }),
-              );
-            }, 500);
+            // setTimeout(function () {
+            //   wsss.send(
+            //     JSON.stringify({
+            //       type: 'getPhoneSize',
+            //     }),
+            //   );
+            // }, 500);
           }
           }
           if (input[23] == 0x0b) {
           if (input[23] == 0x0b) {
             //多端登录处理, 数据从索引24开始取, input 是接收到的原始数据
             //多端登录处理, 数据从索引24开始取, input 是接收到的原始数据
@@ -830,6 +858,38 @@
       var cutList = [];
       var cutList = [];
       let timer,
       let timer,
         isFlag = true;
         isFlag = true;
+      const shearTemplate = doT.template(
+        $('#template-shear').html().replace(/&amp;/g, '&'),
+      );
+
+      function updateShearHtml(list) {
+        $('.box-shear-plate').html(shearTemplate(list));
+      }
+      // 对字符串进行html转义
+      function encodeHtml(content) {
+        return [
+          ['<', '&lt;'],
+          ['>', '&gt;'],
+          ['&', '&amp;'],
+          ['"', '&quot;'],
+        ].reduce(function (previousValue, currentValue) {
+          return previousValue.replace(
+            new RegExp(currentValue[0], 'g'),
+            currentValue[1],
+          );
+        }, content);
+      }
+
+      $('.box-shear-plate').on('click', '.slide-content', function (e) {
+        handleCopy(e.currentTarget.dataset.content);
+      });
+      $('.box-shear-plate').on('click', '.btn-clear', function (e) {
+        handleClear();
+      });
+      $('.box-shear-plate').on('click', '.slide-content-button', function (e) {
+        handleDelete(e.currentTarget.dataset.id);
+      });
+
       function showShearPlate() {
       function showShearPlate() {
         if (!isControl) {
         if (!isControl) {
           return;
           return;
@@ -872,36 +932,9 @@
               type: 'get',
               type: 'get',
               dataType: 'json',
               dataType: 'json',
               success: function (res) {
               success: function (res) {
-                if (res.status === 0) {
-                  if (res.data.length) {
-                    cutList = array_unique(res.data);
-                    var str =
-                      '<div class="title">剪贴板<div onclick="handleClear()" class="btn-clear">清空</div></div><div class="slide-wrapper-content">';
-                    cutList.forEach(function (item) {
-                      str +=
-                        "<div class='slide-wrapper'><div class='slide-scroll animate-slide-start'><div class='slide-content'><div onclick='handleCopy(\"" +
-                        item.content +
-                        '")\'>' +
-                        item.content +
-                        "</div></div><div class='slide-content-button'><button onclick='handleDelete(" +
-                        item.id +
-                        ")'>删除</button></div></div></div>";
-                    });
-                    str += '</div>';
-                    $('.box-shear-plate').append(str);
-                  } else {
-                    $('.box-shear-plate').append(
-                      '<img class="empty" src="img/jianqieban_pic@2x.png" alt="" /><div class="empty-txt">剪贴板为空</div>',
-                    );
-                  }
-                  $('.mask').show();
-                  initSlider();
-                } else {
-                  $('.box-shear-plate').append(
-                    '<img class="empty" src="img/jianqieban_pic@2x.png" alt="" /><div class="empty-txt">剪贴板为空</div>',
-                  );
-                  $('.mask').show();
-                }
+                updateShearHtml(res.status === 0 ? res.data : []);
+                $('.mask').show();
+                initSlider();
               },
               },
             });
             });
           });
           });
@@ -1422,6 +1455,19 @@
           getAD();
           getAD();
         });
         });
       }
       }
+      // 观看广告次数上报
+      function reportFrequency() {
+        $.ajax({
+          url: baseUrl + '/api/resoures/v1/trial/reportFrequency/' + userCardId,
+          headers: {
+            Authorization: token,
+          },
+          type: 'post',
+          contentType: 'application/json',
+          dataType: 'json',
+          success: function (res) {},
+        });
+      }
       //广告信息
       //广告信息
       // function adInit() {
       // function adInit() {
       //   sourceType = parameters['sourceType'];
       //   sourceType = parameters['sourceType'];
@@ -1522,19 +1568,6 @@
           success: function (res) {},
           success: function (res) {},
         });
         });
       }
       }
-      // 观看广告次数上报
-      function reportFrequency() {
-        $.ajax({
-          url: baseUrl + '/api/resoures/v1/trial/reportFrequency/' + userCardId,
-          headers: {
-            Authorization: token,
-          },
-          type: 'post',
-          contentType: 'application/json',
-          dataType: 'json',
-          success: function (res) {},
-        });
-      }
       //关闭广告
       //关闭广告
       $('.time-close-wrap')[0].addEventListener('click', () => {
       $('.time-close-wrap')[0].addEventListener('click', () => {
         if (videoTime == 0) {
         if (videoTime == 0) {
@@ -1658,6 +1691,11 @@
         const templatePhoneSizeItem = doT.template(
         const templatePhoneSizeItem = doT.template(
           $('#template-phone-size-item').html().replace(/&amp;/g, '&'),
           $('#template-phone-size-item').html().replace(/&amp;/g, '&'),
         );
         );
+        // console.log({
+        //   list: window.phoneSizeList,
+        //   active: window.activePhoneSize,
+        //   resolving,
+        // });
         const phoneSizeListItemsHtml = templatePhoneSizeItem({
         const phoneSizeListItemsHtml = templatePhoneSizeItem({
           list: window.phoneSizeList,
           list: window.phoneSizeList,
           active: window.activePhoneSize,
           active: window.activePhoneSize,
@@ -1681,11 +1719,12 @@
       window.phoneSizeList = [];
       window.phoneSizeList = [];
       // 当前生效的分辨率
       // 当前生效的分辨率
       window.currentPhoneSize = {
       window.currentPhoneSize = {
+        // id: 1,
         width: 720,
         width: 720,
         height: 1280,
         height: 1280,
       };
       };
       // 选中的分辨率
       // 选中的分辨率
-      window.activePhoneSize = window.currentPhoneSize;
+      // window.activePhoneSize = window.currentPhoneSize;
 
 
       function getPhoneSizeList() {
       function getPhoneSizeList() {
         return $.ajax({
         return $.ajax({
@@ -1704,8 +1743,8 @@
             return {
             return {
               id: v.id,
               id: v.id,
               dpi: v.dpi,
               dpi: v.dpi,
-              width: v.width || v.abscissa,
-              height: v.height || v.ordinate || v.high,
+              width: v.width,
+              height: v.high,
             };
             };
           });
           });
         });
         });
@@ -1713,16 +1752,18 @@
 
 
       getPhoneSizeList().then(function (phoneSizeList) {
       getPhoneSizeList().then(function (phoneSizeList) {
         window.phoneSizeList = phoneSizeList;
         window.phoneSizeList = phoneSizeList;
-        window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
+        // window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
         const currentPhoneSize = window.phoneSizeList.find(function (v) {
         const currentPhoneSize = window.phoneSizeList.find(function (v) {
           return (
           return (
-            v.width === window.currentPhoneSize.width &&
-            v.height === window.currentPhoneSize.height &&
+            v.width ===
+              window.currentPhoneSize[resolving ? 'width' : 'height'] &&
+            v.height ===
+              window.currentPhoneSize[resolving ? 'height' : 'width'] &&
             v.dpi === window.currentPhoneSize.dpi
             v.dpi === window.currentPhoneSize.dpi
           );
           );
         });
         });
         window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
         window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
-        return updatePhoneSizeListHtml();
+        // return updatePhoneSizeListHtml();
       });
       });
 
 
       // const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
       // const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
@@ -1732,12 +1773,10 @@
       //   centeredSlides: true,
       //   centeredSlides: true,
       // });
       // });
       function setPhoneSize(config) {
       function setPhoneSize(config) {
-        config = resolving
-          ? config
-          : Object.assign({}, config, {
-              width: config.height,
-              height: config.width,
-            });
+        // config = Object.assign({}, config, {
+        //   width: config.width,
+        //   height: config.height,
+        // });
         // 修改云机分辨率
         // 修改云机分辨率
         wsss.send(
         wsss.send(
           JSON.stringify({
           JSON.stringify({

+ 11 - 11
static/screenIos/WXdraw.js

@@ -203,17 +203,17 @@ function doConnectDirectives() {
       return;
       return;
     }
     }
     if (result.type === 'getPhoneSize') {
     if (result.type === 'getPhoneSize') {
-      console.log(result);
+      // console.log(result);
       const data = window.phoneSizeList.find(function (v) {
       const data = window.phoneSizeList.find(function (v) {
         return (
         return (
-          v.width === result.data.width &&
-          v.height === result.data.height &&
+          v.width === result.data[resolving ? 'width' : 'height'] &&
+          v.height === result.data[resolving ? 'height' : 'width'] &&
           v.pid === result.data.pid
           v.pid === result.data.pid
         );
         );
       });
       });
       window.currentPhoneSize = data || {
       window.currentPhoneSize = data || {
-        width: result.data.width,
-        height: result.data.height,
+        width: result.data[resolving ? 'width' : 'height'],
+        height: result.data[resolving ? 'height' : 'width'],
         pid: result.data.pid,
         pid: result.data.pid,
       };
       };
       return;
       return;
@@ -292,14 +292,14 @@ var draw_graph = function (graphType) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },
@@ -329,14 +329,14 @@ var draw_graph = function (graphType) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },
@@ -419,14 +419,14 @@ var draw_graph = function (graphType) {
               return (
               return (
                 resolving
                 resolving
                   ? x * (window.currentPhoneSize.width / vowidth)
                   ? x * (window.currentPhoneSize.width / vowidth)
-                  : y * (window.currentPhoneSize.width / voheight)
+                  : y * (window.currentPhoneSize.height / voheight)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
             y: (function () {
             y: (function () {
               return (
               return (
                 resolving
                 resolving
                   ? y * (window.currentPhoneSize.height / voheight)
                   ? y * (window.currentPhoneSize.height / voheight)
-                  : (vowidth - x) * (window.currentPhoneSize.height / vowidth)
+                  : (vowidth - x) * (window.currentPhoneSize.width / vowidth)
               ).toFixed(2);
               ).toFixed(2);
             })(),
             })(),
           },
           },

+ 103 - 64
static/screenIos/WXtrialInterface.html

@@ -62,6 +62,34 @@
       </div>
       </div>
       {{~}}
       {{~}}
     </template>
     </template>
+    <template id="template-shear">
+      {{? it.length}}
+      <div class="title">
+        剪贴板
+        <div class="btn-clear">清空</div>
+      </div>
+      <div class="slide-wrapper-content">
+        {{~ it :item:index }}
+        <div class="slide-wrapper">
+          <div class="slide-scroll animate-slide-start">
+            <div
+              class="slide-content"
+              data-content="{{= encodeHtml(item.content)}}"
+            >
+              <div>{{= encodeHtml(item.content)}}</div>
+            </div>
+            <div class="slide-content-button" data-id="{{= item.id}}">
+              <button>删除</button>
+            </div>
+          </div>
+        </div>
+        {{~}}
+      </div>
+      {{??}}
+      <img class="empty" src="img/jianqieban_pic@2x.png" alt="" />
+      <div class="empty-txt">剪贴板为空</div>
+      {{?}}
+    </template>
     <div class="container" id="player">
     <div class="container" id="player">
       <div class="muted" id="btnMuted">
       <div class="muted" id="btnMuted">
         <div class="control-right-img" data-id="1">
         <div class="control-right-img" data-id="1">
@@ -551,6 +579,39 @@
       var cutList = [];
       var cutList = [];
       let timer,
       let timer,
         isFlag = true;
         isFlag = true;
+
+      const shearTemplate = doT.template(
+        $('#template-shear').html().replace(/&amp;/g, '&'),
+      );
+
+      function updateShearHtml(list) {
+        $('.box-shear-plate').html(shearTemplate(list));
+      }
+      // 对字符串进行html转义
+      function encodeHtml(content) {
+        return [
+          ['<', '&lt;'],
+          ['>', '&gt;'],
+          ['&', '&amp;'],
+          ['"', '&quot;'],
+        ].reduce(function (previousValue, currentValue) {
+          return previousValue.replace(
+            new RegExp(currentValue[0], 'g'),
+            currentValue[1],
+          );
+        }, content);
+      }
+
+      $('.box-shear-plate').on('click', '.slide-content', function (e) {
+        handleCopy(e.currentTarget.dataset.content);
+      });
+      $('.box-shear-plate').on('click', '.btn-clear', function (e) {
+        handleClear();
+      });
+      $('.box-shear-plate').on('click', '.slide-content-button', function (e) {
+        handleDelete(e.currentTarget.dataset.id);
+      });
+
       function showShearPlate() {
       function showShearPlate() {
         stopManyClick(function () {
         stopManyClick(function () {
           new Promise((resolve, reject) => {
           new Promise((resolve, reject) => {
@@ -590,36 +651,9 @@
               type: 'get',
               type: 'get',
               dataType: 'json',
               dataType: 'json',
               success: function (res) {
               success: function (res) {
-                if (res.status === 0) {
-                  if (res.data.length) {
-                    cutList = array_unique(res.data);
-                    var str =
-                      '<div class="title">剪贴板<div onclick="handleClear()" class="btn-clear">清空</div></div><div class="slide-wrapper-content">';
-                    cutList.forEach(function (item) {
-                      str +=
-                        "<div class='slide-wrapper'><div class='slide-scroll animate-slide-start'><div class='slide-content'><div onclick='handleCopy(\"" +
-                        item.content +
-                        '")\'>' +
-                        item.content +
-                        "</div></div><div class='slide-content-button'><button onclick='handleDelete(" +
-                        item.id +
-                        ")'>删除</button></div></div></div>";
-                    });
-                    str += '</div>';
-                    $('.box-shear-plate').append(str);
-                  } else {
-                    $('.box-shear-plate').append(
-                      '<img class="empty" src="img/jianqieban_pic@2x.png" alt="" /><div class="empty-txt">剪贴板为空</div>',
-                    );
-                  }
-                  $('.mask').show();
-                  initSlider();
-                } else {
-                  $('.box-shear-plate').append(
-                    '<img class="empty" src="img/jianqieban_pic@2x.png" alt="" /><div class="empty-txt">剪贴板为空</div>',
-                  );
-                  $('.mask').show();
-                }
+                updateShearHtml(res.status === 0 ? res.data : []);
+                $('.mask').show();
+                initSlider();
               },
               },
             });
             });
           });
           });
@@ -1082,16 +1116,16 @@
                 resolving = 0;
                 resolving = 0;
                 // $('#playCanvas').removeClass('vertical').addClass('horizontal');
                 // $('#playCanvas').removeClass('vertical').addClass('horizontal');
               }
               }
-              window.phoneSizeList = window.phoneSizeListBack.map(function (
-                item,
-              ) {
-                return resolving
-                  ? item
-                  : Object.assign({}, item, {
-                      width: item.height,
-                      height: item.width,
-                    });
-              });
+              // window.phoneSizeList = window.phoneSizeListBack.map(function (
+              //   item,
+              // ) {
+              //   return resolving
+              //     ? item
+              //     : Object.assign({}, item, {
+              //         width: item.height,
+              //         height: item.width,
+              //       });
+              // });
 
 
               // wsss.send(
               // wsss.send(
               //   JSON.stringify({
               //   JSON.stringify({
@@ -1099,13 +1133,13 @@
               //   }),
               //   }),
               // );
               // );
               // 横竖屏变更时获取分辨率要延迟,不然会获取到变更前的分辨率
               // 横竖屏变更时获取分辨率要延迟,不然会获取到变更前的分辨率
-              setTimeout(function () {
-                wsss.send(
-                  JSON.stringify({
-                    type: 'getPhoneSize',
-                  }),
-                );
-              }, 500);
+              // setTimeout(function () {
+              //   wsss.send(
+              //     JSON.stringify({
+              //       type: 'getPhoneSize',
+              //     }),
+              //   );
+              // }, 1000);
             }
             }
             if (input[23] == 0x0b) {
             if (input[23] == 0x0b) {
               console.log('多端登陆');
               console.log('多端登陆');
@@ -1460,6 +1494,11 @@
         const templatePhoneSizeItem = doT.template(
         const templatePhoneSizeItem = doT.template(
           $('#template-phone-size-item').html().replace(/&amp;/g, '&'),
           $('#template-phone-size-item').html().replace(/&amp;/g, '&'),
         );
         );
+        // console.log({
+        //   list: window.phoneSizeList,
+        //   active: window.activePhoneSize,
+        //   resolving,
+        // });
         const phoneSizeListItemsHtml = templatePhoneSizeItem({
         const phoneSizeListItemsHtml = templatePhoneSizeItem({
           list: window.phoneSizeList,
           list: window.phoneSizeList,
           active: window.activePhoneSize,
           active: window.activePhoneSize,
@@ -1489,7 +1528,7 @@
         height: 1280,
         height: 1280,
       };
       };
       // 选中的分辨率
       // 选中的分辨率
-      window.activePhoneSize = window.currentPhoneSize;
+      // window.activePhoneSize = window.currentPhoneSize;
 
 
       function getPhoneSizeList() {
       function getPhoneSizeList() {
         return $.ajax({
         return $.ajax({
@@ -1508,8 +1547,8 @@
             return {
             return {
               id: v.id,
               id: v.id,
               dpi: v.dpi,
               dpi: v.dpi,
-              width: v.width || v.abscissa,
-              height: v.height || v.ordinate || v.high,
+              width: v.width,
+              height: v.high,
             };
             };
           });
           });
         });
         });
@@ -1517,16 +1556,18 @@
 
 
       getPhoneSizeList().then(function (phoneSizeList) {
       getPhoneSizeList().then(function (phoneSizeList) {
         window.phoneSizeList = phoneSizeList;
         window.phoneSizeList = phoneSizeList;
-        window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
+        // window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
         const currentPhoneSize = window.phoneSizeList.find(function (v) {
         const currentPhoneSize = window.phoneSizeList.find(function (v) {
           return (
           return (
-            v.width === window.currentPhoneSize.width &&
-            v.height === window.currentPhoneSize.height &&
+            v.width ===
+              window.currentPhoneSize[resolving ? 'width' : 'height'] &&
+            v.height ===
+              window.currentPhoneSize[resolving ? 'height' : 'width'] &&
             v.dpi === window.currentPhoneSize.dpi
             v.dpi === window.currentPhoneSize.dpi
           );
           );
         });
         });
         window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
         window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
-        return updatePhoneSizeListHtml();
+        // return updatePhoneSizeListHtml();
       });
       });
 
 
       // const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
       // const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
@@ -1536,12 +1577,10 @@
       //   centeredSlides: true,
       //   centeredSlides: true,
       // });
       // });
       function setPhoneSize(config) {
       function setPhoneSize(config) {
-        config = resolving
-          ? config
-          : Object.assign({}, config, {
-              width: config.height,
-              height: config.width,
-            });
+        // config = Object.assign({}, config, {
+        //   width: config.width,
+        //   height: config.height,
+        // });
         // 修改云机分辨率
         // 修改云机分辨率
         wsss.send(
         wsss.send(
           JSON.stringify({
           JSON.stringify({
@@ -1598,10 +1637,10 @@
       // });
       // });
       $('#phone-size-list').on('click', '.phone-size-item', function (e) {
       $('#phone-size-list').on('click', '.phone-size-item', function (e) {
         const data = $(e.currentTarget).data();
         const data = $(e.currentTarget).data();
-        console.log(
-          '🚀 ~ file: WXtrialInterface.html ~ line 1494 ~ data',
-          data,
-        );
+        // console.log(
+        //   '🚀 ~ file: WXtrialInterface.html ~ line 1494 ~ data',
+        //   data,
+        // );
         window.activePhoneSize = data;
         window.activePhoneSize = data;
         updatePhoneSizeListHtml();
         updatePhoneSizeListHtml();
         // setPhoneSize(data.width, data.height);
         // setPhoneSize(data.width, data.height);