Showing
1 changed file
with
22 additions
and
3 deletions
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2016-05-30 16:20:03 | 3 | * @Date: 2016-05-30 16:20:03 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2016-06-02 10:26:33 | 5 | + * @Last Modified time: 2016-06-02 10:38:10 |
6 | */ | 6 | */ |
7 | 7 | ||
8 | 'use strict'; | 8 | 'use strict'; |
@@ -63,16 +63,35 @@ const handleOutletsActivityData = (origin) => { | @@ -63,16 +63,35 @@ const handleOutletsActivityData = (origin) => { | ||
63 | const handleOutletsBannersData = (origin) => { | 63 | const handleOutletsBannersData = (origin) => { |
64 | var dest = {}; | 64 | var dest = {}; |
65 | 65 | ||
66 | - dest.mainBanner = {}; | ||
67 | - | ||
68 | _.forEach(origin.list, value => { | 66 | _.forEach(origin.list, value => { |
67 | + | ||
68 | + // 处理焦点图数据 | ||
69 | if (value.template_name === 'focus') { | 69 | if (value.template_name === 'focus') { |
70 | + dest.mainBanner = {}; | ||
70 | dest.mainBanner.list = value.data; | 71 | dest.mainBanner.list = value.data; |
71 | } | 72 | } |
72 | 73 | ||
74 | + // 处理三张小图数据 | ||
73 | if (value.template_name === 'threePicture') { | 75 | if (value.template_name === 'threePicture') { |
74 | dest.column = value.data; | 76 | dest.column = value.data; |
75 | } | 77 | } |
78 | + | ||
79 | + // 处理热销推荐数据 | ||
80 | + if (value.template_name === 'recommendCategory') { | ||
81 | + dest.hotType = {}; | ||
82 | + dest.hotType.title === _.isEmpty(value.data.title) ? '热销推荐' : value.data.title; | ||
83 | + dest.hotType.classify = []; | ||
84 | + _.forEach(value.data.categoryList, subValue => { | ||
85 | + let category = {}; | ||
86 | + | ||
87 | + category.href = subValue.url; | ||
88 | + category.name = subValue.navigateNamePC; | ||
89 | + | ||
90 | + dest.hotType.classify.push(category); | ||
91 | + | ||
92 | + }); | ||
93 | + | ||
94 | + } | ||
76 | }); | 95 | }); |
77 | 96 | ||
78 | return dest; | 97 | return dest; |
-
Please register or login to post a comment