android webview 关于微信支付
Aln_ 2017-11-13 11:17:22 我用 webview 做app 刚开始一切都好 ,但当微信支付时,点击微信支付,调不起来微信,不知道原因,网上也看了很多 :如
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// TODO Auto-generated method stub
Log.d("@@@@@@@@@@","url ==" + url);
if (url.startsWith("weixin://wap/pay?")) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
return true;
} else {
Map<String, String> extraHeaders = new HashMap<String, String>();
extraHeaders.put("Referer", "http://wxpay.wxutil.com");
view.loadUrl(url, extraHeaders);
}
但依旧没吊起来 log 报:/chromium: [INFO:CONSOLE(12)] "Uncaught SyntaxError: Unexpected token ILLEGAL", source: http://huazhongdafuxing.com/mobile/weixinpay.php?out_trade_no=1126 (12)
各位帮忙看下 怎么回事 ?
急急急啊