Authored by zhangxiaoru

品牌

'use strict';
const serviceAPI = global.yoho.ServiceAPI;
// const serviceAPI = global.yoho.ServiceAPI;
const api = global.yoho.API;
const camelCase = global.yoho.camelCase;
const _ = require('lodash');
const logger = global.yoho.logger;
const _processListData = (list) => {
let category = {
key: '',
brands: []
};
// let category = {
// key: '',
// brands: []
// };
let listData = [];
list = list || [];
list = camelCase(list);
console.log(list)
console.log(list);
_.forEach(list.data.allList, function(value, index) {
... ... @@ -39,7 +39,7 @@ const _processTabData = (list) => {
list = list || [];
list = camelCase(list);
console.log(list)
console.log(list);
// let artList = list.list.artList.map(data =>{
// data.publishTime = data.publishTime.replace(/年|月/g, '/');
... ... @@ -48,10 +48,10 @@ const _processTabData = (list) => {
// return data;
// });
}
};
const _getResources = () => {
return api.get('', {
return api.get('', {
method: 'web.brand.series'
}).then((result) => {
if (result && result.code === 200) {
... ... @@ -64,7 +64,7 @@ const _getResources = () => {
};
const _getBreakingSort = () => {
return api.get('', {
return api.get('', {
method: 'app.brand.newBrandList'
}).then((result) => {
if (result && result.code === 200) {
... ...
... ... @@ -32,7 +32,7 @@ $(window).scroll(function() {
$category.click(function() {
var name = $(this).attr('href').split('#')[1],
targetTop = $list.find('[name=' + name + ']').offset().top - categoryHeight;
$('.category-nav').find('a').css('color', '#222');
$(this).css('color', '#379ed6');
... ...
... ... @@ -13,7 +13,7 @@
min-width: 16px;
line-height: 16px;
display: inline-block;
padding: 0px 5px;
padding: 0 5px;
position: absolute;
top: 0;
right: 14px;
... ...