main #54

Merged
charles merged 44 commits from main into prod 2025-12-24 11:35:12 +08:00
Showing only changes of commit 66c51f3343 - Show all commits

View File

@ -705,6 +705,18 @@ async def get_firstpage_product_tree(ns={}):
key=lambda x: (priority.get(x['thrTitle'], 4), result.index(x))
)
data['product_service'][0]['secMenu'][0]['thrMenu'] = sorted_data
# 使用jsonpath 查找data下所有value下name包含'用'的对象
if ns.get('keyword'):
jsonpath_result = jsonpath.jsonpath(data, '$..value')
data = []
jsonpath_result = jsonpath_result if jsonpath_result else []
for item in jsonpath_result:
for sub_item in item:
if ns['keyword'] in sub_item.get('name', ''):
data.append(sub_item)
return {
'status': True,
'msg': 'get product list success',