setTimeout出错的解决方法

计算器setTimeout(that.fun(), 3000),运行时显示出错。

setTimeout expects a function as first argument but got undefined.;at pages/limited-sale/limited-sale onReady function;at setTimeout callback function
TypeError: setTimeout expects a function as first argument but got undefined.

 

解决方法,改为:

setTimeout(that.fun, 3000)

你可能感兴趣的:(小程序)