Przeglądaj źródła

Merge branch 'feature/优化云机控制权' of Software/android-cloud-H5 into develop

zengzhixiang 2 lat temu
rodzic
commit
b39ca784ff
2 zmienionych plików z 10 dodań i 5 usunięć
  1. 4 2
      static/screenAndroid/WXdraw.js
  2. 6 3
      static/screenIos/WXdraw.js

+ 4 - 2
static/screenAndroid/WXdraw.js

@@ -64,6 +64,7 @@ function doConnectDirectives() {
       type: 'forwardMsg',
       data: {
         code: '3000',
+        username,
         desc: '询问是否有在控制', // 可选
       },
     };
@@ -155,7 +156,7 @@ function doConnectDirectives() {
           }
           case '4000': {
             // 当前是获取方
-            if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
+            if (isAuth === 'huo' && isControl) {
               $.confirm(
                 '授权方已收回控制权,您进入观看屏幕模式',
                 function () {
@@ -181,6 +182,7 @@ function doConnectDirectives() {
                       type: 'forwardMsg',
                       data: {
                         code: '5000',
+                        username,
                         desc: '控制权限收回', // 可选
                       },
                     }),
@@ -201,7 +203,7 @@ function doConnectDirectives() {
             //   changIsControl(true);
             //   return;
             // }
-            if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
+            if (isAuth === 'huo' && isControl) {
               $.confirm(
                 '授权方已收回控制权,您进入观看屏幕模式',
                 function () {

+ 6 - 3
static/screenIos/WXdraw.js

@@ -72,6 +72,7 @@ function doConnectDirectives() {
       type: 'forwardMsg',
       data: {
         code: '3000',
+        username,
         desc: '询问是否有在控制', // 可选
       },
     };
@@ -162,7 +163,8 @@ function doConnectDirectives() {
             return;
           }
           case '4000': {
-            if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
+            // 当前是获取方
+            if (isAuth === 'huo' && isControl) {
               $.confirm(
                 '授权方已收回控制权,您进入观看屏幕模式',
                 function () {
@@ -188,6 +190,7 @@ function doConnectDirectives() {
                       type: 'forwardMsg',
                       data: {
                         code: '5000',
+                        username,
                         desc: '控制权限收回', // 可选
                       },
                     }),
@@ -199,7 +202,7 @@ function doConnectDirectives() {
                   changIsControl(false);
                 },
               );
-  
+
               return;
             }
           }
@@ -208,7 +211,7 @@ function doConnectDirectives() {
             //   changIsControl(true);
             //   return;
             // }
-            if (isAuth === 'huo') {
+            if (isAuth === 'huo' && isControl) {
               $.confirm(
                 '授权方已收回控制权,您进入观看屏幕模式',
                 function () {