Browse Source

update app hotlist fix data page

baichongyang 3 years ago
parent
commit
28702762c3
1 changed files with 3 additions and 0 deletions
  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})