소스 검색

更新数据

yf_yzl 3 년 전
부모
커밋
59d155f334
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      smartfarming/api/views/forecast/forecast_system.py

+ 2 - 2
smartfarming/api/views/forecast/forecast_system.py

@@ -224,12 +224,12 @@ def device_photo_list(request):
             pest_counts = sum([int(i.split(",")[1]) for i in indentify_result.split("#")]) if indentify_result else 0
 
         # TODO 展示图片暂时处理
-        if str(i.addr).startswith('/'):
+        if str(i.addr).startswith('http'):
             img_url = image_path + i.addr
         else:
             img_url = image_path + "/" + i.addr
 
-        if str(i.indentify_photo).startswith('/'):
+        if str(i.indentify_photo).startswith('http'):
             indentify_photo = image_path + i.indentify_photo
         else:
             indentify_photo = image_path + "/" + i.indentify_photo