怎么获取""0""里面的_ID值?

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

   this.setData({

        ca:res.data.0._id,

      })

res.data怎么写好,求协助

2 回复
guiying10
guiying101 楼5 年前
this.setData({
  ca: res.data[0]._id
})
tshen
tshen2 楼3 年前

this.setData({

        ca:res.data[0]._id,

      })