Live2D

常见js报错

1Uncaught TypeError: Cannot read property 'length' of null 

Uncaught TypeError: Cannot read property 'length' of null

错误怎么处理?

1.可能是返回的datagrid数据格式有问题,比如{"total":0,"rows":null},改为{"total":0,"rows":"[]"}就可以了      //后台解决

if (capital != null && capital.length < 1) {}                                  //前端解决

posted @ 2019-03-27 17:47 楚景然 阅读(...) 评论(...) 编辑 收藏