plus.share.getServices(res => {
console.log(JSON.stringify(res));
let sweixin = res.find(i => i.id === 'weixin')
if (sweixin) {
// 分享跳转到微信小程序
sweixin.launchMiniProgram({
id: "gh_b8f19ec92c3b", // 关联微信小程序的原始ID("gh_"开头的字符串)
type: 2, // 微信小程序版本类型,可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。
path: '/pages/index/index'
}, res => {
console.log('成功唤起微信小程序');
}, err => {
console.log('失败');
})
} else {
// 没有获取到微信分享服务
}
}, err => {
// 获取分享服务列表失败
})
uniapp如何从app跳转到微信小程序
最新推荐文章于 2025-10-27 17:38:23 发布
1698

被折叠的 条评论
为什么被折叠?



