wx.openOfficialAccountProfile({
username: 'xxx', // 此处填写公众号的微信号
success: res => {
console.log('打开公众号成功');
},
fail: res => {
console.log('打开公众号失败' + JSON.stringify(res));
}
})
这里用的真机调试,但是报错,手机基础库版本3.7.12,主体什么的都没问题
打开公众号失败{"errno":100,"errMsg":"openOfficialAccountProfile:fail :not supported"}
1、检查公众号微信号是不是正确的(gh_)开头的
2、跳转的公众号需与小程序为同主体或关联主体