小程序跳转到另外一个小程序的设置

时间:2019-05-21 12:41:25   收藏:0   阅读:793

两个小程序关注一个公众号

wx.navigateToMiniProgram({
      appId: 'xxxxxxxxxxxxxxxxxx', // 要跳转的小程序的appid
      path: '', // 跳转的目标页面,不填,默认到小程序首页
      extarData: {
       
      },
      success(res) {
        // 打开成功  
      }
})
在app.json页面配置信息
"navigateToMiniProgramAppIdList": [
            "xxxxxxxxxxxxxxxxxx"  //要跳转的小程序的appid
],

如果用的uni-app框架则在manifest.json中源码视图里面设置

"mp-weixin": {
        /* 小程序特有相关 */
        "navigateToMiniProgramAppIdList": [
            "xxxxxxxxxxxxxxxxxx"  //要跳转的小程序的appid
        ],
        "usingComponents": true,
        "appid": "wx431bbfcb73b30b14",
        "setting": {
            "urlCheck": false,
            "postcss": true,
            "es6": true,
            "minified": true
        }
    }
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!