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
c1cec135c4d7760cea8dea144f9b86cdeaee2437
1 parent
0a45c6c7
shop url
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
apps/product/controllers/list.js
doraemon/middleware/sub-domain.js
apps/product/controllers/list.js
View file @
c1cec13
...
...
@@ -83,7 +83,7 @@ exports.new = (req, res, next) => {
* @return {[type]} [description]
*/
exports
.
brand
=
(
req
,
res
,
next
)
=>
{
let
brandDomain
=
req
.
params
.
brandD
omain
;
let
brandDomain
=
req
.
query
.
d
omain
;
let
shopId
=
req
.
query
.
shopId
;
let
resData
=
{};
...
...
doraemon/middleware/sub-domain.js
View file @
c1cec13
...
...
@@ -48,9 +48,9 @@ module.exports = () => {
break
;
default
:
// 其它(识别为品牌)
if
(
!
req
.
path
||
req
.
path
===
'/'
)
{
req
.
url
=
`
/
product
/
brand
/
$
{
req
.
subdomains
[
0
]}
`
;
req
.
url
=
`
/
product
/
brand
?
domain
=
$
{
req
.
subdomains
[
0
]}
`
;
}
else
if
(
req
.
path
===
'/about'
)
{
req
.
url
=
`
/
product
/
about
/
$
{
req
.
subdomains
[
0
]}
`
;
req
.
url
=
`
/
product
/
about
?
domain
=
$
{
req
.
subdomains
[
0
]}
`
;
}
break
;
}
...
...
Please
register
or
login
to post a comment