阅读 59

webview loadurl问题:

现象:

webView.loadUrl("javascript:" + callback + "('" + params + "')");

params值:

{"MSG":"交易成功","sgnNo":"","resultId":"00000000","sgnAcctId":"6217770011816505","rdrctUrl":"render.alipay.com/p/s/i/?sche…

js收到的值:

"{"MSG":"交易成功","sgnNo":"","resultId":"00000000","sgnAcctId":"6217776003246031","rdrctUrl":"render.alipay.com/p/s/i/?sche…"

定位原因:

webview的系统源码中loadUrl调用js或url时,会对里面参数encode部分,默认做一次decode处理

文章分类
Android
文章标签