Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
422201981f3343741bbed4c8c7143e576946abe4
2 parents
02fd91a5
915ad000
Merge branch 'feature/searchTerms' into release/5.5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
apps/product/controllers/search.js
public/js/header.js
yohobuypc_node.conf
apps/product/controllers/search.js
View file @
4222019
...
...
@@ -145,8 +145,8 @@ const searchHistory = (req, res) => {
});
ResData
[
'data'
]
=
data
;
//eslint-disable-line
res
.
type
(
'text/plain'
);
res
.
send
(
JSON
.
stringify
(
ResData
));
res
.
type
(
'text/javascript'
);
res
.
send
(
req
.
query
.
callback
+
'('
+
JSON
.
stringify
(
ResData
)
+
')'
);
};
...
...
public/js/header.js
View file @
4222019
...
...
@@ -909,9 +909,12 @@ function actionAddKeyWords() {
*/
function
searchSuggestHistory
()
{
var
param
=
{
return_type
:
'jsonp'
,
query
:
encodeURIComponent
(
$searchKey
.
val
())
||
''
};
$
.
getJSON
(
'//search.yohobuy.com/product/search/history?query='
+
encodeURIComponent
(
$searchKey
.
val
()),
function
(
jsonData
)
{
$
.
getJSON
(
'//search.yohobuy.com/product/search/history?callback=?'
,
param
,
function
(
jsonData
)
{
if
(
$searchKey
.
val
()
===
''
)
{
...
...
@@ -941,7 +944,7 @@ function searchSuggestHistory() {
* @return {[type]} [description]
*/
$searchKey
.
mouseenter
(
function
()
{
$searchKey
.
focus
(
function
()
{
var
val
=
$
.
trim
(
$
(
this
).
val
());
...
...
yohobuypc_node.conf
0 → 100644
View file @
4222019
location
~ / {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
...
...
Please
register
or
login
to post a comment