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
陈峰
2018-03-23 13:38:53 +0800
Commit
efa169498479de21552307666d250695e5f26239
2 parents
85701ffb
658aaf44
Merge branch 'hotfix/searchHistory' into 'gray'
Hotfix/search history See merge request
!238
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
8 deletions
apps/home/models/favorite-model.js
apps/product/controllers/search.js
apps/product/models/sale.js
apps/product/models/search-handler.js
public/js/header.js
static/robots.txt
apps/home/models/favorite-model.js
View file @
efa1694
...
...
@@ -104,7 +104,7 @@ module.exports = class favorite extends global.yoho.BaseModel {
url
:
'/home/favorite/reduction'
};
if
(
data
.
data
.
num
)
{
if
(
data
.
data
&&
data
.
data
.
num
)
{
result
.
count
=
+
data
.
data
.
num
;
result
.
phone
=
data
.
data
.
mobile
;
}
...
...
apps/product/controllers/search.js
View file @
efa1694
...
...
@@ -155,6 +155,7 @@ const searchHistory = (req, res) => {
if
(
q
)
{
history
.
unshift
(
q
);
res
.
cookie
(
'_History'
,
_
.
take
(
history
,
9
).
join
(
','
),
{
path
:
'/'
,
domain
:
config
.
cookieDomain
,
maxAge
:
60
*
60
*
24
*
1000
*
30
// 一月
});
...
...
apps/product/models/sale.js
View file @
efa1694
...
...
@@ -514,7 +514,7 @@ function getSalebreakingYardsData(params, channel) {
// 处理筛选条件数据
if
(
subResult
[
0
].
code
===
200
)
{
finalResult
.
leftContent
=
publicHandler
.
handleSaleSortData
(
subResult
[
0
].
data
.
filter
.
group_sort
,
publicHandler
.
handleSaleSortData
(
_
.
get
(
subResult
[
0
],
'data.filter.group_sort'
,
[])
,
params
,
''
,
baseUrl
);
}
...
...
apps/product/models/search-handler.js
View file @
efa1694
...
...
@@ -1818,7 +1818,7 @@ exports.handleSuggestData = (origin, query) => {
}];
_
.
forEach
(
origin
,
value
=>
{
if
(
query
===
value
.
keyword
||
value
.
keyword
.
length
<=
2
)
{
if
(
!
value
.
keyword
||
query
===
value
.
keyword
||
value
.
keyword
.
length
<=
2
)
{
return
;
}
...
...
public/js/header.js
View file @
efa1694
...
...
@@ -966,7 +966,10 @@ function searchSuggestHistory() {
// 历史记录清空
$
(
'.search-suggest-title .search-del'
).
click
(
function
()
{
window
.
setCookie
(
'_History'
,
''
,
{
domain
:
'.yohobuy.com'
});
window
.
setCookie
(
'_History'
,
''
,
{
domain
:
'.yohobuy.com'
,
path
:
'/'
});
$searchHistory
.
empty
();
$searchKey
.
attr
(
'alt'
,
true
);
return
false
;
...
...
static/robots.txt
View file @
efa1694
User-Agent: *
Disallow: /passport/
Disallow: signin.html
Disallow: reg.html
Disallow: /cart/
Disallow: /signin.html
Disallow: /reg.html
Disallow: /cart/
Disallow: /home/
Disallow: /shopping/
Disallow: /service/
Disallow: /settled/
Disallow: /3party/
\ No newline at end of file
Disallow: /3party/
Disallow: /coupon/
Disallow: /japanKorean/
Disallow: /guang/tags/
Disallow: /help/
Disallow: /search/
Disallow: /*?*
...
...
Please
register
or
login
to post a comment