为什么明明数组有_id,后台输出的时候报错?
发布于 6 年前 作者 chaozhou 2116 次浏览 来自 官方Issues

难道不能

that.data.userData[0]._id 吗

他就报错了

Cannot read property ‘_id’ of undefined; [Component] Event Handler Error @ pages/login/login#bound bindGetUserInfo

TypeError: Cannot read property ‘_id’ of undefined

2 回复

碰到这种情况,当然是从下往上一级级log出来看:

that.data.userData[0]

that.data.userData

that.data

相关代码贴一下,login页面.

回到顶部