Explorar o código

update app hotlist fix data page

baichongyang %!s(int64=3) %!d(string=hai) anos
pai
achega
28702762c3
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app.py

+ 3 - 0
app.py

@@ -169,6 +169,9 @@ def app_video_hot_list():
             return json.dumps(result)
         datas = ast.literal_eval(datas)
         total_page = int(len(datas)/page_size)
+        if len(datas)%page_size > 0:
+            total_page += 1
+
         if page > total_page -1 :
             result = {'code': -1, 'message': 'page exceed max'}
             log_.info({'requestUri': '/app/video/hot_lis', 'result': result})