报啥错,学会提问
现在查看不了appSecret, 调用接口总是报错,我们怎么知道appSecret是否正确?现在小程序账号里查看不到 AppSecret, 我们在调用接口时总是报错,但又不具体告知是什么错,我们如何确定是否是appSecret 的问题。现在无法核对???
2022-03-16就是暂停服务,让别人不能用
暂停服务是干啥的?[图片]
2022-03-16[图片]
请问一下各位大佬,我在云函数中使用腾讯云的智能闲聊接口,云函数中报错,请问一下怎么办?api组件名称: tencentcloud-sdk-nodejs 中的 智能闲聊机器人 client.ChatBot(params) 问题: 此云函数在本地调试的时候可以正常运行,但是在云端测试的时候,结果会返回null 通过查看错误信息,我初步认为是premise异步调用的问题,即当数据传回来的时候,云函数的调用已经结束,于是我在前面加上了 await ,但是没有效果,请大家帮我看看,哪里出问题了,我折腾了快半天了,谢谢各位 // 云函数文件文件, const cloud = require('wx-server-sdk') const tencentcloud = require("tencentcloud-sdk-nodejs"); const NlpClient = tencentcloud.nlp.v20190408.Client; const clientConfig = { credential: { secretId: "", secretKey: "", }, region: "ap-guangzhou", profile: { httpProfile: { endpoint: "nlp.tencentcloudapi.com", }, }, }; cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const client = new NlpClient(clientConfig); //const client = new NlpClient(clientConfig); const params = { "Query": "你好" }; return await client.ChatBot(params) } 本地云函数运行时,可以获取 [图片] 当使用云函数在线调用的时候出现错误 返回结果 null 日志 START (node:133) UnhandledPromiseRejectionWarning: TypeError: cb is not a function at NlpClient.failRequest (/var/lang/node12/lib/node_modules/tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client.js:65:9) at /var/lang/node12/lib/node_modules/tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client.js:72:98 at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:133) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:133) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. REPORT RequestId:4d6d0c54-22df-49ee-85af-22cf14ddd92e Duration:67ms Memory:256MB MemUsage:86.802467MB END (node:133) UnhandledPromiseRejectionWarning: TypeError: cb is not a function at NlpClient.failRequest (/var/lang/node12/lib/node_modules/tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client.js:65:9) at /var/lang/node12/lib/node_modules/tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client.js:72:98 at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:133) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
2022-03-16文档地址发一下
求助大佬们,云函数调用腾讯云nlp的关键词提取接口,但是代码一直报错,该如何解决?一直报错:Cannot read property 'then' of undefined [图片]
2022-03-15[图片]
请问从后端获取复杂类型,怎么在js里赋值?后端类型如下: [图片] 在js种用wx.request拿到的是一个json格式 [图片] 只能整体赋值 [图片] [图片] 但是这样赋值之后,没法把groupScale里面的version storage数组拿出来 [图片] 求解如何解决,目前想到的是,这3个list用3次http请求去发。还是在data里定义的时候就定义好groupScale里面有3个list?
2022-03-15没毛病是都有,你取错值了吧
使用uniapp,调微信支付 支付失败?返回错误 requestPayment:fail parameter error: parameter.timeStamp should be String instead of Undefined;parameter.nonceStr should be String instead of Undefined;parameter.package should be String instead of Undefined;parameter.signType should be String instead of Undefined;parameter.paySign should be String instead of Undefined; 参数请求都是有的 报Undefined 是什么没有配置好吗 [图片]
2022-03-15调用接口 fetch xhr
webview如何调用服务端接口(例如收货地址)https://developers.weixin.qq.com/miniprogram/dev/api/
2022-03-15remove改成get 能查出四条?
调用云函数删除成功,却没有删掉数据是为什么?[图片] [图片] [图片] 原来4条数据,删除后重新获取还是4条数据
2022-03-15或查询 or
云数据库如何同时查询出某字段为null或该字段不存在的记录?[ { "_id" : 900, "name" : null }, { "_id" : 901 } ] 对于以上的数据,直接用 db.collection 的 where 条件,应该怎么写才能同时查询出以上2条数据? where条件是 {"name": null},仅能查出900数据,901数据必须用 _.exists(false) 来查,怎么才能查出这2条?
2022-03-15return await 把await去掉
怎么解决云函数对云数据库进行写操作时,必须将add和update方法放在入口函数的问题?求助求助!!为什么云函数实现注册和更新信息时,不能像获取数据库数据一样放在入口函数的外面,而是一定要放在入口函数中?下面图片只是显示注册和登录的对比,也就是写操作和读操作的对比。 [图片]
2022-03-15