function toweixin(){ if (!/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { if (/ baiduboxapp/i.test(navigator.userAgent)) { window.location.replace("bdbox://utils?action=sendIntent&minver=7.4¶ms=%7B%22intent%22%3A%22<?php echo $tick ?>%23Intent%3Bend%22%7D"); } else { <?php echo 'window.location.replace("'.$tick.'");'; ?> } } else { <?php echo 'window.location.replace("'.$tick.'");'; ?> } } toweixin();
自己拼一个连接测试一下,通过京东的连接跳转到百度:http://un.m.jd.com/cgi-bin/app/appjmp?to=p.imtt.qq.com%2Fh%3Fd%3D7%26b%3Dtrade%26type%3Dsite%26id%3D4061%26u%3Dhttp%3A%2F%2Fwww.baidu.com
现在关键问题是京东开发平台生成 weixin://dl/business/?ticket= 连接的时候有个白名单机制,尝试了几种连接,都无法通过白名单验证。
找了一个京东云服务平台的咨询,得到的答复是唤起微信的接口,现在被人恶意调用,存在很大的安全风险,京东内部已经建立了白名单和黑名单的机制,打击恶意调用行为,不接受也不会透露白名单。