Bläddra i källkod

调整授权条件判断

heyang 2 år sedan
förälder
incheckning
fde91d4f80
1 ändrade filer med 41 tillägg och 41 borttagningar
  1. 41 41
      static/screenAndroid/WXdraw.js

+ 41 - 41
static/screenAndroid/WXdraw.js

@@ -154,54 +154,54 @@ function doConnectDirectives() {
             return;
           }
           case '4000': {
-          // 当前是获取方
-          if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
-            $.confirm(
-              '授权方已收回控制权,您进入观看屏幕模式',
-              function () {
-                //点击确认后的回调函数
-                changIsControl(false);
-              },
-              function () {
-                changIsControl(false);
-                //点击取消后的回调函数
-                quit();
-              },
-            );
-            return;
-          }
-          if (!isControl && isAuth === 'shou') {
-            // 当前是授权方切没有控制权
-            $.confirm(
-              '当前云手机正在授控,是否请求获取云手机控制权?',
-              function () {
-                //点击确认后的回调函数
-                wsss.send(
-                  JSON.stringify({
-                    type: 'forwardMsg',
-                    data: {
-                      code: '5000',
-                      desc: '控制权限收回', // 可选
-                    },
-                  }),
-                );
-                changIsControl(true);
-              },
-              function () {
-                //点击取消后的回调函数
-                changIsControl(false);
-              },
-            );
+            // 当前是获取方
+            if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
+              $.confirm(
+                '授权方已收回控制权,您进入观看屏幕模式',
+                function () {
+                  //点击确认后的回调函数
+                  changIsControl(false);
+                },
+                function () {
+                  changIsControl(false);
+                  //点击取消后的回调函数
+                  quit();
+                },
+              );
+              return;
+            }
+            if (!isControl && isAuth === 'shou') {
+              // 当前是授权方切没有控制权
+              $.confirm(
+                '当前云手机正在授控,是否请求获取云手机控制权?',
+                function () {
+                  //点击确认后的回调函数
+                  wsss.send(
+                    JSON.stringify({
+                      type: 'forwardMsg',
+                      data: {
+                        code: '5000',
+                        desc: '控制权限收回', // 可选
+                      },
+                    }),
+                  );
+                  changIsControl(true);
+                },
+                function () {
+                  //点击取消后的回调函数
+                  changIsControl(false);
+                },
+              );
 
-            return;
+              return;
+            }
           }
-        }
           case '5000': {
             // if (result.data.username === username) {
             //   changIsControl(true);
             //   return;
             // }
-            if (isAuth === 'huo') {
+            if (isAuth === 'huo' && result.data.desc === "控制权限收回") {
               $.confirm(
                 '授权方已收回控制权,您进入观看屏幕模式',
                 function () {