微信云开发官网
const match7 = await db.collection('user') .where({ tag_fields: _.elemMatch({ tag_id: "486be3ad6854122903442f646fcc1e4e", config_id: "dd1eb2b4685418df034c3b4e0f05e728", value: _.in(['女']), }) }).limit(10) .get(); console.log(`match7: ${JSON.stringify(match7.data.length)}`) const match8 = await db.collection('user') .where({ tag_fields: _.all([_.elemMatch({ tag_id: "486be3ad6854122903442f646fcc1e4e", config_id: "dd1eb2b4685418df034c3b4e0f05e728", value: _.in(['女']), })]) }).limit(10) .get(); console.log(`match8: ${JSON.stringify(match8.data.length)}`) match7是能够正确筛选出结果的。但是match8不能。 按照https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloud/reference-sdk-api/database/command/Command.all.html的描述,在只有一个_.eleMatch子元素的时候,有_.all和没有_.all应该是等价的吧?为什么会出现不一致?而且这两段代码在云开发IDE数据库的查询里面其实是没有区别的。看起来代码环境和云开发IDE中的数据库查询也不一致?
https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloud/billing/price.html 云开发体验环境,根本就没有?为什么我免费开通就告诉我“当前无免费体验资格,请重新购买” ? 还是只是个噱头?
[图片]
[图片] 下载数据转换为excel,上传到云存储,10m以内可以,13M的时候发现 可以传上去,但是云函数报错没有返回值,云函数时间已经设置为600s足够了。 可是不知到啥原因了,困扰了好久
我目前在用微信小程序的云服务功能,我暂时想停一段时间,上边的资源包能够备份吗?
绑定商户号,无法进行授权,提示错误如图右侧提示,如何解决[图片]
https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloud/guide/staticstorage/jump-miniprogram.html
我这个账号什么时候授权给第三方了?在哪里取消查看的? [图片] [图片]
如题,云函数是否有 读写 Pages下文件权限。如无,有没有其他择中办法可以解决。大神们来回答下。三克油!!!
当前配额是免费的,之前免费得到一个月的环境让我删了。我在网页访问不到云存储中的文件。是必须要买配额吗 我发现导出小游戏后只能重新删除环境才能下载资源成功,不然总是报错。是怎么回事。
在开发过程中,需要不断创建云函数,想知道每个小程序每个环境最多能创建多少个云函数。
[图片] [图片] [图片] [图片]
监听器监听不到数据库的变化,看console中有以下信息: [worker] reportRealtimeAction:fail not support 看起来是环境不支持,但是我: const systemInfo = wx.getSystemInfoSync() const SDKVersion = systemInfo.SDKVersion console.log('=== 实时监听环境检查 ===') console.log('基础库版本:', SDKVersion) 打印出来的sdk版本是"基础库版本: 3.10.3", 所以应该不是环境sdk版本的问题,所以来咨询一下这个问题该如何解决?
返回提示解除成功 但是查询环境共享 没解除掉
云开发平台中,权限设置为所有用户可读,仅创建者及管理员可写,但在微信开发者工具的云开发控制台中,权限显示为仅创作者可读写,且修改权限出现此报错,权限变更错误, Error: OperationDenied.FreePackageDenied, 当前套餐无法执行此操作 (b75eb4fc-33bf-4821-8372-d963d8958e16),如何解决
[图片] //前端代码 sendTemplateMsg() { // 替换为实际参数: const params = { touser: 'ochWuvg4vb5bGkvaXxfUaOHtLBqc', // 公众号用户的 openid(需提前获取) templateId: 'VjMWY17E3ONXsOKk4y5pO226nG7DU5n3w2jRDCiY3Qg', // 公众号模板 ID data: { // 模板数据(与公众号模板字段一一对应) thing7: { value: '杨朝宇' }, thing5: { value: '你有新消息请及时查看' }, time3: { value: '2025-08-28 09:25:26' }, }, url: 'https://your-domain.com/detail' // 点击跳转链接(可选) } wx.cloud.callFunction({ name: 'sendTemplateMessage', // 云函数名 data: params, }).then(res => { if (res.result.code === 0) { wx.showToast({ title: '发送成功' }) } else { wx.showToast({ title: '发送失败', icon: 'none' }) console.error(res.result.err) } }).catch(err => { wx.showToast({ title: '调用失败', icon: 'none' }) console.error(err) }) }, //云函数 const cloud = require('wx-server-sdk'); exports.main = async (event, context) => { const { touser, templateId, data, url } = event; const wxContext = cloud.getWXContext(); // 参数校验 if (!touser || !templateId || !data) { return { code: 1, err: '参数缺失:touser、templateId、data为必填项' }; } try { // 初始化资源方(小程序)的云环境实例 const targetCloud = new cloud.Cloud({ resourceAppid: "wx923c5dfc65663940", resourceEnv: "cloud1-1g6kzn9v7f2e4279" // 共享的云环境ID }); await targetCloud.init(); // 调用发送模板消息接口,appid是公众号appid const result = await targetCloud.openapi({ appid: 'wxee9bdeae6d16b96a' }).officialAccount.messageTemplate.send({ touser, templateId, data, url: url || '' }); return { code: 0, success: true, result }; } catch (err) { console.error('调用失败:', err); return { code: 2, success: false, err: err.toString() }; } }; [图片]
微信小程序云开发where怎么用一个字段查询多个值?
当前小程序首页需要调用一个云函数拉数据,每次大概几百K,拉5次,页面这个云函数没法正常工作,大家知道是啥问题吗
纯新手,在小程序开发版测试的时候,图片加载在云数据库中,用模拟机页面都可以正常加载,但是别人的手机打开却无法正常显示图片,只有一些按钮可以显示,这是什么问题
使用云开发SDK短信验证登录的时候,报错提示captcha_required,现在获取到了captcha_token怎么传入getVerification这个发短信的方法中去? [图片]
小程序示例
小程序官方示例Demo,包含云开发示例。
小程序示例
扫码体验