如何将插入的数据设置为number类型
发布于 5 年前 作者 tao63 12518 次浏览 来自 问答

在云开发控制台是可以设置字段类型的,想在插入数据的时候就设置为number类型

db.collection(‘atest’).add({

data: {

price: this.data.mount,     ------》想要插入这个price字段为number类型要怎么做?

type: t,

time: y + ‘-’ + m + ‘-’ + d,

note: this.data.noteInput,

sort:s

},

1 回复

parseInt(this.data.mount)

回到顶部