1-以下是京东APP URL Scheme跳转的相关代码:
openApp.jdMobile://virtual?params={"category":"jump","des":"m","sourceValue":"babel-act","sourceType":"babel","url":"https://u.jd.com/zWUVdkF","M_sourceFrom":"h5auto","msf_type":"auto"}
2-替换其中的的URL地址。例如:
openApp.jdMobile://virtual?params={"category":"jump","des":"m","sourceValue":"babel-act","sourceType":"babel","url":"https://u.jd.com/3I1C9vl","M_sourceFrom":"h5auto","msf_type":"auto"}
3-使用 urldecode.org 对openApp.jdMobile://virtual?params=后的参数内容进行Encode处理。
即是从:
{"category":"jump","des":"m","sourceValue":"babel-act","sourceType":"babel","url":"https://u.jd.com/3I1C9vl","M_sourceFrom":"h5auto","msf_type":"auto"}
得到:
%7B%22category%22%3A%22jump%22%2C%22des%22%3A%22m%22%2C%22sourceValue%22%3A%22babel-act%22%2C%22sourceType%22%3A%22babel%22%2C%22url%22%3A%22https%3A%2F%2Fu.jd.com%2F3I1C9vl%22%2C%22M_sourceFrom%22%3A%22h5auto%22%2C%22msf_type%22%3A%22auto%22%7D
4-在Encode处理后的参数前面,加上京东APP的URL SCheme跳转头部【openApp.jdMobile://virtual?params=】,即可得到京东APP固定页面跳转的完整地址。如下:
openApp.jdMobile://virtual?params=%7B%22category%22%3A%22jump%22%2C%22des%22%3A%22m%22%2C%22sourceValue%22%3A%22babel-act%22%2C%22sourceType%22%3A%22babel%22%2C%22url%22%3A%22https%3A%2F%2Fu.jd.com%2F3I1C9vl%22%2C%22M_sourceFrom%22%3A%22h5auto%22%2C%22msf_type%22%3A%22auto%22%7D
5-可以复制到iPhone手机浏览器测试是否可用。没问题的话,将以上将完整的URL SCheme跳转地址,封装到快捷指令 / 网页 / APP实现一键跳转操作。
参考资料:URL Scheme 查询指南