微信小程序开发——云函数调用错误

云函数测试返回结果 res.result:

error: {errCode: -502005, errMsg: "[ResourceNotFound] Db or Table not exist. Please c…ut if the problem cannot be solved, contact us.; "}

cloudfunctions 右键 – 当前环境,发现有两个环境。

报错时用的是第二个环境,尝试在 cloud.init()时声明环境ID,但还是不行。

切换到第一个环境,把云函数重新传一遍,在第一个环境里再建一遍数据库,获取数据成功。

你可能感兴趣的:(微信小程序开发)