- getStableAccessToken提示IP不在白名单,40164,什么原因?
getStableAccessToken提示IP不在白名单, 但是这个IP是在白名单的, getAccessToken这个接口能正常返回, 就getStableAccessToken不行
2023-11-29 - 云开发联表查询出现权限不足问题, 已经设置集合为所有人可读了, 为什么还是会报错?
报错信息 WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1 Error: errCode: -502003 database permission denied | errMsg: Permission denied at new b (<anonymous>:1:163765) at success (<anonymous>:1:174759) at Function.success (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at p (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at Object.success (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at a (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at Mu (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at Nu (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1) at WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1 at s (WAServiceMainContext.js?t=wechat&s=1696681160487&v=3.0.1:1)(env: Windows,mp,1.06.2307260; lib: 3.0.1) 联表查询语句如下 db.collection('Post').aggregate() .unwind("$comments") // 展开 comments 数组 .lookup({ from: "User", // 关联的集合名 localField: "_openid", // 本地字段 foreignField: "_openid", // 关联字段 as: "user_docs" // 存放联表查询结果的数组字段名 }) .addFields( { "user": { "name": { $arrayElemAt: [ "$user_docs.name", 0 ] }, "avatar": { $arrayElemAt: [ "$user_docs.avatar", 0 ] }, "gender": { $arrayElemAt: [ "$user_docs.gender", 0 ] }, "department": { $arrayElemAt: [ "$user_docs.department", 0 ] }, "grade": { $arrayElemAt: [ "$user_docs.grade", 0 ] }, } } ) .lookup({ from: "User", // 关联的集合名 localField: "comments.openid", // 本地字段 foreignField: "_openid", // 关联字段 as: "comment_user_docs" // 存放联表查询结果的数组字段名 }) .addFields({ "comments.user": { "name": { $arrayElemAt: [ "$comment_user_docs.name", 0 ] }, "avatar": { $arrayElemAt: [ "$comment_user_docs.avatar", 0 ] }, "gender": { $arrayElemAt: [ "$comment_user_docs.gender", 0 ] }, "department": { $arrayElemAt: [ "$comment_user_docs.department", 0 ] }, "grade": { $arrayElemAt: [ "$comment_user_docs.grade", 0 ] } } }) .project({ "user_docs": 0, "comment_user_docs":0 }) // 第四个阶段:重新组合 comments 为数组 .group({ _id: "$_id", _openid: { $first: "$_openid" }, text: { $first: "$text" }, timestamp: { $first: "$timestamp" }, date: { $first: "$date" }, imgs: { $first: "$imgs" }, user: { $first: "$user" }, comments: { $push: "$comments" } }) .sort({timestamp:-1}) .skip(0) .limit(2) .end() 单独查post就没问题 db.collection('Post').where({ _id: _.in(res.data[0][this.page]) }).get().then(res=>{ this.setData({ articles: res.data }) }) Post和User集合的权限设置都是下图这样 [图片]
2023-10-07 - 小程序用了云开发,没用到自己的服务器和域名,为什么提交资料审核还要提交ICP备案信息?
[图片] 没有服务器,没有域名,没有备案,怎样发布这个小程序
2021-04-21