Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai(👎🏻🍜)
9 years ago
Commit
5076bc060ec570e565848d7f162ebd53118f9fc6
1 parent
3358adcc
店铺域名修改
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
apps/product/controllers/list.js
doraemon/middleware/sub-domain.js
apps/product/controllers/list.js
View file @
5076bc0
...
...
@@ -422,7 +422,7 @@ const category = (req, res) => {
// 品牌|店铺落地页
const
brand
=
(
req
,
res
,
next
)
=>
{
let
params
=
Object
.
assign
({},
req
.
query
);
let
domain
=
req
.
query
.
domain
||
'colormad'
;
let
domain
=
req
.
query
.
domain
;
let
uid
=
req
.
user
.
uid
;
let
brandId
=
0
;
let
brandLogo
=
{};
...
...
doraemon/middleware/sub-domain.js
View file @
5076bc0
...
...
@@ -35,7 +35,12 @@ module.exports = () => {
res
.
redirect
(
301
,
helpers
.
urlFormat
(
req
.
path
,
req
.
query
,
'default'
));
return
;
default
:
// 其它(识别为品牌)
req
.
url
=
`
/
product
/
index
/
brand
?
domain
=
$
{
req
.
subdomains
[
0
]}
`
;
if
(
req
.
path
===
'/'
)
{
req
.
url
=
`
/
product
/
index
/
brand
?
domain
=
$
{
req
.
subdomains
[
0
]}
`
;
req
.
query
=
{
domain
:
req
.
subdomains
[
0
]
};
}
break
;
}
}
...
...
Please
register
or
login
to post a comment