xxx.indexOf is not a function报错

192 阅读1分钟

报错: image.png

代码: image.png

后来发现healthStatus是数字,而indexOf查找用于字符串数组中的元素,所以会报错