This error is reported regardless of whether the function is placed before or after onload. It was later discovered that it was useless.
solution:
var that=this;
if(options.from=="one"){
//说明是从购物车来的,只买一件
that.data.list.push(that.getProductInfo(options.id));
}