B/S系统H5怎么嵌入到APP
1、首先做成HTML的内容,url格式如下:
<a href="[scheme]://[host]/[path]?[query]">点我</a>
1
说明:
schema: 判断启动的App
host: 标记
path: 标记,可无
query: 传值的(key,value)键值对,可无

2、例如:<a href="myapp://jp.app/openwith?name=zhangsan&age=26">启动应用程序</a>

3、本例中做如下超链接跳转:
<a href="finance://pay.com/mpos?orderId=1020160126"> Open APP </a>
1
其中:
schema —- finance 对应Android中 android:schema
host --- pay.com 对应android中 android:host

4、path --- mpos 对应android中 android:pathPrefix
query --- orderId=1020160102 为Html链接和APP相互传递的数据,可以在Uri中通过getQueryParameter 方法获取
全部Html源码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>mpos</title>

5、<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
<meta name="imagemode" content="force">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
</head>
<body>
<h1>H5打开APP</h1>
<a href="finance://pay.com/mpos?orderId=102016000"> Open APP </a>
</body>
</html>
