uni-app配置schemes(可从别的app,或者h5打开应用)

schemes需要在源码视图中配置,需要注意的是 安卓和ios有区别

1.安卓

"android" : {
                "schemes" : [ "zidingyi" ], 
      }

2.ios

"ios" : {
                "urltypes" : [
                    {
                        "urlidentifier" : "xxx", //自定义一般为域名反着 com.baidu
                        "urlschemes" : [ "zidingyi" ]
                    }
                ],
      }

 

3.从h5打开指定的app

 window.location.href = 'xxxx://' + "?path=" +xxxx

 

posted @ 2023-02-23 09:59  我有头盔  阅读(1772)  评论(0编辑  收藏  举报