Commit 888092c4 authored by lixiaofang's avatar lixiaofang

高亮

parent b79f2e6f
......@@ -203,16 +203,22 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
ret_list.extend(wordresemble_ret_list)
###高亮调整
query_ret_list.extend(wordresemble_ret_list)
high_query = None
for ret in query_ret_list:
query2 = ret["ori_name"]
for item in range(0, len(query)):
is_find = query2.find(query[item])
high_query = None
if is_find >= 0:
highlight_marks = u'<ems>%s</ems>' % query[item]
high_query = query2.replace(query[item], highlight_marks)
query2 = high_query
ret["highlight_name"] = high_query
if high_query == None:
ret["highlight_name"] = query2
else:
ret["highlight_name"] = high_query
###繁体字删掉,把搜索结果加到简体字上边
fanti_query = [{'痩脸针': "瘦脸针"}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment