我需要在企业微信你自建应用种 调用录音、拍照功能
wx.config({
debug: true,
appId: list.appId,
timestamp: list.timestamp,
nonceStr: list.noncestr,
signature: list.signature,
jsApiList: [
'startRecord',
'stopRecord',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'onVoicePlayEnd',
'translateVoice'
]
});
wx.agentConfig({
corpid: list.corpid,
agentid: list.agentid,
timestamp: list.timestamp,
nonceStr: list.noncestr,
signature: list.signature,
jsApiList: ['startRecord',
'stopRecord',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'onVoicePlayEnd',
'translateVoice'],
success: function(res) {
alert('注册agentConfig成功')
},
fail: function(res) {
if(res.errMsg.indexOf('function not exist') > -1){
alert('版本过低请升级')
}
}
});
我的问题:1是否需要两个Config都需要调用,还是只需调用wx.agentConfig 即可。
下面是报错信息
{"errCode":2,"err_Info":"invalid signature more info at https://open.work.weixin.qq.com/devtool/query?e=40093","errMsg":"config:fail"}
你好,仅有部分接口是需要在agentconfig中注入权限后调用,录音和拍照接口调用config接口后就可以了,不用再调用agentconfig,config打印签名问题,可以按照这个顺序排查下
现在 是 签名 一会成功 一会失败的 体验不好