如何解决agentConfig is not a function报错问题?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:05 3151 0 全屏看文

AI助手支持GPT4.0

如何解决agentConfig is not a function报错问题?

问题描述:在手机打开企业微信,跳转h5页面,调用wx.agentConfig报错,Uncaught TypeError: c.agentConfig is not a function报错

首先引入import wx from 'weixin-jsapi'

然后调wx.config,然后在wx.ready调用wx.checkJsApi,之后再调用wx.agentConfig,就一直报错,但openUserProfile接口可以正常使用,正常跳转,就是console,会有报错,请问这是什么原因?

企业微信版本3.0.25

Problem Description: open enterprise wechat on mobile phone, jump to H5 page, call wx.agentConfig Error: c.agentconfig is not a function. First, import Wx from 'Weixin jsapi' Then tune up wx.config And then in the wx.ready call wx.checkJsApi , and then call wx.agentConfig However, the openuserprofile interface can be used normally. If it jumps normally, console will report an error. What is the reason for this? Enterprise wechat version 3.0.25

回答:

企业微信运营专员-千夜:

您好,需要通过script标签在线引入js1.2.0文件

万人非你:谢谢,已解决,在线引入可以,npm引入或者require引入都不行。

-EOF-

AI助手支持GPT4.0