https://developers.weixin.qq.com/s/4gakXqm87Af6
dataClassify: function () {
let that = this;
for (let index = 0; index < that.listData.length; index++) {
if (that.idNumber.find(that.listData[index].orderId) == null) {
that.idNumber.push(that.listData[index].orderId);
}
}
}
TypeError: Cannot read property 'length' of undefined
at ye.dataClassify (checkout.js? [sm]:89)
at checkout.js? [sm]:80
TypeError: Cannot read property 'length' of undefined
at ye.dataClassify (checkout.js? [sm]:89)
at checkout.js? [sm]:80
我试过改过,还是不行
dataClassify: function () {
let that = this;
for (let index = 0; index < that.data.listData.length; index++) {
if (that.data.idNumber.find(that.data.listData[index].orderId) == null) {
that.data.idNumber.push(that.data.listData[index].orderId);
}
}
}
我使用find直接就'find' of undefined,求解决方法