Эх сурвалжийг харах

优化查询云存套餐列表判断分辨率5+5

zhangdongming 1 жил өмнө
parent
commit
56ee1c6bac

+ 7 - 1
Controller/CloudStorage.py

@@ -195,7 +195,13 @@ class CloudStorageView(View):
         if not uid_set_qs.exists():
             return response.json(173)
         ucode = uid_set_qs[0]['ucode']
-        pixel_level = 1 if ucode and int(ucode[-5]) >= 8 else 0
+        dpi_flag = 0
+        if ucode:
+            if ucode[-5] == 'A':
+                dpi_flag = 10
+            else:
+                dpi_flag = int(ucode[-5])
+        pixel_level = 1 if ucode and dpi_flag >= 8 else 0
         store_qs = Store_Meal.objects.filter(Q(lang__lang=lang), Q(is_show=0), ~Q(pay_type='11'))  # 过滤激活码、隐藏套餐
         experience_context_qs = ExperienceContextModel.objects.filter(uid=uid, experience_type=0)