lvxisha

小程序怎样跳转到另外一个小程序

具体实现步骤:

  

1. 首先 , 需要获取要跳转到小程序的appID, 在 app.json 中配置
    wx.navigateToMiniProgram实现跳转

    具体实现步骤:
    
     "navigateToMiniProgramAppIdList": [
            "目标小程序的appid",//比如 wxef01010xxxxx
      ],

2. 在需要跳转的页面js 中添加如下代码:

    wx.navigateToMiniProgram({
        appId: \'wxfe0e405895cafdf9\',
        path: \'\',//比如:\'pages/index/index\',或者不填写,不填的时候默认进入首页
        envVersion: \'release\',// 打开正式版,可以删除
        success(res) {
             // 打开成功
        },
        fail: function (err) {
          console.log(err);
        }
     })

 

分类:

技术点:

相关文章:

  • 2021-10-16
  • 2021-10-16
  • 2022-12-23
  • 2021-11-30
  • 2021-12-15
  • 2021-11-09
  • 2021-12-10
猜你喜欢
  • 2021-10-16
  • 2021-10-16
  • 2022-12-23
  • 2021-12-22
  • 2021-10-16
  • 2021-10-26
  • 2021-12-22
相关资源
相似解决方案