linhaohong 1 год назад
Родитель
Сommit
f5f8dcca58
1 измененных файлов с 10 добавлено и 12 удалено
  1. 10 12
      Controller/CloudStorage.py

+ 10 - 12
Controller/CloudStorage.py

@@ -236,6 +236,10 @@ class CloudStorageView(View):
 
 
                 if CONFIG_INFO != CONFIG_CN:  # 国内生产环境不筛选像素 加载所有上架套餐
                 if CONFIG_INFO != CONFIG_CN:  # 国内生产环境不筛选像素 加载所有上架套餐
                     store_qs = store_qs.filter(Q(pixel_level=pixel_level))
                     store_qs = store_qs.filter(Q(pixel_level=pixel_level))
+                if is_ios:
+                    store_qs = store_qs.filter(pay_type=5)
+                else:
+                    store_qs = store_qs.exclude(pay_type=5)
             else:
             else:
                 is_ai = uid_set_qs[0]['is_ai']
                 is_ai = uid_set_qs[0]['is_ai']
                 is_ai = 1 if is_ai != 2 and CONFIG_INFO != CONFIG_CN else 0  # 国内不支持AI服务
                 is_ai = 1 if is_ai != 2 and CONFIG_INFO != CONFIG_CN else 0  # 国内不支持AI服务
@@ -244,18 +248,12 @@ class CloudStorageView(View):
             store_qs = store_qs.annotate(title=F('lang__title'), content=F('lang__content'),
             store_qs = store_qs.annotate(title=F('lang__title'), content=F('lang__content'),
                                          new_title=F('lang__new_title'),
                                          new_title=F('lang__new_title'),
                                          discount_content=F('lang__discount_content'))
                                          discount_content=F('lang__discount_content'))
-            if is_ios:
-                store_qs = store_qs.order_by('sort').values(
-                    "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
-                    "bucket__bucket",
-                    "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
-                    "discount_price", "discount_content", "symbol", "cycle_config_id", "product_id")
-            else:
-                store_qs = store_qs.order_by('sort').values(
-                    "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
-                    "bucket__bucket",
-                    "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
-                    "discount_price", "discount_content", "symbol", "cycle_config_id")
+
+            store_qs = store_qs.order_by('sort').values(
+                "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
+                "bucket__bucket",
+                "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
+                "discount_price", "discount_content", "symbol", "cycle_config_id")
 
 
             if not store_qs.exists():
             if not store_qs.exists():
                 return response.json(0)
                 return response.json(0)