Explorar el Código

Merge branch 'uat-new' of http://192.168.32.253:3000/Software/android-cloud-H5 into uat-new

heyang hace 3 años
padre
commit
163ee0d5e3

+ 56 - 70
screenAndroid/WXdraw.js

@@ -32,8 +32,8 @@ form.ip = parameters["ip"];
 form.domainName = parameters["domainName"];
 var isWSS = true;
 var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
-var videoWidth = 720
-var videoHeight = 1280
+var videoWidth = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1080 : 720
+var videoHeight = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1920 : 1280
 
 var wsss, errorTime = 0;
 var first = true;
@@ -66,34 +66,20 @@ function doConnect() {
       "type": "bitRate"
     }
     wsss.send(JSON.stringify(bitRate));
-    // 获取实时截图
-    var screenPic = {
-      type: 'getScreenPic',
-      data: {
-        taskUid: '346789',
-        intervalTime: 0
-      }
-    }
-    wsss.send(JSON.stringify(screenPic));
-    // 获取分辨率
-    var phoneSize = {
-      "type": "getPhoneSize"
-    }
-    wsss.send(JSON.stringify(phoneSize));
   };
   wsss.onerror = function (evt) {
     wsss.close();
     throttle(doConnect, 100);
     if (errorTime > 1000) {
-		if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
-			tt.miniProgram.switchTab({
-				url: '/pages/home/home'
-			})
-		}else{
-			wx.miniProgram.switchTab({
-				url: '/pages/home/home'
-			})
-		}
+      if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
+        tt.miniProgram.switchTab({
+          url: '/pages/home/home'
+        })
+      } else {
+        wx.miniProgram.switchTab({
+          url: '/pages/home/home'
+        })
+      }
     }
   };
   wsss.onmessage = function (res) {
@@ -106,20 +92,6 @@ function doConnect() {
       }
       return
     }
-    if (result.type === 'getPhoneSize') {
-      if (result.data.status === 0) {
-        videoWidth = result.data.width
-        videoHeight = result.data.height
-      }
-      return
-    }
-    var unit8Arr = new Uint8Array(result);
-    if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
-      first = false;
-      unit8Arr = unit8Arr.slice(12, unit8Arr.length - 2);
-      var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
-      $(".loading_sceen_pic").attr('src', base64);
-    }
   }
 }
 
@@ -163,7 +135,6 @@ $(".PictureQuality").on("click", function () {
   }
   wsss.send(JSON.stringify(bitRate))
 })
