sweixin.launchMiniProgram({
id: 'gh_xxxx',
path: '/pages/index/index',
type:0
});
- 发布:2020-11-29 21:55
- 更新:2020-11-30 11:56
- 阅读:872
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: Alpha
HBuilderX版本号: 2.9.11
手机系统: iOS
手机系统版本号: IOS 14
手机厂商: 苹果
手机机型: iphone11
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
plus.share.getServices(function(res) {
var sweixin = null;
for (var i = 0; i < res.length; i++) {
var t = res[i];
if (t.id == 'weixin') {
sweixin = t;
}
}
console.log(sweixin);
if (sweixin && sweixin.id) {
sweixin.authorize(function(e) {
console.log(e);
sweixin.launchMiniProgram({
id: 'gh_xxxx,
path: '/pages/index/index',
type:0
});
}, function(e) {
})
} else {
}
}, function(res) {
console.log(res);
});
plus.share.getServices(function(res) {
var sweixin = null;
for (var i = 0; i < res.length; i++) {
var t = res[i];
if (t.id == 'weixin') {
sweixin = t;
}
}
console.log(sweixin);
if (sweixin && sweixin.id) {
sweixin.authorize(function(e) {
console.log(e);
sweixin.launchMiniProgram({
id: 'gh_xxxx,
path: '/pages/index/index',
type:0
});
}, function(e) {
})
} else {
}
}, function(res) {
console.log(res);
});
预期结果:
打开小程序
打开小程序
实际结果:
未打开
未打开
bug描述:
自定义基座下,微信分享、登录功能正常
但是IOS端打开小程序,会打开微信,连接中...,然后又自动返回到app中,无后续流程了;
也就是说永远不会打开小程序
配置正常无问题,Android端打开和返回APP无问题
1 个回复
DCloud_uniCloud_JSON
bug已确认,相关链接