{
"jsFun": "test",
"jsContent": "function test(c1,c2,c3){\r\n\tvar ret = sum(c1,c2);\r\n\tvar ret = sum(ret,c3);\r\n\treturn ret;\r\n}\r\n\r\nfunction sum(num1,num2){\r\n\treturn Number(num1) + Number(num2);\r\n}",
"data": {
"c1": "1",
"c2": "4",
"c3": "5"
}
}
curl --location --request POST '/myauth/web/testJs' \
--header 'token: 123' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsFun": "test",
"jsContent": "function test(c1,c2,c3){\r\n\tvar ret = sum(c1,c2);\r\n\tvar ret = sum(ret,c3);\r\n\treturn ret;\r\n}\r\n\r\nfunction sum(num1,num2){\r\n\treturn Number(num1) + Number(num2);\r\n}",
"data": {
"c1": "1",
"c2": "4",
"c3": "5"
}
}'
{
"code": 200,
"success": true,
"msg": "执行结果",
"sign": "",
"result": {
"func": "test",
"ret": "10"
},
"timestamp": 1645680124771
}