Ver código fonte

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

zengzhixiang 2 anos atrás
pai
commit
afde1bf591

+ 14 - 12
static/screenAndroid/WXdraw.js

@@ -22,11 +22,18 @@ url = url.split('/');
 var parameters = GetRequest();
 var videoWidth, videoHeight;
 var isControl = true; // 是否是观看模式
+changIsControl(true);
 var isAuth = parameters['authPhone']; // 是否是获取的云手机
 
 var wsss,
   errorTime = 0;
 var first = true;
+function changIsControl(value) {
+  isControl = value;
+  // if(){}
+  $('#open-set-phone-size-dialog-btn').attr('hidden', !value);
+}
+
 function throttle(fn, delay) {
   var flag = true;
   errorTime += delay;
@@ -91,10 +98,10 @@ function doConnectDirectives() {
               '授权方已收回控制权,您进入观看屏幕模式',
               function () {
                 //点击确认后的回调函数
-                isControl = false;
+                changIsControl(false);
               },
               function () {
-                isControl = false;
+                changIsControl(false);
                 //点击取消后的回调函数
                 quit();
               },
@@ -113,11 +120,11 @@ function doConnectDirectives() {
                 },
               };
               wsss.send(JSON.stringify(ping));
-              isControl = true;
+              changIsControl(true);
             },
             function () {
               //点击取消后的回调函数
-              isControl = false;
+              changIsControl(false);
             },
           );
           return;
@@ -128,10 +135,11 @@ function doConnectDirectives() {
             '授权方已收回控制权,您进入观看屏幕模式',
             function () {
               //点击确认后的回调函数
-              isControl = false;
+              changIsControl(false);
             },
             function () {
-              isControl = false;
+              changIsControl(false);
+
               //点击取消后的回调函数
               quit();
             },
@@ -249,12 +257,6 @@ var draw_graph = function (graphType, obj) {
     if (!isControl) {
       return;
     }
-    $('.control-right-img').attr({
-      'data-id': '1',
-    });
-    $('.leftmains').css({
-      right: '-4rem',
-    });
     const action = 0;
     Array.from(e.originalEvent.changedTouches).forEach(function (item, index) {
       const x = item.clientX - item.target.getBoundingClientRect().x;

+ 10 - 0
static/screenAndroid/WXtrialInterface.html

@@ -1058,6 +1058,16 @@
           });
       }
 
+      $('#wine').on('click', function (e) {
+        console.log('🚀 ~ file: WXdraw.js ~ line 4 ~ e', e);
+        $('.control-right-img').attr({
+          'data-id': '1',
+        });
+        $('.leftmains').css({
+          right: '-4rem',
+        });
+      });
+
       var btnMuted = document.querySelector('#btnMuted');
       btnMuted &&
         (function () {

+ 15 - 14
static/screenIos/WXdraw.js

@@ -21,10 +21,16 @@ var parameters = GetRequest();
 
 var videoWidth, videoHeight;
 var isControl = true; // 是否是观看模式
+changIsControl(true);
 var isAuth = parameters['authPhone']; // 是否是获取的云手机
 var wsss;
 var errorTime = 0;
 var first = true;
+function changIsControl(value) {
+  isControl = value;
+  // if(){}
+  $('#open-set-phone-size-dialog-btn').attr('hidden', !value);
+}
 
 function throttle(fn, delay) {
   var flag = true;
@@ -104,10 +110,10 @@ function doConnectDirectives() {
               '授权方已收回控制权,您进入观看屏幕模式',
               function () {
                 //点击确认后的回调函数
-                isControl = false;
+                changIsControl(false);
               },
               function () {
-                isControl = false;
+                changIsControl(false);
                 //点击取消后的回调函数
                 quit();
               },
@@ -126,11 +132,11 @@ function doConnectDirectives() {
                 },
               };
               wsss.send(JSON.stringify(ping));
-              isControl = true;
+              changIsControl(true);
             },
             function () {
               //点击取消后的回调函数
-              isControl = false;
+              changIsControl(false);
             },
           );
           return;
@@ -141,10 +147,11 @@ function doConnectDirectives() {
             '授权方已收回控制权,您进入观看屏幕模式',
             function () {
               //点击确认后的回调函数
-              isControl = false;
+              changIsControl(false);
             },
             function () {
-              isControl = false;
+              changIsControl(false);
+
               //点击取消后的回调函数
               quit();
             },
@@ -265,17 +272,11 @@ var draw_graph = function (graphType) {
   //鼠标按下获取 开始xy开始画图
   // var ongoingTouches = [];
   var touchstart = function (e) {
-    console.log('🚀 ~ file: WXdraw.js ~ line 244 ~ touchstart ~ e', e);
+    // console.log('🚀 ~ file: WXdraw.js ~ line 244 ~ touchstart ~ e', e);
+
     if (!isControl) {
       return;
     }
-    $('.control-right-img').attr({
-      'data-id': '1',
-    });
-    $('.leftmains').css({
-      right: '-4rem',
-    });
-
     const action = 0;
     Array.from(e.originalEvent.changedTouches).forEach(function (item, index) {
       const x = item.clientX - item.target.getBoundingClientRect().x;

+ 12 - 2
static/screenIos/WXtrialInterface.html

@@ -79,8 +79,8 @@
           <div class="menu-btn PictureQuality avit" data-id="3">标清</div>
           <div class="menu-btn PictureQuality" data-id="2">极速</div>
         </div>
-        <div class="">
-          <div class="menu-btn" id="open-set-phone-size-dialog-btn">
+        <div class="open-set-phone-size-dialog-btn-wrap">
+          <div class="menu-btn" hidden id="open-set-phone-size-dialog-btn">
             <span>分辨率</span>
           </div>
         </div>
@@ -775,6 +775,16 @@
           });
       }
 
+      $('#wine').on('click', function (e) {
+        console.log('🚀 ~ file: WXdraw.js ~ line 4 ~ e', e);
+        $('.control-right-img').attr({
+          'data-id': '1',
+        });
+        $('.leftmains').css({
+          right: '-4rem',
+        });
+      });
+
       var btnMuted = document.querySelector('#btnMuted');
       btnMuted &&
         (function () {