|
@@ -10,6 +10,7 @@ import ssl
|
|
|
from decimal import Decimal
|
|
|
from itertools import groupby
|
|
|
from operator import itemgetter
|
|
|
+from packaging import version
|
|
|
from urllib.parse import quote, parse_qs, unquote
|
|
|
|
|
|
import boto3
|
|
@@ -192,12 +193,13 @@ class CloudStorageView(View):
|
|
|
lang = request_dict.get('lang', 'en')
|
|
|
is_ai = request_dict.get('is_ai', 0)
|
|
|
app_type = request_dict.get('app_type', None)
|
|
|
+ ios_version = request_dict.get('ios_version', "")
|
|
|
if not all([uid]):
|
|
|
return response.json(444)
|
|
|
- # 苹果内购,app_type:1
|
|
|
+ # 苹果内购,app_type:1 或 app_type:2
|
|
|
is_ios = False
|
|
|
if app_type is not None:
|
|
|
- if int(app_type) == 1:
|
|
|
+ if int(app_type) == 1 or int(app_type) == 2:
|
|
|
is_ios = True
|
|
|
is_ai = int(is_ai)
|
|
|
now_time = int(time.time())
|
|
@@ -237,8 +239,11 @@ class CloudStorageView(View):
|
|
|
|
|
|
if CONFIG_INFO != CONFIG_CN: # 国内生产环境不筛选像素 加载所有上架套餐
|
|
|
store_qs = store_qs.filter(Q(pixel_level=pixel_level))
|
|
|
- if is_ios:
|
|
|
- store_qs = store_qs.filter(pay_type=5)
|
|
|
+
|
|
|
+ if is_ios and version.parse(ios_version) >= version.parse("15.0"):
|
|
|
+ store_qs = store_qs.filter(pay_type=5, app_type=app_type)
|
|
|
+ elif is_ios and version.parse(ios_version) < version.parse("15.0"):
|
|
|
+ store_qs = store_qs.filter(pay_type=5, commodity_type=0, app_type=app_type)
|
|
|
else:
|
|
|
store_qs = store_qs.exclude(pay_type=5)
|
|
|
if uid not in ["VXJ267WU5NZ1S89H111A", "18SM4J9DYWB2AEG1111A",
|