exports.main = async (event, context) => {
const res = await uniCloud.httpProxyForEip.get(
'https://api.weixin.qq.com/cgi-bin/token', {
grant_type: 'client_credential',
appid: 'xxx',
secret: 'xxx'
}
)
return res;
};
- 发布:2024-02-12 16:41
- 更新:2024-02-19 11:14
- 阅读:299
产品分类: uniCloud/支付宝小程序云
示例代码:
操作步骤:
httpProxyForEip
httpProxyForEip
预期结果:
httpProxyForEip
httpProxyForEip
实际结果:
httpProxyForEip
httpProxyForEip
bug描述:
{"errDetail":"[env-00jxgdzz0jma][access_token][0a4b06fb17077272011526206221] User Function Code Logic Error, Please Check Function Code: 400: {\"code\":\"400\",\"message\":\"error: Cannot read properties of undefined (reading 'get'). stack: TypeError: Cannot read properties of undefined (reading 'get')\n at exports.main (/var/task/code/__index.js:3:45)\n at z (/var/task/code/index.js:2:24454)\n at ee (/var/task/code/index.js:2:25518)\n at de (/var/task/code/index.js:2:26441)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async FetchEventPearl2.handleRequest (/var/task/index.js:61451:17)\n at async Container.dispatch (/var/task/index.js:66942:17)\n at async /var/task/index.js:66647:30\n at async #dispatch (/var/task/index.js:66643:22)\n at async #dispatchRequest (/var/task/index.js:66636:22)\"}","errCode":"40000","errMsg":"用户函数代码语法或逻辑异常"}
蒙古野驴
哥!看下我的是啥问题好不,求求了
2024-04-13 19:55
DCloud_uniCloud_CRL
回复 蒙古野驴: 你用支付宝小程序云的话,直接发起请求就可以了。
2024-04-15 11:09