- 当前 Bug 的表现(可附上截图)
查询数据库的集合和云环境对不上
这是我用的环境 要查询的数据库


这是另外一个环境里的数据库名和查询结果,但是目前的环境中是没有w8kj 集合的,却查到了结果

- 预期表现
- 复现路径
- 提供一个最简复现 Demo
微信小程序开发问题解答
微信小程序开发者回答:
如果数据库在第二个环境 云函数 代码也要指定环境的
具体
https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-server-api/init.html
const cloud = require('wx-server-sdk')
cloud.init({ env: 'test-x1dzi'})
本文网址:http://www.91bianli.com/weixinxiaochengxu/545.html