WeChat applet calls the custom function of the same page undefined

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));
    }

Guess you like

Origin blog.csdn.net/qq_41353397/article/details/111826398