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"}