Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
search_tips
Commits
0440d296
Commit
0440d296
authored
Feb 13, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
6e5fce4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
views.py
associate/search/views.py
+1
-2
auto_tips.py
search/utils/auto_tips.py
+7
-5
No files found.
associate/search/views.py
View file @
0440d296
...
...
@@ -13,7 +13,6 @@ from django.shortcuts import render
from
search.utils.auto_tips
import
get_suggest_tips
def
auto_complete
(
request
):
try
:
"""auto complate words/tags/doctors etc.
...
...
@@ -39,7 +38,7 @@ def auto_complete(request):
'data'
:
data
,
}
logging
.
info
(
"duan add,q is:
%
s,result:
%
s"
%
(
str
(
q
)
.
encode
(
"utf-8"
),
str
(
result
)
.
encode
(
'utf-8'
)))
logging
.
info
(
"duan add,q is:
%
s,result:
%
s"
%
(
str
(
q
)
.
encode
(
"utf-8"
),
str
(
result
)
.
encode
(
'utf-8'
)))
return
json_http_response
(
result
)
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
search/utils/auto_tips.py
View file @
0440d296
...
...
@@ -267,17 +267,19 @@ def get_query_by_es(query='', lat=0, lng=0, size=0, offset=0, highlight_query=No
def
recommed_service_category_device_id
(
device_id
):
try
:
if
device_id
==
"868771031984211"
:
'''
设备品类显示, 是否命中灰度
'''
if
device_id
in
[
"868771031984211"
]:
return
2
elif
device_id
==
"867961030707277"
:
elif
device_id
in
[
"F3F4C95F-BF76-4F82-9CC6-B5A8933A6BD9"
,
"867961030707277"
]
:
return
3
else
:
return
1
'''
设备品类显示, 是否命中灰度
'''
# categroy_select_cary1 = ["0", "1", "2", "3", "c", "d", "e", "f"]
# categroy_select_cary2 = ["4", "5", "6", "a"]
# categroy_select_cary3 = ["9", "8", "7", "b"]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment