Closed Here21 closed 7 years ago
TypeError: api.batchGetUser is not a function
exports.batchGetUsers = async function (openids) {
const { accessToken } = await this.ensureAccessToken();
var url = this.prefix + 'user/info/batchget?access_token=' + accessToken;
var data = {};
data.user_list = openids.map(function (openid) {
return {openid: openid, lang: 'zh_CN'};
});
return this.request(url, postJSON(data));
};
文档上写的是:
api.batchGetUser(['openid1', 'openid2'])
可以 closed了
文档已经更新。谢谢。