Authored by 陈峰

Merge branch 'feature/brandtreeView' into 'release/5.5'

品牌品类树view代码修改



See merge request !357
... ... @@ -171,13 +171,13 @@ const _processCateData = (list, channel, appType) => {
};
});
_.map(list, function(item, key) {
_.forEach(list, function(item, key) {
item.focus = key === channelNav[channel];
_.map(item, function(firstItem) {
_.forEach(item, function(firstItem) {
// 如果有二级菜单,二级菜单跳转,否则一级菜单跳转
if (firstItem.sub && firstItem.sub.length) {
_.map(firstItem.sub, function(secondItem) {
_.forEach(firstItem.sub, function(secondItem) {
secondItem.url = helpers.urlFormat('/', {
sort: _.get(secondItem, 'relation_parameter.sort'),
sort_name: secondItem.category_name,
... ... @@ -241,10 +241,11 @@ const indexData = (gender, brandCode, channel, appType) => {
}
if (result[1]) {
_.forEach(result[1], function(data) {
if (data.focus_type && data.focus_type === '1') {
if (data.focus_type === '1') {
brandList.bannerTop = data;
} else if (data.focus_type && data.focus_type === '2') {
} else if (data.focus_type === '2') {
brandList.focusData = data.data;
}
});
... ... @@ -274,12 +275,10 @@ const brandListData = (code, gender) => {
if (result[0]) {
_.forEach(result[0], function(data) {
if (data.focus_type && data.focus_type === '1') {
if (data.focus_type === '1') {
brandList.bannerTop = data;
} else if (data.focus_type && data.focus_type === '2') {
} else if (data.focus_type === '2') {
brandList.focusData = data.data;
} else if (data.template_name === 'single_image') {
brandList.bannerTop = data;
}
});
}
... ...