var password = '12345678';
var data = "qaaz";
try {
var resStr = apt.execute('D:/appSoft/xinnet-crypto-1.0.0.jar', [password, data])
.then((response) => {
console.log("response: " + response);
});
} catch (e) {
console.error("xxxxx" + e.message);
}
如何获取返回值。
resStr 变量对象是空的,拿不到任何值;
console.log("response: " + response); 可以打印值,但异步的,我需要同步获取;在apt.execute前,加【await】报错不支持;
看下是不是获取路径不对
根据就不是路径的问题,我按照官方文档来写都获取不到,只能在.then方法中获取返回值