请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

在3-11这一节,云数据库中已经有从第三方服务器申请的数据了,但是无法使用云函数调用用数据?

VM942 WAService.js:2 Uncaught (in promise) thirdScriptError
errCode: -502005 database collection not exists | errMsg: [ResourceNotFound] Db or Table not exist. Please check your request, but if the problem cannot be solved, contact us.
Error: errCode: -502005 database collection not exists | errMsg: [ResourceNotFound] Db or Table not exist. Please check your request, but if the problem cannot be solved, contact us.
at new c (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:233813)
at Function.success (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:257166)
at Object.success (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:127910)
at g (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:557606)
at b (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:557844)
at http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:559398
at http://127.0.0.1:26613/appservice/dev/asdebug.js:10:42311
at T (http://127.0.0.1:26613/appservice/dev/asdebug.js:10:41961)
at http://127.0.0.1:26613/appservice/dev/asdebug.js:1:3645
at Set.forEach ()(env: Windows,mp,1.06.2301160; lib: 2.10.4)
errorReport @ VM942 WAService.js:2
thirdErrorReport @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
c @ VM942 WAService.js:2
i @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
value @ VM942 WAService.js:2
t @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
VM942 WAService.js:2 Uncaught (in promise) thirdScriptError
errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID b88e9f0b-112e-4605-8ec5-5ad317997ceb, cloud function service error code -501000, error message FunctionName parameter could not be found.; at cloud.callFunction api;
Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID b88e9f0b-112e-4605-8ec5-5ad317997ceb, cloud function service error code -501000, error message FunctionName parameter could not be found.; at cloud.callFunction api;
at new c (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:233813)
at l (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:234320)
at d (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:234411)
at Function.success (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:391951)
at http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:127910
at A (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:560349)
at i. (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:943613)
at i.emit (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:620360)
at Za (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:944474)
at http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:945717(env: Windows,mp,1.06.2301160; lib: 2.10.4)
errorReport @ VM942 WAService.js:2
thirdErrorReport @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
c @ VM942 WAService.js:2
i @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
value @ VM942 WAService.js:2
t @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
VM942 WAService.js:2 Uncaught (in promise) thirdScriptError
errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID ec1e71cf-680e-4fc5-a6e1-291d71160cff, cloud function service error code -501000, error message FunctionName parameter could not be found.; at cloud.callFunction api;
Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID ec1e71cf-680e-4fc5-a6e1-291d71160cff, cloud function service error code -501000, error message FunctionName parameter could not be found.; at cloud.callFunction api;
at new c (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:233813)
at l (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:234320)
at d (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:234411)
at Function.success (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:391951)
at http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:127910
at A (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:560349)
at i. (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:943613)
at i.emit (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:620360)
at Za (http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:944474)
at http://127.0.0.1:26613/appservice/dev/WAService.js?t=wechat&s=1683271137752&v=2.10.4:2:945717(env: Windows,mp,1.06.2301160; lib: 2.10.4)
errorReport @ VM942 WAService.js:2
thirdErrorReport @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
c @ VM942 WAService.js:2
i @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2
value @ VM942 WAService.js:2
t @ VM942 WAService.js:2
(anonymous) @ VM942 WAService.js:2

正在回答

2回答

在云函数中设置云环境id:

cloud.init({
  env: cloud.DYNAMIC_CURRENT_ENV})


0 回复 有任何疑惑可以回复我~
谢成 2023-05-06 13:38:13

https://img1.sycdn.imooc.com//szimg/6455e7c30915d6c517200602.jpg

错误信息的意思是集合不存在,需要手动在云数据库中创建集合,然后再使用。

0 回复 有任何疑惑可以回复我~
  • 提问者 teeo #1
    老师,已经有集合了,并且已经从api获取了数据并写进云数据库,云函数同样找不到,我看到网上有一个帖子是小程序是没有在云函数那里引入环境,不知道是不是这样
    回复 有任何疑惑可以回复我~ 2023-05-06 14:19:59
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信