Authored by zhangxiaoru

品牌

... ... @@ -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页
... ...
... ... @@ -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 =>{
... ...
... ... @@ -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);
});
... ...
... ... @@ -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
}
... ...