这个问题解决没?
小程序云开发数据库怎么按照数组中对象的某个元素查询?[图片] 集合名:table,查询条件:buyTime='2020-04-29 14:15:05',上图中buyerInfo是一个数组,怎么根据buyTime查询出图中标红的这条数据?
2020-06-14最后问题咋解决了啊?我也遇到这个问题了
小程序在云函数中下载一个图片并上传到存储里报错云函数 getSaveImage: [代码]// 云函数入口文件[代码][代码]const[代码] [代码]cloud = require([代码][代码]'wx-server-sdk'[代码][代码])[代码][代码]const[代码] [代码]fs = require([代码][代码]'fs'[代码][代码])[代码][代码]const[代码] [代码]path = require([代码][代码]'path'[代码][代码])[代码][代码]const[代码] [代码]request = require([代码][代码]'request'[代码][代码]);[代码] [代码]cloud.init()[代码] [代码]// 云函数入口函数[代码][代码]exports.main = async (event, context) => {[代码][代码] [代码][代码] [代码][代码]request({[代码][代码] [代码][代码]host: [代码][代码]"img.php.cn"[代码][代码],[代码][代码] [代码][代码]path: [代码][代码]"/upload/avatar/000/001/506/5922afcbb3cf4752.jpg"[代码][代码] [代码][代码]},[代码][代码] [代码][代码](res) => {[代码][代码] [代码][代码]var[代码] [代码]stream = fs.createWriteStream([代码][代码]"demo.jpg"[代码][代码]);[代码][代码] [代码][代码]res.pipe(stream);[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]cloud.uploadFile({[代码][代码] [代码][代码]cloudPath: [代码][代码]'demo.jpg'[代码][代码],[代码][代码] [代码][代码]fileContent: res,[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]);[代码][代码]}[代码] 小程序端调用该云函数,开发工具报错: [代码]VM370:[代码][代码]1[代码] [代码]Error: errCode: -[代码][代码]404011[代码] [代码]cloud [代码][代码]function[代码] [代码]execution error | errMsg: cloud.callFunction:fail requestID 17818a24-269f-11e9-99f3-[代码][代码]525400770114[代码][代码], cloud [代码][代码]function[代码] [代码]service error code -[代码][代码]504002[代码][代码], error message res.pipe [代码][代码]is[代码] [代码]not a [代码][代码]function[代码][代码]; at cloud.callFunction api;[代码] 请问这是为什么?res.pipe is not a function
2019-11-26