Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangxiaoru
9 years ago
Commit
d70e05a63eafd0211535c5d570eab5be0974475b
1 parent
481440d4
brand
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
apps/brand/controllers/brand.js
apps/brand/models/brand.js
apps/editorial/models/editorial.js
apps/brand/controllers/brand.js
View file @
d70e05a
...
...
@@ -31,17 +31,17 @@ const index = (req, res) => {
{
url
:
'#'
,
name
:
''
,
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg
?imageView2/2/w/570/h/633
'
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
},
{
url
:
'#'
,
name
:
''
,
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg
?imageView2/2/w/570/h/633
'
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
},
{
url
:
'#'
,
name
:
''
,
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg
?imageView2/2/w/570/h/633
'
src
:
'//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
}
],
category
:
result
.
category
...
...
apps/brand/models/brand.js
View file @
d70e05a
...
...
@@ -42,13 +42,13 @@ const _processTabData = (list) => {
const
_getResources
=
()
=>
{
return
api
.
get
(
''
,
{
method
:
'web.brand.series'
//
method: 'web.brand.series'
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
_processTabData
(
result
.
data
);
}
else
{
logger
.
error
(
'品牌页Tab数据返回 code 不是 200'
);
return
{};
// logger.error('品牌页Tab数据返回 code 不是 200');
// return {};
}
});
};
...
...
apps/editorial/models/editorial.js
View file @
d70e05a
...
...
@@ -7,7 +7,8 @@ const _ = require('lodash');
// const moment = require('moment');
const
logger
=
global
.
yoho
.
logger
;
const
helpers
=
global
.
yoho
.
helpers
;
// const helpers = global.yoho.helpers;
const
_processNavData
=
(
list
,
type
)
=>
{
let
formatData
=
[];
...
...
@@ -33,13 +34,13 @@ const _processListData = (list) => {
// let data = moment('2016年06月02日 15:56', 'YYYY年MM月DD日 HH:mm').format('YYYY/MM/DD HH:mm');
let
artList
=
list
.
list
.
artList
.
map
(
data
=>
{
let
artList
=
list
.
list
.
artList
.
map
(
data
=>
{
data
.
publishTime
=
data
.
publishTime
.
replace
(
/年|月/g
,
'/'
);
data
.
publishTime
=
data
.
publishTime
.
replace
(
/日/g
,
''
);
return
data
;
});
console
.
log
(
artList
)
return
artList
;
};
...
...
Please
register
or
login
to post a comment