JS输出为[object Object] 如何解决

[object Object] 直接转成json

二行js代码搞定

var str = Java.use('java.lang.String')
console.log('\nstr\n', str.$new(args1))

Des3Encrypt.sign.overload('[B','java.lang.String').implementation = function (args1,args2) {
        console.log("Encrypt args1:",JSON.stringify(args1));
        var str = Java.use('java.lang.String')
        console.log('\nstr\n', str.$new(args1))
        // console.log("Encrypt args1:", args1);
        console.log("Encrypt args2:",args2);
        //console.log("Encrypt args3:",args3);
        //console.log("Encrypt args4:",args4);
        var result = this.sign(args1,args2);
        console.log("Des3Encrypt.encode result==:",result);
        return result;
    };

运行结果:
Encrypt args1: [123,34,112,104,111,110,101,34,58,34,49,51,57,49,56,50,51,56,51,57,54,34,44,34,112,97,115,115,119,111,114,100,34,58,34,119,114,117,117,102,100,115,115,115,115,34,44,34,116,105,109,101,115,116,97,109,112,34,58,49,54,49,55,55,48,56,53,54,50,51,49,53,44,34,97,112,112,78,97,109,101,34,58,34,-27,-80,-113,-26,-87,-103,-27,-128,-97,-26,-84,-66,-27,-120,-122,-26,-100,-97,34,125]

{"phone":"13888888888","password":"wruufdssss","timestamp":1617708562315,"appName":"小橙借款分期"}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值