WeChat 错误点:
WAService.js:1 thirdScriptError
Cannot read property ‘id’ of undefined:
此时切记注意
let that = this 这句话
注意options前要带上 that
WeChat WAService.js:1 thirdScriptError Cannot read property ‘id‘ of undefined
这篇博客探讨了在WeChat中遇到的WAService.js错误,特别是'Cannot read property 'id' of undefined'的问题。作者强调了在JavaScript中保持对象引用的重要性,特别是在异步操作和函数作用域中使用'let that = this'来正确绑定上下文。文章还提醒开发者在调用方法前确保添加that,以避免类似错误的发生。
摘要由CSDN通过智能技术生成