更新云数据库时报错 _ is not defined,是什么原因?

发布于 6 年前作者 gang0412161 次浏览最后编辑 6 年前来自 ask

db.collection('classes')

.where({

fid: parseInt(id) + 1

})

.update(

{

data: {

num: _.inc(1)

}

}

)

这段在云开发控制台里可以正常运行,在开者工具里就报错



2 回复
yan27
yan271 楼6 年前

数据能读出,更新不了是什么原因?

xpeng
xpeng2 楼5 年前

_ 你定义了?