wx.config({ debug: true , appId: 'xxxxxxxxx' , // 必填,公众号的唯一标识 timestamp: data.timestamp, // 必填,生成签名的时间戳 nonceStr: data.noncestr, // 必填,生成签名的随机串 signature: data.signature, // 必填,签名,见附录1 jsApiList: [ 'updateAppMessageShareData' , 'updateTimelineShareData' , 'onMenuShareTimeline' , 'onMenuShareAppMessage' , 'hideAllNonBaseMenuItem ', ],
wx.ready(() => { const shareData = { title: data.title || data.content, desc: data.content, link: location.href.split('#')[0], imgUrl: this.imagesExtand[0], } wx.updateAppMessageShareData(Object.assign(shareData, { success (e) { }, }))
|
该方法始终不能获取到分享接口的权限,并提示 {errMsg: "updateAppMessageShareData:fail, the permission value is offline verifying"}
前提条件
JS接口安全域名配置过
hideAllNonBaseMenuItem 接口可以正常使用
所以现在怀疑是公众号未认证导致的接口权限未获取到,大家又遇到过这种情况的吗?
这跟公众号认证没关系的,你还是多看看接口文档吧。