huangxiaojing %!s(int64=4) %!d(string=hai) anos
pai
achega
7cb409b7c2
Modificáronse 2 ficheiros con 9 adicións e 19 borrados
  1. 9 1
      screenAndroid/WXdraw.js
  2. 0 18
      screenIos/workerFakeDom.js

+ 9 - 1
screenAndroid/WXdraw.js

@@ -21,6 +21,7 @@ url = url.split('/');
 
 var parameters = GetRequest();
 var form = {};
+var roomList = ['test.androidscloud.com', 'vclusters.imwork.net:2221'];
 
 form.clientType = parameters["clientType"];
 form.cardIp = parameters["cardIp"];
@@ -29,8 +30,15 @@ form.sn = parameters["sn"];
 form.username = parameters["username"];
 form.userCardId = parameters["userCardId"];
 form.ip = parameters["ip"];
+var room = parameters["rm"];
+var wsUrl;
+if (room == "A1") {
+	wsUrl = roomList[0];
+} else {
+	wsUrl = roomList[1];
+}
+var cUrl = isWSS ? "wss" : "ws" + "://" + wsUrl + "/card?cardIp=" + form.ip;
 
-var cUrl = "ws://192.168.199.243/card?cardIp=" + form.ip;
 var wsss = new WebSocket(cUrl);
 wsss.binaryType = 'arraybuffer';
 

+ 0 - 18
screenIos/workerFakeDom.js

@@ -1,18 +0,0 @@
-var document = self.document = { parentNode: null, nodeType: 9, toString: function () { return "FakeDocument" } };
-var window = self.window = self;
-var fakeElement = Object.create(document);
-fakeElement.nodeType = 1;
-fakeElement.toString = function () { return "FakeElement" };
-fakeElement.parentNode = fakeElement.firstChild = fakeElement.lastChild = fakeElement;
-fakeElement.ownerDocument = document;
-
-document.head = document.body = fakeElement;
-document.ownerDocument = document.documentElement = document;
-document.getElementById = document.createElement = function () { return fakeElement; };
-document.createDocumentFragment = function () { return this; };
-document.getElementsByTagName = document.getElementsByClassName = function () { return [fakeElement]; };
-document.getAttribute = document.setAttribute = document.removeChild =
-  document.addEventListener = document.removeEventListener =
-  function () { return null; };
-document.cloneNode = document.appendChild = function () { return this; };
-document.appendChild = function (child) { return child; };