问题模块 框架类型 问题类型 操作系统 工具版本
开发者工具 微信小程序 Bug 1.02.1808080
- 当前 Bug 的表现(可附上截图)
从服务器获取的数据是数组的时候,如果数组下标是从0开始时可以识别为数组,从非0开始则无法识别为数组。
数组中存在两条数据:
当删除第一条下标为0的数据,微信小程序获取到的数据时,可以使用data[1]这种数组的形式来获取数据,但是无法使用data.length来判断数组长度,示例如下图所示:


当删除第二条数据,也就是下标为1的数据,微信小程序获取到的数据可以正常使用


不知道为什么在第一种情况下传过来的数据没有被识别成数组