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
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
eac34fd02c4a0ebb7a1b0c6e8fbaa23a0d3dc9a3
1 parent
b27d3fdc
use seo search api
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletions
apps/product/models/search-api.js
apps/product/models/search.js
apps/product/models/search-api.js
View file @
eac34fd
...
...
@@ -123,6 +123,29 @@ const getProductList = (params, from) => {
}
};
/**
* 获取seo商品列表
* @return
*/
const
getSeoProductList
=
(
params
,
from
)
=>
{
let
finalParams
=
{
method
:
'web.search.forseo'
,
sales
:
'Y'
,
outlets
:
2
,
stocknumber
:
1
,
need_filter
:
'no'
,
limit
:
60
};
Object
.
assign
(
finalParams
,
params
);
if
(
from
)
{
finalParams
.
from
=
from
;
}
return
getProductListOrig
(
finalParams
);
};
const
getSortListOrig
=
(
finalParams
)
=>
api
.
get
(
''
,
finalParams
,
config
.
apiCache
);
/**
...
...
@@ -485,6 +508,7 @@ module.exports = {
getSortByConditionAsync
,
getKeyActivityAsync
,
getProductList
,
getSeoProductList
,
getSortList
,
getSortIntro
,
getSortAds
,
...
...
apps/product/models/search.js
View file @
eac34fd
...
...
@@ -394,7 +394,7 @@ exports.getSearchKeywordData = (params, channel) => {
let
apiMethod
=
[
headerModel
.
requestHeaderData
(
channel
),
searchApi
.
getSuggest
({
keyword
:
searchParams
.
query
.
substring
(
0
,
2
)}),
searchApi
.
getProductList
(
searchParams
,
'fuzzySearch'
)
searchApi
.
get
Seo
ProductList
(
searchParams
,
'fuzzySearch'
)
];
return
api
.
all
(
apiMethod
).
then
(
result
=>
{
...
...
Please
register
or
login
to post a comment