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

算法类型修改属性名称

zhangdongming 2 жил өмнө
parent
commit
997949e13e

+ 3 - 3
Controller/AlgorithmShop/AlgorithmShopController.py

@@ -114,7 +114,7 @@ class AlgorithmShopView(View):
                 'tag': algorithm_qs[0]['algorithm_type__tag'],
                 'status': algorithm_qs[0]['algorithm_type__status'],
                 'setting': setting,
-                'algorithmType': algorithm_qs[0]['algorithm_type__type']
+                'type': algorithm_qs[0]['algorithm_type__type']
             }
             return data
         except Exception as e:
@@ -131,13 +131,13 @@ class AlgorithmShopView(View):
         algorithm_qs = DeviceAlgorithmExplain.objects.filter(lang=lang).order_by('algorithm_type__sort') \
             .annotate(iconUrl=F('algorithm_type__icon_url'),
                       typeId=F('algorithm_type__id'),
-                      algorithmType=F('algorithm_type__type'),
+                      type=F('algorithm_type__type'),
                       imageUrl=F('algorithm_type__image_url'),
                       basicFunction=F('algorithm_type__basic_function'),
                       tag=F('algorithm_type__tag'), status=F('algorithm_type__status'),
                       setting=Value('', output_field=CharField())) \
             .values('iconUrl', 'imageUrl', 'title', 'subtitle', 'concerning', 'basicFunction', 'price', 'tag', 'status',
-                    'setting', 'typeId', 'algorithmType')
+                    'setting', 'typeId', 'type')
         if not algorithm_qs.exists():
             return []
         return list(algorithm_qs)