Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -4,13 +4,15 @@
<div class="cate-container clearfix">
<div class="content" style="height: 522px;">
<ul class="primary-level">
<li v-for="(index, ca) in cateNavLeftData" v-bind:class="{focus: index === leftcurrent}" class="p-level-item" v-on:click='cateNavLeftFun(index)'>
<a v-if="ca.sub.length > 0">{{ca.categoryName}}</a>
<a v-else href="/list?sort={{ca.categoryId}}&sort_name={{ca.categoryName}}&gender={{gender}}">{{ca.categoryName}}</a>
<li v-for="(index, ca) in cateNavLeftData" v-bind:class="{focus: index === leftcurrent}" class="p-level-item" v-on:click='cateNavLeftFun(index, ca.categoryId, ca.categoryName)'>
{{ca.categoryName}}
</li>
</ul>
<div class="sub-level-container">
<ul class="sub-level">
<li><a href="/list?sort={{rightAll.categoryId}}&sort_name={{rightAll.categoryName}}&gender={{gender}}">全部{{rightAll.categoryName}}</a></li>
</ul>
<ul class="sub-level">
<li v-for="sub in cateNavRightData">
<a href="/list?sort={{sub.categoryId}}&sort_name={{sub.categoryName}}&gender={{gender}}">{{sub.categoryName}}</a>
</li>
... ... @@ -229,6 +231,7 @@
leftcurrent: 0,
page: 'cate',
gender: '1,2,3',
rightAll: {},
contentCode: contentCode.brand[qs.channel || 'men']
};
},
... ... @@ -248,14 +251,23 @@
self.$set('brandCate', result.data);
self.$set('cateNavLeftData', result.data['MEN男士']);
self.$set('cateNavRightData', result.data['MEN男士'] ? result.data['MEN男士'][0].sub : []);
this.$set('rightAll', result.data['MEN男士'] ? {
categoryId: result.data['MEN男士'][0].categoryId,
categoryName: result.data['MEN男士'][0].categoryName
} : {});
}
}).fail(() => {
tip('网络错误');
});
},
cateNavLeftFun(index) {
cateNavLeftFun(index, categoryId, categoryName) {
this.leftcurrent = index;
this.cateNavRightData = this.cateNavLeftData[index].sub;
this.rightAll = {
categoryId: categoryId,
categoryName: categoryName
};
}
},
components: {
... ...
... ... @@ -8,7 +8,7 @@
position: fixed;
width: 45px;
margin: 0;
padding: 6px;
padding: 6px 0;
right: 0;
border-radius: 8px;
background: #fff;
... ... @@ -19,9 +19,12 @@
li {
list-style: none;
text-align: center;
width: 100%;
a {
font-size: 26px;
display: inline-block;
width: 100%;
}
}
}
... ...