ソースを参照

修改查询分类iOS和安卓

pzb 6 年 前
コミット
a1edadcc70
1 ファイル変更5 行追加1 行削除
  1. 5 1
      Controller/AppColophon.py

+ 5 - 1
Controller/AppColophon.py

@@ -87,9 +87,13 @@ class AppColView(View):
             page = request_dict.get('page', None)
             line = request_dict.get('line', None)
             app_type = request_dict.get('app_type', None)
+            if not app_type:
+                omqs = App_Colophon.objects.all().order_by('app_id').values_list(
+                    'app_id__appBundleId', flat=True).distinct()
+            else :
+                omqs = App_Colophon.objects.filter(app_id__app_type=app_type).order_by('app_id').values_list('app_id__appBundleId', flat=True).distinct()
             page = int(page)
             line = int(line)
-            omqs = App_Colophon.objects.filter(app_id__app_type=app_type).order_by('app_id').values_list('app_id__appBundleId', flat=True).distinct()
             if not omqs.exists():
                 return response.json(0, [])
             count = omqs.count()