微信开放社区
服务商入驻
文档
登录
切换主页

暂无个人介绍

关注私信

正在关注

0

关注者

0

获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
文章 回答 提问 收藏 关注问题
  • 报告关于数据库安全规则的bug

    { "read": "auth.openid == get(`database.openid2groupid.${doc.groupId}`).another_openid", "write": "doc._openid == auth.openid" } { "read": "get(`database.openid2groupid.${doc.groupId}`).another_openid == auth.openid", "write": "doc._openid == auth.openid" } 今天尝试了数据库安全规则,想设置权限,结果整了好久权限没给出来,机缘巧合发现,auth.openid所在的位置不同,居然影响条件表达式的结果,auth.openid在前面,他总是拒绝我,auth.openid才如期运行,哭了 代码是下面的,查询传入一个groupId,到数据库openid2groupid查记录,如果记录_id == groupId,查记录的another_openid里有没有和auth.openid相同的,有就授权 mergeCommonCriteria(criteria) { return { groupId: this.data.groupId, ...criteria, } }, async initRoom() { this.try(async () => { await this.initOpenID() const { envId, collection } = this.properties const db = this.db = wx.cloud.database({ env: envId, }) const _ = db.command const { data: initList } = await db.collection(collection).where(this.mergeCommonCriteria()).orderBy('sendTimeTS', 'desc').get()

    2019-12-12
关闭

选择需要上架的开放服务

  • 模板开发

    针对行业、场景的小程序代开发服务,帮助企业快速搭建小程序

    上架
  • 插件

    提供可被小程序直接使用、丰富小程序能力的功能模块

    上架
  • 小商店服务

    为小商店商家提供更多的能力,帮助商家经营好小商店

    上架
关闭

案例类型

  • 小程序
  • 插件
  • 关于腾讯
  • 运营规范
  • 文档中心
  • 辟谣中心
  • 客服中心
  • Copyright © 2012-2025 Tencent. All Rights Reserved.