Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
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
郭成尧
9 years ago
Commit
2ac35b7463787bee8f97ff374e41463a4f3874bc
1 parent
7f15f006
'brand代码优化'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
apps/channel/models/brand-api.js
apps/channel/models/brand.js
apps/channel/models/brand-api.js
View file @
2ac35b7
...
...
@@ -29,7 +29,7 @@ module.exports = {
return
api
.
get
(
''
,
{
method
:
'app.brand.newBrandList'
,
yh_channel
:
yhChannel
[
params
.
channel
].
channel
});
}
,
{
code
:
200
,
cache
:
true
}
);
},
/**
...
...
@@ -39,6 +39,6 @@ module.exports = {
getCateListData
(
params
)
{
return
api
.
get
(
''
,
Object
.
assign
(
params
,
{
method
:
'app.sort.get'
}));
}
,
{
code
:
200
,
cache
:
true
}
));
}
};
...
...
apps/channel/models/brand.js
View file @
2ac35b7
...
...
@@ -55,10 +55,10 @@ const getBrandListData = params => {
let
finalResult
=
{};
return
brandApi
.
getBrandListOriginData
(
params
).
then
(
result
=>
{
if
(
result
.
code
===
200
&&
result
.
data
)
{
if
(
result
.
data
)
{
Object
.
assign
(
finalResult
,
handleBrandList
(
result
.
data
.
all_list
));
}
else
{
logger
.
error
(
'getBrandListOriginData api
code no 200 or
data is null'
);
logger
.
error
(
'getBrandListOriginData api data is null'
);
}
return
finalResult
;
...
...
@@ -72,11 +72,7 @@ const getBrandListData = params => {
*/
const
getCateListData
=
params
=>
{
return
brandApi
.
getCateListData
(
params
).
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
camelCase
(
result
);
}
else
{
logger
.
error
(
'getCateListData api code no 200 or data is null'
);
}
return
camelCase
(
result
);
});
};
...
...
Please
register
or
login
to post a comment