-var ongoingTouches = [];
 //画图形
 var draw_graph = function (graphType, obj) {
   //把蒙版放于画板上面
@@ -171,6 +142,7 @@ var draw_graph = function (graphType, obj) {
   $("#dedit").css("z-index", 20);
   var canDraw = false;
   //鼠标按下获取 开始xy开始画图
+  var ongoingTouches = [];
   var touchstart = function (e) {
     $('.control-right-img').attr({
       "data-id": "2"
@@ -178,33 +150,46 @@ var draw_graph = function (graphType, obj) {
     $(".leftmains").css({
       "right": "-4rem"
     })
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    ongoingTouches.push(touchfor);
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var touchfor = e.originalEvent.changedTouches; //for 的手指数组
     //是否横屏
-    var ping = resolving == 0 ?
-      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var idx = ongoingTouches.findIndex(function (ele) {
+        return ele.identifier === touchfor[i].identifier
+      })
+      if (idx < 0) {
+        ongoingTouches.push(touchfor[i]);
+      }
+      var ping = resolving == 0 ?
+        { "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+    }
     canDraw = true;
   };
 
   //鼠标离开 把蒙版canvas的图片生成到canvas中
   var touchend = function (e) {
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var touchfor = e.originalEvent.changedTouches; //for 的手指数组
     //是否横屏
-    var ping = resolving == 0 ?
-      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
-    ongoingTouches.splice(touchfor.identifier, 1);
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var ping = resolving == 0 ?
+        { "data": { "action": 1, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 1, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+      ongoingTouches.forEach(function (item, index) {
+        if (item.identifier === touchfor[i].identifier) {
+          ongoingTouches.splice(index, 1)
+        }
+      })
+    }
     canDraw = false;
   };
 
@@ -215,16 +200,17 @@ var draw_graph = function (graphType, obj) {
 
   // 鼠标移动
   var touchmove = function (e) {
-    e = e || window.event;
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
-    var ping = resolving == 0 ?
-      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
+    var touchfor = e.originalEvent.targetTouches; //for 的手指数组
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var ping = resolving == 0 ?
+        { "data": { "action": 2, "count": touchfor.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 2, "count": touchfor.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+    }
   };
 
   //鼠标离开区域以外 除了涂鸦 都清空

+ 43 - 36
screenAndroid/WXtrialInterface.html

@@ -114,32 +114,42 @@
   <script type="text/javascript" src="WXdraw.js?v=110"></script>
   <script type="text/javascript" src="jmuxer.js"></script>
   <script>
+    var parameters = GetRequest();
+    if (parameters['mealType'] === 'VIP') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_VIP.png');
+    } else if (parameters['mealType'] === 'SVIP') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_SVIP.png');
+    } else if (parameters['mealType'] === 'STAR') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_STAR.png');
+    } else if (parameters['mealType'] === 'STARPRO') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_PRO.png');
+    }
     var isAudioPlay = false;
-		if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
-			var video = document.getElementById("playerVideo");
-			video.play();
-			setTimeout(() => { // 抖音环境需要设置延时,不然会有video默认图显示1
-				$.alert({
-					title: '提示',
-					text: '开始使用云手机',
-					onOK: function () {
-						setTimeout(() => {
-							isAudioPlay = true;
-						}, 1000);
-					}
-				});
-			}, 1000)
-		}else{
-			$.alert({
-				title: '提示',
-				text: '开始使用云手机',
-				onOK: function () {
-					var video = document.getElementById("playerVideo");
-					video.play();
-					isAudioPlay = true;
-				}
-			});
-		}
+    if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
+      var video = document.getElementById("playerVideo");
+      video.play();
+      setTimeout(() => { // 抖音环境需要设置延时,不然会有video默认图显示
+        $.alert({
+          title: '提示',
+          text: '开始使用云手机',
+          onOK: function () {
+            setTimeout(() => {
+              isAudioPlay = true;
+            }, 1000);
+          }
+        });
+      }, 1000)
+    } else {
+      $.alert({
+        title: '提示',
+        text: '开始使用云手机',
+        onOK: function () {
+          var video = document.getElementById("playerVideo");
+          video.play();
+          isAudioPlay = true;
+        }
+      });
+    }
     var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部  
     $('#wine').css({
       "width": window.screen.width,
@@ -169,14 +179,11 @@
     }
 
     var isWSS = true;
-    var parameters = GetRequest();
     var ip = parameters["ip"];
     var cardToken = parameters["cardToken"];
     cardToken = cardToken && cardToken.replace(/@/g, "=");
     var appletPushAddress = parameters["appletPushAddress"];
     var socketURL = isWSS ? "wss://" + appletPushAddress + "?cardIp=" + ip + "&token=" + cardToken : "ws://" + appletPushAddress + "?cardIp=" + ip + "&token=" + cardToken;
-    // var socketURL = "wss://192.168.31.198/businessChannel?cardIp=192.168.20.53&token=LDAz32tutqS9wQqi0WlmvJ68/Is83cX+kavJQij1IMRvewgZ1dLvviFZqd4b8gcaR1eLztR/ViRLyyAVvZO7GA==";
-    // var socketURL = "ws://192.168.20.53:9100";
 
     var jmuxer = new JMuxer({
       node: 'playerVideo',
@@ -221,11 +228,11 @@
         } else {
           clearInterval(intervaler);
           $.toast("画面异常,请重新进入", "text");
-          if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+          if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
             tt.miniProgram.switchTab({
               url: '/pages/home/home'
             })
-          }else{
+          } else {
             wx.miniProgram.switchTab({
               url: '/pages/home/home'
             })
@@ -247,11 +254,11 @@
         if (errorTime > 1000) {
           $.toast("画面异常,请重新进入", "text");
           wsss.close();
-          if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+          if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
             tt.miniProgram.switchTab({
               url: '/pages/home/home'
             })
-          }else{
+          } else {
             wx.miniProgram.switchTab({
               url: '/pages/home/home'
             })
@@ -376,11 +383,11 @@
             clearInterval(intervaler);
             ws.close();
             wsss.close();
-            if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+            if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
               tt.miniProgram.switchTab({
                 url: '/pages/home/home'
               })
-            }else{
+            } else {
               wx.miniProgram.switchTab({
                 url: '/pages/home/home'
               })
@@ -772,11 +779,11 @@
       clearInterval(intervaler);
       ws.close();
       wsss.close();
-      if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+      if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
         tt.miniProgram.switchTab({
           url: '/pages/home/home'
         })
-      }else{
+      } else {
         wx.miniProgram.switchTab({
           url: '/pages/home/home'
         })

BIN
screenAndroid/img/homebg.jpg


BIN
screenAndroid/img/homebg.png


+ 50 - 64
screenIos/WXdraw.js

@@ -31,8 +31,8 @@ form.ip = parameters['ip'];
 form.domainName = parameters["domainName"];
 var isWSS = true;
 var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
-var videoWidth = 720
-var videoHeight = 1280
+var videoWidth = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1080 : 720
+var videoHeight = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1920 : 1280
 var wsss;
 var errorTime = 0;
 var first = true;
@@ -65,31 +65,17 @@ function doConnect() {
       },
       "type": "bitRate"
     }
-    wsss.send(JSON.stringify(bitRate))
-    // 获取实时截图
-    var screenPic = {
-      type: 'getScreenPic',
-      data: {
-        taskUid: '346789',
-        intervalTime: 0
-      }
-    }
-    wsss.send(JSON.stringify(screenPic));
-    // 获取分辨率
-    var phoneSize = {
-      "type": "getPhoneSize"
-    }
-    wsss.send(JSON.stringify(phoneSize));
+    wsss.send(JSON.stringify(bitRate));
   };
   wsss.onerror = function () {
     wsss.close();
     throttle(doConnect, 100);
     if (errorTime > 1000) {
-      if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+      if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
         tt.miniProgram.switchTab({
           url: '/pages/home/home'
         })
-      }else{
+      } else {
         wx.miniProgram.switchTab({
           url: '/pages/home/home'
         })
@@ -106,20 +92,6 @@ function doConnect() {
       }
       return
     }
-    if (result.type === 'getPhoneSize') {
-      if (result.data.status === 0) {
-        videoWidth = result.data.width
-        videoHeight = result.data.height
-      }
-      return
-    }
-    var unit8Arr = new Uint8Array(result);
-    if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
-      first = false;
-      unit8Arr = unit8Arr.slice(12, unit8Arr.length - 2);
-      var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
-      $(".loading_sceen_pic").attr('src', base64)
-    }
   }
 }
 $('body').on("click", function () {
@@ -162,7 +134,6 @@ $(".PictureQuality").on("click", function () {
   wsss.send(JSON.stringify(bitRate))
 })
 var canDraw = false;
-var ongoingTouches = [];
 //画图形
 var draw_graph = function (graphType) {
   //把蒙版放于画板上面
@@ -170,6 +141,7 @@ var draw_graph = function (graphType) {
   $("#dedit").css("z-index", 20);
   // 先画在蒙版上 再复制到画布上
   //鼠标按下获取 开始xy开始画图
+  var ongoingTouches = [];
   var touchstart = function (e) {
     $('.control-right-img').attr({
       "data-id": "2"
@@ -177,33 +149,46 @@ var draw_graph = function (graphType) {
     $(".leftmains").css({
       "right": "-4rem"
     })
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    ongoingTouches.push(touchfor);
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var touchfor = e.originalEvent.changedTouches; //for 的手指数组
     //是否横屏
-    var ping = resolving == 0 ?
-      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var idx = ongoingTouches.findIndex(function (ele) {
+        return ele.identifier === touchfor[i].identifier
+      })
+      if (idx < 0) {
+        ongoingTouches.push(touchfor[i]);
+      }
+      var ping = resolving == 0 ?
+        { "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+    }
     canDraw = true;
   };
 
   //鼠标离开 把蒙版canvas的图片生成到canvas中
   var touchend = function (e) {
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var touchfor = e.originalEvent.changedTouches; //for 的手指数组
     //是否横屏
-    var ping = resolving == 0 ?
-      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
-    ongoingTouches.splice(touchfor.identifier, 1);
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var ping = resolving == 0 ?
+        { "data": { "action": 1, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 1, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+      ongoingTouches.forEach(function (item, index) {
+        if (item.identifier === touchfor[i].identifier) {
+          ongoingTouches.splice(index, 1)
+        }
+      })
+    }
     canDraw = false;
   };
 
@@ -214,16 +199,17 @@ var draw_graph = function (graphType) {
 
   // 鼠标移动
   var touchmove = function (e) {
-    e = e || window.event;
-    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
-    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
-    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
-    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
-    var ping = resolving == 0 ?
-      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
-      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
-    wsss.send(JSON.stringify(ping));
+    var touchfor = e.originalEvent.targetTouches; //for 的手指数组
+    for (var i = 0; i < touchfor.length; i++) {
+      var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
+      var acrossHeightY = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
+      var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
+      var ping = resolving == 0 ?
+        { "data": { "action": 2, "count": touchfor.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+        { "data": { "action": 2, "count": touchfor.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+      wsss.send(JSON.stringify(ping));
+    }
   };
 
   //鼠标离开区域以外 除了涂鸦 都清空

+ 20 - 13
screenIos/WXtrialInterface.html

@@ -189,7 +189,17 @@
   </script>
   <script>
     var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部
-    var renderCount = 0
+    var parameters = GetRequest();
+    var renderCount = 0;
+    if (parameters['mealType'] === 'VIP') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_VIP.png');
+    } else if (parameters['mealType'] === 'SVIP') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_SVIP.png');
+    } else if (parameters['mealType'] === 'STAR') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_STAR.png');
+    } else if (parameters['mealType'] === 'STARPRO') {
+      $(".loading_sceen_pic").attr('src', '../static/img/home_bg_PRO.png');
+    }
     $('#wine').css({
       "width": window.screen.width,
       "height": window.screen.height - topwinHeight - 20,
@@ -213,8 +223,7 @@
     url = url.split('/');
     var baseUrl = url[0] + '//' + url[2];
     var form = {};
-    var parameters = GetRequest();
-    form.userCardId = parameters['userCardId'];
+
     form.token = parameters['token'];
     var orientation = 0; //0 竖屏,1横屏
     function array_unique(arr) {
@@ -559,11 +568,11 @@
       decodeWoker.postMessage('close');
       decodeWoker.terminate();
       webSocketWorker.terminate();
-      if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+      if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
         tt.miniProgram.switchTab({
           url: '/pages/home/home'
         })
-      }else{
+      } else {
         wx.miniProgram.switchTab({
           url: '/pages/home/home'
         })
@@ -636,9 +645,7 @@
       Module._free(inputPtr);
       Module._free(retPtr);
     }
-    var vWidth = Number(parameters['width']) ? Number(parameters['width']) : videoWidth;
-    var vHeight = Number(parameters['height']) ? Number(parameters['height']) : videoHeight;
-    var decodeWoker = new Worker('decoder.js?width=' + vWidth + '&height=' + vHeight);
+    var decodeWoker = new Worker('decoder.js?width=' + videoWidth + '&height=' + videoHeight);
     var myVideo = document.getElementById("playCanvas");
     decodeWoker.onmessage = function (event) {
       var objData = event.data;
@@ -650,7 +657,7 @@
           if (renderCount++ < 4 || !isAudioPlay) {
             return
           }
-          webglPlayer.renderFrame(objData.data, vWidth, vHeight, vWidth * vHeight, (vWidth / 2) * (vHeight / 2));
+          webglPlayer.renderFrame(objData.data, videoWidth, videoHeight, videoWidth * videoHeight, (videoWidth / 2) * (videoHeight / 2));
           $('.weui-mask_transparent').hide()
           $('.weui-toast').hide()
           $('.loading').hide()
@@ -699,11 +706,11 @@
             decodeWoker.postMessage('close');
             decodeWoker.terminate();
             webSocketWorker.terminate();
-            if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+            if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
               tt.miniProgram.switchTab({
                 url: '/pages/home/home'
               })
-            }else{
+            } else {
               wx.miniProgram.switchTab({
                 url: '/pages/home/home'
               })
@@ -732,11 +739,11 @@
         decodeWoker.postMessage('close');
         decodeWoker.terminate();
         webSocketWorker.terminate();
-        if(navigator.userAgent.toLowerCase().includes('toutiaomicroapp')){
+        if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
           tt.miniProgram.switchTab({
             url: '/pages/home/home'
           })
-        }else{
+        } else {
           wx.miniProgram.switchTab({
             url: '/pages/home/home'
           })

BIN
screenIos/img/homebg.png


BIN
static/img/home_bg_PRO.png


BIN
static/img/home_bg_STAR.png


BIN
static/img/home_bg_SVIP.png


BIN
static/img/home_bg_VIP.png