调用方式用URL,post请求,application/json 格式传参
传的参数如下:
{"dcloudAppid":"__UNI__8F0DF6E","platform":"weixin-mp","openId":"oTjjK6wdzP58-VWpUJwFMe_KhhSk","value":{"session_key":"MNwJ6KnjluhbDxkCDDIH6A=="},"expiresIn":-1}
返回错误信息
{"errDetail":"[env-00jxgnoxw809][uni-open-bridge][0a4b4bb717129866572822697221] User Function Code Logic Error, Please Check Function Code: 400: {\"code\":\"400\",\"message\":\"error: Cannot convert undefined or null to object. stack: TypeError: Cannot convert undefined or null to object\\n at Function.keys (\u003canonymous\u003e)\\n at OpenBridgeConfig.resolve (/var/task/code/config.js:101:27)\\n at new OpenBridgeConfig (/var/task/code/config.js:91:10)\\n at Object.\u003canonymous\u003e (/var/task/code/bridge.js:29:26)\\n at Module._compile (node:internal/modules/cjs/loader:1256:14)\\n at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)\\n at Module.load (node:internal/modules/cjs/loader:1119:32)\\n at Module._load (node:internal/modules/cjs/loader:960:12)\\n at Module.require (node:internal/modules/cjs/loader:1143:19)\\n at require (node:internal/modules/cjs/helpers:119:18)\"}","errCode":"40000","errMsg":"用户函数代码语法或逻辑异常"}
2 个回复
爱豆988 - 解释
为什么我的uniAD比流量主低
DCloud_uni-ad_HDX
检查配置文件是否正常 参考文档: https://doc.dcloud.net.cn/uniCloud/uni-open-bridge.html