plus.share.getServices(function(shareList){
console.log("微信支付2")
var shareWx = null;
for(var tempIndex = 0;tempIndex < shareList.length;tempIndex++){
if(shareList[tempIndex].id == 'weixin'){
shareWx = shareList[tempIndex];
}
}
if(shareWx){
console.log("微信支付3")
shareWx.launchMiniProgram({
id:'gh_0ddca31248d1',
path:"pages/my/my"
})
}else{
uni.showToast({icon: 'none', title: "未安装微信,无法打开对应小程序"})
}
}, function(e){
console.log("ERROR")
uni.showToast({icon: 'none', title: "获取分享服务列表失败:"+JSON.stringify(e)})
})
- 发布:2021-08-26 13:10
- 更新:2021-08-31 18:11
- 阅读:1176
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: W10
HBuilderX类型: 正式
HBuilderX版本号: 3.2.3
手机系统: iOS
手机系统版本号: IOS 14
手机厂商: 苹果
手机机型: 6SP
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
必现
必现
预期结果:
进入微信小程序
进入微信小程序
实际结果:
闪退
闪退
bug描述:
plus.share.getServices(function(shareList){
console.log("微信支付2")
var shareWx = null;
for(var tempIndex = 0;tempIndex < shareList.length;tempIndex++){
if(shareList[tempIndex].id == 'weixin'){
shareWx = shareList[tempIndex];
}
}
if(shareWx){
console.log("微信支付3")
shareWx.launchMiniProgram({
id:'gh_0ddca31248d1',
path:"pages/my/my"
})
}else{
uni.showToast({icon: 'none', title: "未安装微信,无法打开对应小程序"})
}
}, function(e){
console.log("ERROR")
uni.showToast({icon: 'none', title: "获取分享服务列表失败:"+JSON.stringify(e)})
})
uniapp 端 IOS自定义基座调用以上代码进入微信小程序直接闪退
云上汉正 (作者)
这个问题的主要原因是需要配置微信、QQ、微博的各个平台的通用链接后才能正常
2021-08-27 14:01