Browse Source

Merge branch 'develop' of Software/android-cloud-H5 into master

guocanfeng 1 year ago
parent
commit
e25817218e
2 changed files with 127 additions and 127 deletions
  1. 1 1
      static/microserviceUserH5/vcloud/shortcut/webOnServer.html
  2. 126 126
      static/webRtcYJ/WXdraw.js

+ 1 - 1
static/microserviceUserH5/vcloud/shortcut/webOnServer.html

@@ -82,7 +82,7 @@
         var account = GET['account'];
         var phoneID = GET['phoneID'];
         var appID = GET['appID'];
-        var scheme = GET['scheme'] || 'shuangzixingiOSApp';
+        var scheme = GET['scheme'] || 'szxiOSApp';
         var icon = GET['icon'];
         var name = decodeURI(GET['name']);
         var authPhone = GET['authPhone'];

+ 126 - 126
static/webRtcYJ/WXdraw.js

@@ -67,16 +67,16 @@ function doConnectDirectives() {
       type: 'bitRate',
     };
     wsss.send(JSON.stringify(bitRate));
-    // 进入发起询问
-    var pings2 = {
-      type: 'forwardMsg',
-      data: {
-        code: '3000',
-        userName: username,
-        desc: '询问是否有在控制', // 可选
-      },
-    };
-    wsss.send(JSON.stringify(pings2));
+    // // 进入发起询问
+    // var pings2 = {
+    //   type: 'forwardMsg',
+    //   data: {
+    //     code: '3000',
+    //     userName: username,
+    //     desc: '询问是否有在控制', // 可选
+    //   },
+    // };
+    // wsss.send(JSON.stringify(pings2));
 
     wsss.send(
       JSON.stringify({
@@ -121,129 +121,129 @@ function doConnectDirectives() {
       }
       return;
     }
-    if (result.type === 'forwardMsgRep') {
-      // 当前云机无其他终端在线,获得控制权
-      changIsControl(true);
-    }
+    // if (result.type === 'forwardMsgRep') {
+    //   // 当前云机无其他终端在线,获得控制权
+    //   changIsControl(true);
+    // }
     if (result.type === 'downAdnInstallRep') {
       $.toast(result.data.msg, 'text', 4000);
     }
-    if (result.type === 'forwardMsg') {
-      /**
-       * @type {boolean} isControl 当前是否拥有控制权,初始化时为false
-       * @type {string} isAuth 当前云机类型 - huo: 获取的云机,none: 自己的云机
-       * @type {string} username 当前登录的双子星账号username
-       */
+    // if (result.type === 'forwardMsg') {
+    //   /**
+    //    * @type {boolean} isControl 当前是否拥有控制权,初始化时为false
+    //    * @type {string} isAuth 当前云机类型 - huo: 获取的云机,none: 自己的云机
+    //    * @type {string} username 当前登录的双子星账号username
+    //    */
 
-      if (result.data.userName !== username) {
-        switch (String(result.data.code)) {
-          case '3000': {
-            if (isControl) {
-              // 回复有控制
-              wsss.send(
-                JSON.stringify({
-                  type: 'forwardMsg',
-                  data: {
-                    code: '4000',
-                    userName: username,
-                    desc: '有控制', // 可选
-                  },
-                }),
-              );
-              return;
-            }
-            // 回复有观看
-            wsss.send(
-              JSON.stringify({
-                type: 'forwardMsg',
-                data: {
-                  code: '4100',
-                  userName: username,
-                  desc: '有观看', // 可选
-                },
-              }),
-            );
-            return;
-          }
-          case '4000': {
-            // console.log(
-            //   '🚀 ~ file: WXdraw.js ~ line 184 ~ doConnectDirectives ~ isAuth',
-            //   isAuth,
-            // );
-            // 当前是获取方
-            if (isAuth === 'huo' && isControl) {
-              $.confirm(
-                '授权方已收回控制权,您进入观看屏幕模式',
-                function () {
-                  //点击确认后的回调函数
-                  changIsControl(false);
-                },
-                function () {
-                  changIsControl(false);
-                  //点击取消后的回调函数
-                  quit();
-                },
-              );
-              return;
-            }
+    //   if (result.data.userName !== username) {
+    //     switch (String(result.data.code)) {
+    //       case '3000': {
+    //         if (isControl) {
+    //           // 回复有控制
+    //           wsss.send(
+    //             JSON.stringify({
+    //               type: 'forwardMsg',
+    //               data: {
+    //                 code: '4000',
+    //                 userName: username,
+    //                 desc: '有控制', // 可选
+    //               },
+    //             }),
+    //           );
+    //           return;
+    //         }
+    //         // 回复有观看
+    //         wsss.send(
+    //           JSON.stringify({
+    //             type: 'forwardMsg',
+    //             data: {
+    //               code: '4100',
+    //               userName: username,
+    //               desc: '有观看', // 可选
+    //             },
+    //           }),
+    //         );
+    //         return;
+    //       }
+    //       case '4000': {
+    //         // console.log(
+    //         //   '🚀 ~ file: WXdraw.js ~ line 184 ~ doConnectDirectives ~ isAuth',
+    //         //   isAuth,
+    //         // );
+    //         // 当前是获取方
+    //         if (isAuth === 'huo' && isControl) {
+    //           $.confirm(
+    //             '授权方已收回控制权,您进入观看屏幕模式',
+    //             function () {
+    //               //点击确认后的回调函数
+    //               changIsControl(false);
+    //             },
+    //             function () {
+    //               changIsControl(false);
+    //               //点击取消后的回调函数
+    //               quit();
+    //             },
+    //           );
+    //           return;
+    //         }
 
-            if (isAuth === 'shou') {
-              // 当前是授权方切没有控制权
-              $.confirm(
-                '当前云手机正在授控,是否请求获取云手机控制权?',
-                function () {
-                  //点击确认后的回调函数
-                  wsss.send(
-                    JSON.stringify({
-                      type: 'forwardMsg',
-                      data: {
-                        code: '5000',
-                        userName: username,
-                        desc: '控制权限收回', // 可选
-                      },
-                    }),
-                  );
-                  changIsControl(true);
-                },
-                function () {
-                  //点击取消后的回调函数
-                  changIsControl(false);
-                },
-              );
+    //         if (isAuth === 'shou') {
+    //           // 当前是授权方切没有控制权
+    //           $.confirm(
+    //             '当前云手机正在授控,是否请求获取云手机控制权?',
+    //             function () {
+    //               //点击确认后的回调函数
+    //               wsss.send(
+    //                 JSON.stringify({
+    //                   type: 'forwardMsg',
+    //                   data: {
+    //                     code: '5000',
+    //                     userName: username,
+    //                     desc: '控制权限收回', // 可选
+    //                   },
+    //                 }),
+    //               );
+    //               changIsControl(true);
+    //             },
+    //             function () {
+    //               //点击取消后的回调函数
+    //               changIsControl(false);
+    //             },
+    //           );
 
-              return;
-            }
-          }
-          case '5000': {
-            // if (result.data.username === username) {
-            //   changIsControl(true);
-            //   return;
-            // }
-            if (isAuth === 'huo' && isControl) {
-              $.confirm(
-                '授权方已收回控制权,您进入观看屏幕模式',
-                function () {
-                  //点击确认后的回调函数
-                  changIsControl(false);
-                },
-                function () {
-                  changIsControl(false);
-                  //点击取消后的回调函数
-                  quit();
-                },
-              );
-              return;
-            }
+    //           return;
+    //         }
+    //       }
+    //       case '5000': {
+    //         // if (result.data.username === username) {
+    //         //   changIsControl(true);
+    //         //   return;
+    //         // }
+    //         if (isAuth === 'huo' && isControl) {
+    //           $.confirm(
+    //             '授权方已收回控制权,您进入观看屏幕模式',
+    //             function () {
+    //               //点击确认后的回调函数
+    //               changIsControl(false);
+    //             },
+    //             function () {
+    //               changIsControl(false);
+    //               //点击取消后的回调函数
+    //               quit();
+    //             },
+    //           );
+    //           return;
+    //         }
 
-            return;
-          }
-          default: {
-            return;
-          }
-        }
-      }
-      return;
-    }
+    //         return;
+    //       }
+    //       default: {
+    //         return;
+    //       }
+    //     }
+    //   }
+    //   return;
+    // }
     if (result.type === 'payInitiateEvent') {
       // var url = window.location.href;
       // url = url.split('/');