wx.config ()和wx.wx.agentConfig()都已回傳 ok 說明注入權限應該是成功了,為什么wx.invoke('thirdPartyOpenPage“)似乎沒有執行,也沒有回傳錯誤,請教。還有wx.agentConfig雖然回傳 ok 但是在開發者工具總提示“TypeError: wx.agentConfig is not a function”
wx.ready(function(){
wx.agentConfig({
corpid: '<%= AppID %>',
agentid: '1000005',
timestamp: <%=timestamp%>,
nonceStr: '<%=noncestr%>',
signature: '<%=signature2%>',
jsApiList: [
'thirdPartyOpenPage',
'selectExternalContact'
],
success: function(res) {
alert("wx.agentconfig ok");
},
fail: function(res) {
alert("wx.agentconfig error:" + res.errMsg);
}
});
wx.invoke('thirdPartyOpenPage', {
"oaType": "10001",
"templateId": "04174d8c4076102ba1cd65c27d0ffc4d_2129213612",
"thirdNo": "A201902011001",
"extData": {
'fieldList': [{
'title': '采購型別',
'type': 'text',
'value': '市場活動',
},
{
'title': '訂單鏈接',
'type': 'link',
'value': 'https://work.weixin.qq.com',
}],
}
},
function(res) {
alert(JSON.stringify(res));
console.log(res);
});
});
uj5u.com熱心網友回復:
這個我也遇到了,說是因為agentConfig只能在企業微信中使用,所以用瀏覽器不能識別,不知道是不是這樣。uj5u.com熱心網友回復:
應該是跳用有個先后的順序關系,可以試試??wx.config({})
wx.ready(() => {
wx.checkJsApi({
jsApiList: [ 'agentConfig' ],
success: (res) => {
wx.agentConfig({})
}
})
})
uj5u.com熱心網友回復:
wx.config()驗證很快 ,wx.agentConfig()驗證很慢 wx.invoke('thirdPartyOpenPage' 還沒成功過uj5u.com熱心網友回復:
https://www.cnblogs.com/zhangsonglin/p/10436533.html轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/143079.html
標籤:微信開發
上一篇:cocos creator
