检测微信接口权限

检测微信接口权限

wx.config({
debug: true,
appId: appId,
timestamp: timestamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage'
]
})
wx.ready(function() {
    // 用户检查接口权限用
    wx.checkJsApi({
    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage'],
    success: function(res) {
    console.log('权限检测结果',res);
    }
    });
});