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
刘传洋
9 years ago
Commit
050098caeab52ccb5c26d94c2f27fad96a627504
1 parent
0e12913b
sub-domain chg
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
apps/product/models/search-api.js
doraemon/middleware/sub-domain.js
apps/product/models/search-api.js
View file @
050098c
...
...
@@ -246,7 +246,8 @@ const getBrandShop = (query) => {
cache
.
set
(
cKey
,
ret
.
data
,
3600
);
return
ret
.
data
;
}
});
return
return
null
;
});
}
});
};
...
...
@@ -283,6 +284,7 @@ const getShopsByBrandId = bid => {
cache
.
set
(
cKey
,
ret
.
data
,
3600
);
return
ret
.
data
;
}
return
null
;
});
}
});
...
...
doraemon/middleware/sub-domain.js
View file @
050098c
...
...
@@ -16,10 +16,12 @@ module.exports = () => {
case
'item'
:
// 商品详情页
break
;
case
'search'
:
// 搜索
if
(
!
req
.
path
)
{
req
.
url
=
'/product/search/index'
;
if
(
req
.
path
===
'/product/search/suggest'
)
{
req
.
url
=
'/product/search/suggest'
;
}
else
if
(
req
.
path
===
'/api/suggest'
)
{
req
.
url
=
'/product/api/suggest'
;
}
else
{
req
.
url
=
'/product/search/index'
;
}
break
;
case
'list'
:
// 商品列表
...
...
Please
register
or
login
to post a comment