解决了,详见https://developers.weixin.qq.com/community/develop/doc/000644fd4683f034285a601915a400?_at=1617199355842 [图片]
云开发数据库权限从“所有用户可读,仅创建者可见”改成自定义安全规则后无法写入了,大家知道啥原因吗?[图片] [图片] [图片]
2021-03-31可以用了,我没有设置数据库的权限为自定义安全规则。参考:https://developers.weixin.qq.com/community/develop/doc/00024e62b500800e348ae1a9357800?_at=1615517801762
QQ小程序如何调用微信小程序云开发数据库?QQ小程序的代码(备注:本人使用的是web sdk。云开发资源是在微信小程序开发工具里面开通的,但是腾讯云cloudbase里面可以进行查看和配置): 参考:https://docs.cloudbase.net/api-reference/webv2/adapter.html#di-2-bu-pei-zhi-an-quan-ying-yong-lai-yuan import cloudbase from "./utils/outer/cloudbase.full.1.4.1.js"; import adapter from './utils/outer/cloudbase-adapter-qq_mp.js'; App({ //已经参考https://docs.cloudbase.net/api-reference/webv2/adapter.html#di-2-bu-pei-zhi-an-quan-ying-yong-lai-yuan onLaunch: function () { cloudbase.useAdapters(adapter); cloudbase.init({ env: 'envid', appSign: 'appSign', appSecret: { appAccessKeyId: '1', appAccessKey: '666fd52' } }) const db = cloudbase.database(); db.collection("articles").where( {_id:"articleID"} ).get().then(res=>{ console.log(res) }); } }) 最后报错:{code: "DATABASE_PERMISSION_DENIED", message: "Permission denied", requestId: "13128a9ea14d1"}
2021-03-12