0
点赞
收藏
分享

微信扫一扫

uniapp微信小程序内部跳转其他微信小程序



uniapp微信小程序内部跳转其他微信小程序_uni-app


uniapp小程序内点击某个按钮跳转另外一个小程序连接,具体实现步骤如下:

<view class="home-Item" @click="goNativeindex">
      <image class="home-Item-img" src="../../static/images/icon1.png" mode=""></image>
      <view class="home-Item-name">开源字节</view>
</view>

按钮事件

goNativeindex(){
    uni.navigateToMiniProgram({
        appId:'',// 此为 开源字节 appid
        path:'/pages/index/index',// 此为开源字节首页路径
        envVersion:"release",
        success: res => {
             // 打开成功
             console.log("打开成功", res);
        },
        fail: err => {
             console.log(err);
        }
    })
}

需要记住的是,需要填写另外一个小程序的AppID哦!


举报

相关推荐

0 条评论