Authored by zhangxiaoru

品牌

1 'use strict'; 1 'use strict';
2 2
3 -const serviceAPI = global.yoho.ServiceAPI; 3 +// const serviceAPI = global.yoho.ServiceAPI;
4 const api = global.yoho.API; 4 const api = global.yoho.API;
5 const camelCase = global.yoho.camelCase; 5 const camelCase = global.yoho.camelCase;
6 const _ = require('lodash'); 6 const _ = require('lodash');
7 const logger = global.yoho.logger; 7 const logger = global.yoho.logger;
8 8
9 const _processListData = (list) => { 9 const _processListData = (list) => {
10 - let category = {  
11 - key: '',  
12 - brands: []  
13 - }; 10 + // let category = {
  11 + // key: '',
  12 + // brands: []
  13 + // };
14 14
15 let listData = []; 15 let listData = [];
16 16
17 list = list || []; 17 list = list || [];
18 list = camelCase(list); 18 list = camelCase(list);
19 - console.log(list) 19 + console.log(list);
20 20
21 _.forEach(list.data.allList, function(value, index) { 21 _.forEach(list.data.allList, function(value, index) {
22 22
@@ -39,7 +39,7 @@ const _processTabData = (list) => { @@ -39,7 +39,7 @@ const _processTabData = (list) => {
39 list = list || []; 39 list = list || [];
40 list = camelCase(list); 40 list = camelCase(list);
41 41
42 - console.log(list) 42 + console.log(list);
43 43
44 // let artList = list.list.artList.map(data =>{ 44 // let artList = list.list.artList.map(data =>{
45 // data.publishTime = data.publishTime.replace(/年|月/g, '/'); 45 // data.publishTime = data.publishTime.replace(/年|月/g, '/');
@@ -48,10 +48,10 @@ const _processTabData = (list) => { @@ -48,10 +48,10 @@ const _processTabData = (list) => {
48 // return data; 48 // return data;
49 // }); 49 // });
50 50
51 -} 51 +};
52 52
53 const _getResources = () => { 53 const _getResources = () => {
54 - return api.get('', { 54 + return api.get('', {
55 method: 'web.brand.series' 55 method: 'web.brand.series'
56 }).then((result) => { 56 }).then((result) => {
57 if (result && result.code === 200) { 57 if (result && result.code === 200) {
@@ -64,7 +64,7 @@ const _getResources = () => { @@ -64,7 +64,7 @@ const _getResources = () => {
64 }; 64 };
65 65
66 const _getBreakingSort = () => { 66 const _getBreakingSort = () => {
67 - return api.get('', { 67 + return api.get('', {
68 method: 'app.brand.newBrandList' 68 method: 'app.brand.newBrandList'
69 }).then((result) => { 69 }).then((result) => {
70 if (result && result.code === 200) { 70 if (result && result.code === 200) {
@@ -32,7 +32,7 @@ $(window).scroll(function() { @@ -32,7 +32,7 @@ $(window).scroll(function() {
32 $category.click(function() { 32 $category.click(function() {
33 var name = $(this).attr('href').split('#')[1], 33 var name = $(this).attr('href').split('#')[1],
34 targetTop = $list.find('[name=' + name + ']').offset().top - categoryHeight; 34 targetTop = $list.find('[name=' + name + ']').offset().top - categoryHeight;
35 - 35 +
36 $('.category-nav').find('a').css('color', '#222'); 36 $('.category-nav').find('a').css('color', '#222');
37 $(this).css('color', '#379ed6'); 37 $(this).css('color', '#379ed6');
38 38
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 min-width: 16px; 13 min-width: 16px;
14 line-height: 16px; 14 line-height: 16px;
15 display: inline-block; 15 display: inline-block;
16 - padding: 0px 5px; 16 + padding: 0 5px;
17 position: absolute; 17 position: absolute;
18 top: 0; 18 top: 0;
19 right: 14px; 19 right: 14px;