@@ -194,7 +194,11 @@ class RecentMonthPestCount(GenericAPIView):
else:
result[pest] = int(num)
imgs.append(addr if addr.startswith("http") else "https://bigdata-image.oss-cn-hangzhou.aliyuncs.com/Basics/cbd/" + addr)
- return Response({"data": result, "imgs": imgs})
+ data = {
+ "pest": result,
+ "imgs": imgs
+ }
+ return Response(data)
except Exception as e:
return Response({"data": [], "imgs": [], "msg": e.args})