请问小程序端调用云函数操作云数据库,如何上传形入_.exists(true)的condition?
发布于 4 年前 作者 xiulan82 8183 次浏览 来自 官方Issues
云函数端是这样写的
    if(event.type == "get"){
      return await targetDB.where(
        event.condition
      ).get()        
    };

小程序端调用云函数,传入condition

wx.cloud.callFunction({
      name'login',
      data:{
        action:'runDb',
        type:'get', 
        db: 'communist',           
        condition:{
          _id: _.exists(true)
        }},

结果报错:

MiniProgramError
_ is not defined
ReferenceError: _ is not defined
1 回复

ju v xi u f

回到顶部