个人案例
同问
云数据库中,neq操作符无法高效使用索引,用什么替代方案?文档中有个disable字段,这个字段可能是未定义的,也可能是true或false。我用 {disable: _.neq(true)}来筛选那些disable未定义或者为false的记录,提示“操作符无法高效使用索引,若数据量大不建议使用”。可以用什么方法替代neq操作符吗?如果我用{disable: _.eq(null).or(_.eq(false))},会效率更高吗?谢谢!
2024-01-14db.collection(xxx).where(this.query).update() 如果this.query={_id,_.in([1,2,3])}就会出错 简单的查询没有问题,比如this.query={_id:1}
.where 如何实现动态添加查询条件(筛选)?请问不想写这么多if else 怎么办? if (params.username == '' && params.company == '' && params.project == '' && params.bigclassname == '') { wx.cloud.database().collection("demoorder").where({ date: _.gte(new Date(params.startDate)).and(_.lte(new Date(params.endDate))) }) .skip(len) .limit(20) .get({ success(res) { }, fail(res) { } }) } else if (params.username != "" && params.company == "" && params.project == "" && params.bigclassname == "") { wx.cloud.database().collection("demoorder").where({ date: _.gte(new Date(params.startDate)).and(_.lte(new Date(params.endDate))) }) .skip(len) .limit(20) .get({ success(res) { }, fail(res) { } }) } else if (params.username == "" && params.company != "" && params.project == "" && params.bigclassname == "") { wx.cloud.database().collection("demoorder").where({ date: _.gte(new Date(params.startDate)).and(_.lte(new Date(params.endDate))) }) .skip(len) .limit(20) .get({ success(res) { }, fail(res) { } }) }else if{}等等
2023-10-21db.collection('txt_20230926') .doc('xxxxx') .update({ data: { 'member.$.rating':'0' } }) 发者工具高级操作,不支持$占位符吗?始终提示The positional operator did not find the match needed from the query将$改为数字下标,可以正常。问题出在哪儿?
升级开发者工具后,控制台,数据库,高级操作中原来的查询语句丢失了?升级开发者工具后,控制台,数据库,高级操作中原来的查询语句丢失了?请问如何找回来[图片]
2023-10-11[图片] 清除编译缓存.....可以暂时解决调试,,,,
Current Wechat version do not support async?Current Wechat version do not support asynchronous getSystemInfo. "wx.getSystemInfoAsync" will be finished by synchronous implementation. 工具版本最新,基础库:2.33.0 程序内未用getSystemInfo或getSystemInfoAsync getSystemInfoSync
2023-10-06赞同,强烈要求官方修改这个规则
小程序广告运营规范说不能设置“关闭广告”的逻辑,那么我这样做算是违规吗?规范中说不能设置关闭广告的逻辑,那么同一个页面,vip用户不拉取广告,普通用户拉取并展示广告(不支持关闭),vip用户的页面一开始就不展示广告,也就不会对广告主造成损失,对吗?这样算违规吗? ps:小程序广告组件本身有关闭的操作,这个可能和结算有关,那么能不能这样:允许开发者设置关闭按钮,但是关闭操作之后,本次广告展示不计入流量主结算;或者组件提供相关api进行操作。 感谢回复。谢谢。
2023-02-22使用了媒体查询,好像不行哟
tabBar的darkmode如何适配?小程序官方组件示例中的底部tabbar的darkmode是怎么适配的,就是下图中红框中的部分 [图片] 直接配置dark model为true,然后添加tabBar,显示的还是白色的
2023-02-09与这个有关系: [代码]tip[代码]: 需要注意的是,WXSS 中的媒体查询不受[代码]app.json[代码]中的[代码]darkmode[代码]开关配置影响,只要微信客户端(iOS 7.0.12、Android 7.0.13)支持 DarkMode,无论是否配置[代码]"darkmode": true[代码],在系统切换到 DarkMode 时,媒体查询都将生效。
小程序可以设置不随系统深色模式吗?小程序怎么停用深色模式吗?官方是否有这个功能支持,不是想要自定义,就是想要不管系统什么深色浅色,小程序里一直是浅色模式。
2023-02-09高!!但是有个问题,如果跨年的话,该怎么解决呀?
云开发Group如何按照不同时间戳分组进行Count统计?需求是将不同时间注册的用户按照createTime时间戳区分不同月份进行统计展示柱状图。 [图片] 想要的效果如下 list = [ { _id: "xxxxxx", month: 1, total: 231 }, { _id: "xxxxxx", month: 2, total: 231 }, { _id: "xxxxxx", month: 3, total: 231 } ]
2022-08-25在云函数端下载,可以使用node.js的request-promise(我这里是用来导出数据到excel表格中) 1、引入request-promise const rp = require('request-promise'); 2、从临时链拉取数据,我的数据datas是以字符串的形式传递的 const {datas}=event const temp = await rp(datas).then((res) => { //res为请求到的数据,为string类型 console.log('res', res) return res }) 3、把收到的数据转化为数组,写入excel表格 JSON.parse(temp)
wx.cloud.CDN用法?[图片]这是我得到的cdn地址,怎么请求下来?[图片]cloud.downloadFile吗?用这个报错fileID不对
2022-08-12在云函数端下载可以使用node.js的request-promise(导出数据到excel表格中) 1、引入request-promise const rp = require('request-promise'); 2、从临时链拉取数据,我的数据datas是以字符串的形式传递的 const {datas}=event const temp = await rp(datas).then((res) => { //res为请求到的数据,为string类型 console.log('res', res) return res }) 3、把收到的数据转化为数组,写入excel表格 JSON.parse(temp)
2022-08-12