replace javaValues with values

This commit is contained in:
王劲鹏 2020-01-19 11:15:06 +08:00 committed by osborn
parent a8ffd31c8a
commit 59eed39493
4 changed files with 40 additions and 40 deletions

View File

@ -139,7 +139,7 @@ public class RemoteJSExecutor {
.put("cmd", "invokeMethod")
.put("objectName", objectName)
.put("functionName", functionName)
.put("javaValues", jsonArray)
.put("values", jsonArray)
.put("hashKey", hashKey)
.toString());

View File

@ -3817,25 +3817,25 @@ debugServer.on('connection', function connection(ws) {
console.log(messageObject.objectName);
console.log(messageObject.functionName);
let args = [];
for (let i = 0; i < messageObject.javaValues.length; i++) {
let javaValue = messageObject.javaValues[i];
if (javaValue.type === 0) {
for (let i = 0; i < messageObject.values.length; i++) {
let value = messageObject.values[i];
if (value.type === 0) {
args.push(null);
}
else if (javaValue.type === 1) {
args.push(parseFloat(javaValue.value));
else if (value.type === 1) {
args.push(parseFloat(value.value));
}
else if (javaValue.type === 2) {
args.push((javaValue.value == 'true'));
else if (value.type === 2) {
args.push((value.value == 'true'));
}
else if (javaValue.type === 3) {
args.push(javaValue.value.toString());
else if (value.type === 3) {
args.push(value.value.toString());
}
else if (javaValue.type === 4) {
args.push(JSON.parse(javaValue.value));
else if (value.type === 4) {
args.push(JSON.parse(value.value));
}
else if (javaValue.type === 5) {
args.push(JSON.parse(javaValue.value));
else if (value.type === 5) {
args.push(JSON.parse(value.value));
}
}
console.log(args);

View File

@ -91,20 +91,20 @@ debugServer.on('connection', function connection(ws) {
console.log(messageObject.functionName)
let args = []
for (let i = 0; i < messageObject.javaValues.length; i++) {
let javaValue = messageObject.javaValues[i]
if (javaValue.type === 0) {
for (let i = 0; i < messageObject.values.length; i++) {
let value = messageObject.values[i]
if (value.type === 0) {
args.push(null)
} else if (javaValue.type === 1) {
args.push(parseFloat(javaValue.value))
} else if (javaValue.type === 2) {
args.push((javaValue.value == 'true'))
} else if (javaValue.type === 3) {
args.push(javaValue.value.toString())
} else if (javaValue.type === 4) {
args.push(JSON.parse(javaValue.value))
} else if (javaValue.type === 5) {
args.push(JSON.parse(javaValue.value))
} else if (value.type === 1) {
args.push(parseFloat(value.value))
} else if (value.type === 2) {
args.push((value.value == 'true'))
} else if (value.type === 3) {
args.push(value.value.toString())
} else if (value.type === 4) {
args.push(JSON.parse(value.value))
} else if (value.type === 5) {
args.push(JSON.parse(value.value))
}
}
console.log(args)

View File

@ -89,25 +89,25 @@ debugServer.on('connection', function connection(ws) {
console.log(messageObject.objectName);
console.log(messageObject.functionName);
let args = [];
for (let i = 0; i < messageObject.javaValues.length; i++) {
let javaValue = messageObject.javaValues[i];
if (javaValue.type === 0) {
for (let i = 0; i < messageObject.values.length; i++) {
let value = messageObject.values[i];
if (value.type === 0) {
args.push(null);
}
else if (javaValue.type === 1) {
args.push(parseFloat(javaValue.value));
else if (value.type === 1) {
args.push(parseFloat(value.value));
}
else if (javaValue.type === 2) {
args.push((javaValue.value == 'true'));
else if (value.type === 2) {
args.push((value.value == 'true'));
}
else if (javaValue.type === 3) {
args.push(javaValue.value.toString());
else if (value.type === 3) {
args.push(value.value.toString());
}
else if (javaValue.type === 4) {
args.push(JSON.parse(javaValue.value));
else if (value.type === 4) {
args.push(JSON.parse(value.value));
}
else if (javaValue.type === 5) {
args.push(JSON.parse(javaValue.value));
else if (value.type === 5) {
args.push(JSON.parse(value.value));
}
}
console.log(args);