收藏
回答

企业微信调用 context 报错?

在企业微信的聊天工具栏中打开的

wecomJsSDK 是已经封装好且注册好的,但是调用的时候报错:

complete
"\"undefined is not an object (evaluating 't.WeixinJSBridge.invoke')\""


  wecomJsSDK.invoke('getContext', {
            success: (e) => {
                console.log('success\n', JSON.stringify(e, null, 2));
            },
            fail: (e) => {
                console.log(
                    'fail\n',
                    JSON.stringify(e.errCode, null, 2),
                    JSON.stringify(e.errMsg, null, 2)
                );
            },
            cancel: (e) => {
                console.log('cancel\n', JSON.stringify(e, null, 2));
            },
            complete: (e) => {
                console.log('complete\n', JSON.stringify(e.message, null, 2));
            }
        });
回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    03-05
    有用
登录 后发表内容