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
02e1d928de938f606665780546d5e2bf299d2198
1 parent
5b78bb7b
品牌
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
22 deletions
apps/brand/controllers/brand.js
apps/editorial/models/editorial.js
public/js/editorial/index.page.js
public/scss/brand/_brand.css
apps/brand/controllers/brand.js
View file @
02e1d92
...
...
@@ -7,7 +7,7 @@
'use strict'
;
const
index
=
(
req
,
res
,
next
)
=>
{
const
index
=
(
req
,
res
)
=>
{
res
.
display
(
'index'
,
{
module
:
'brand'
,
page
:
'index'
,
...
...
@@ -101,7 +101,7 @@ const index = (req, res, next) => {
}
]
},
{
{
key
:
'A'
,
brandList
:
[
{
...
...
@@ -144,7 +144,7 @@ const index = (req, res, next) => {
pagination
:
require
(
'../../../doraemon/components/pagination/pagination'
).
createPagination
}
});
}
}
;
module
.
exports
=
{
index
// 组件demo页
...
...
apps/editorial/models/editorial.js
View file @
02e1d92
...
...
@@ -4,7 +4,8 @@ const serviceAPI = global.yoho.ServiceAPI;
// const api = global.yoho.API;
const
camelCase
=
global
.
yoho
.
camelCase
;
const
_
=
require
(
'lodash'
);
const
moment
=
require
(
'moment'
);
// const moment = require('moment');
const
logger
=
global
.
yoho
.
logger
;
// const helpers = global.yoho.helpers;
...
...
@@ -17,7 +18,7 @@ const _processNavData = (list, type) => {
_
.
forEach
(
list
,
(
data
,
index
)
=>
{
data
.
url
=
`
//127.0.0.1:6003/editorial?type=${data.id}`;
data
.
isActive
=
index
===
parseInt
(
type
)
?
true
:
false
;
data
.
isActive
=
index
===
parseInt
(
type
,
10
)
?
true
:
false
;
formatData
.
push
(
data
);
});
...
...
@@ -30,7 +31,7 @@ const _processListData = (list) => {
list
=
list
||
[];
list
=
camelCase
(
list
);
let
data
=
moment
(
'2016年06月02日 15:56'
,
"YYYY年MM月DD日 HH:mm"
).
format
(
'YYYY/MM/DD HH:mm'
);
// 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
=>
{
...
...
public/js/editorial/index.page.js
View file @
02e1d92
...
...
@@ -14,15 +14,15 @@ lazyLoad($('#msg-list img.lazy'));
$
(
'.editorial-index-page'
).
on
(
'click'
,
'.like-icon'
,
function
()
{
var
$this
=
$
(
this
),
num
=
parseInt
(
$this
.
next
().
html
()
);
num
=
parseInt
(
$this
.
next
().
html
(),
10
);
if
(
$this
.
hasClass
(
'liked'
))
{
$this
.
removeClass
(
'liked'
);
num
=
num
-
1
;
}
else
{
}
else
{
$this
.
addClass
(
'liked'
);
num
=
num
+
1
;
console
.
log
(
num
)
console
.
log
(
num
)
;
}
$this
.
next
().
html
(
num
)
$this
.
next
().
html
(
num
)
;
});
...
...
public/scss/brand/_brand.css
View file @
02e1d92
...
...
@@ -8,7 +8,6 @@
display
:
block
;
width
:
370px
;
height
:
304px
;
/*border: 1px solid red;*/
img
{
width
:
100%
;
...
...
@@ -32,7 +31,7 @@
float
:
left
;
margin-left
:
20px
;
position
:
relative
;
p
{
display
:
block
;
font-size
:
30px
;
...
...
@@ -51,9 +50,9 @@
}
li
:hover
{
.g-mask
{
.g-mask
{
opacity
:
0.3
;
}
}
}
}
...
...
@@ -69,7 +68,7 @@
position
:
relative
;
z-index
:
100
;
background-color
:
#fff
;
a
{
display
:
inline-block
;
padding
:
0
7px
;
...
...
@@ -85,12 +84,6 @@
.brands-list
{
/* dl {
height: 70px;
line-height: 70px;
border-top: 1px solid #999;
}*/
dt
{
height
:
70px
;
line-height
:
70px
;
...
...
@@ -139,4 +132,4 @@
}
}
}
}
\ No newline at end of file
}
...
...
Please
register
or
login
to post a comment