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
htoooth
8 years ago
Commit
4a431fe9547058eb5e425cc70047922538f7424a
2 parents
b6fd1959
22967476
Merge branch 'feature/detail-op' into gray
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
apps/product/models/detail-product-api.js
apps/product/models/detail-product-api.js
View file @
4a431fe
...
...
@@ -253,7 +253,9 @@ module.exports = class extends global.yoho.BaseModel {
// 根据small_sort从redis获取分类下的关键词
_getRecommendKeywords
(
smallSort
,
skn
)
{
// eslint-disable-line
return
redis
.
all
([[
'get'
,
`
global
:
yoho
:
seo
:
keywords
:
sortId
:
$
{
smallSort
}:
page
`
]]).
then
(
res
=>
{
return
redis
.
all
([[
'get'
,
`
global
:
yoho
:
seo
:
keywords
:
sortId
:
$
{
smallSort
}:
page
:
$
{
res
[
0
]
||
1
}
`
]]);
return
redis
.
all
([
[
'get'
,
`
global
:
yoho
:
seo
:
keywords
:
sortId
:
$
{
smallSort
}:
page
:
$
{
_
.
random
(
1
,
res
[
0
])
||
1
}
`
]
]);
}).
then
(
res
=>
{
return
this
.
_getKeywordsInfo
(
JSON
.
parse
(
res
[
0
]
||
'[]'
));
});
...
...
Please
register
or
login
to post a comment