那你肯定需要的是这段代码:换上公众号的appid和secret
const rp = require('request-promise')
exports.main = async (event, context) => {
options = {
uri: 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' + event.AppID + '&secret=' + event.AppSecret + '',
json: true
}
return await rp(options)
}