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
shuaiguo
5 years ago
Commit
162960c4a2250a85c34837037dd6288eb19dded5
2 parents
ac27d2dc
6b66c648
Merge branch 'refs/heads/hotfix/shop'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
apps/product/controllers/shop.js
apps/product/models/shop-service.js
package.json
apps/product/controllers/shop.js
View file @
162960c
...
...
@@ -25,10 +25,6 @@ exports.index = (req, res, next) => {
_
.
isEmpty
(
req
.
query
)
?
null
:
req
.
query
));
}
if
(
isNaN
(
+
shopId
))
{
return
res
.
redirect
(
301
,
'/404'
);
}
if
(
req
.
xhr
&&
req
.
query
.
_pjax
&&
shopId
)
{
return
req
.
ctx
(
shopModel
).
getShopGoodsData
(
shopId
,
req
.
yoho
.
channel
,
req
.
query
).
then
(
result
=>
{
Object
.
assign
(
result
,
{
...
...
apps/product/models/shop-service.js
View file @
162960c
...
...
@@ -351,6 +351,13 @@ function getShopInfoAsync(domain, channel, params) {
let
data
,
shopInfo
;
if
(
shopId
)
{
// 带id访问
if
(
isNaN
(
+
shopId
))
{
return
{
redirect
:
'/404'
,
redirectType
:
301
};
}
let
result
=
yield
this
.
api
.
getShopInfo
(
shopId
);
data
=
result
.
data
||
{};
...
...
package.json
View file @
162960c
{
"name"
:
"yohobuy-node"
,
"version"
:
"6.9.1
3
"
,
"version"
:
"6.9.1
4
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
Please
register
or
login
to post a comment