|
@@ -234,7 +234,12 @@ class AlgorithmShopView(View):
|
|
|
try:
|
|
|
lang = request_dict.get('lang', 'en')
|
|
|
uid = request_dict.get('uid', None)
|
|
|
- algorithm_qs = DeviceAlgorithmExplain.objects.filter(lang=lang).order_by('algorithm_type__sort') \
|
|
|
+ version = request_dict.get('version', 'v1')
|
|
|
+ algorithm_qs = DeviceAlgorithmExplain.objects.filter(lang=lang)
|
|
|
+ types = [0, 1, 3, 4, 5]
|
|
|
+ if version == 'v1':
|
|
|
+ algorithm_qs = algorithm_qs.filter(algorithm_type__type__in=types)
|
|
|
+ algorithm_qs = algorithm_qs.order_by('algorithm_type__sort') \
|
|
|
.values('algorithm_type__id', 'algorithm_type__type',
|
|
|
'algorithm_type__icon_url',
|
|
|
'title', 'subtitle', 'algorithm_type__image_url',
|