|
@@ -4,13 +4,15 @@ |
|
@@ -4,13 +4,15 @@ |
4
|
<div class="cate-container clearfix">
|
4
|
<div class="cate-container clearfix">
|
5
|
<div class="content" style="height: 522px;">
|
5
|
<div class="content" style="height: 522px;">
|
6
|
<ul class="primary-level">
|
6
|
<ul class="primary-level">
|
7
|
- <li v-for="(index, ca) in cateNavLeftData" v-bind:class="{focus: index === leftcurrent}" class="p-level-item" v-on:click='cateNavLeftFun(index)'>
|
|
|
8
|
- <a v-if="ca.sub.length > 0">{{ca.categoryName}}</a>
|
|
|
9
|
- <a v-else href="/list?sort={{ca.categoryId}}&sort_name={{ca.categoryName}}&gender={{gender}}">{{ca.categoryName}}</a>
|
7
|
+ <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)'>
|
|
|
8
|
+ {{ca.categoryName}}
|
10
|
</li>
|
9
|
</li>
|
11
|
</ul>
|
10
|
</ul>
|
12
|
<div class="sub-level-container">
|
11
|
<div class="sub-level-container">
|
13
|
<ul class="sub-level">
|
12
|
<ul class="sub-level">
|
|
|
13
|
+ <li><a href="/list?sort={{rightAll.categoryId}}&sort_name={{rightAll.categoryName}}&gender={{gender}}">全部{{rightAll.categoryName}}</a></li>
|
|
|
14
|
+ </ul>
|
|
|
15
|
+ <ul class="sub-level">
|
14
|
<li v-for="sub in cateNavRightData">
|
16
|
<li v-for="sub in cateNavRightData">
|
15
|
<a href="/list?sort={{sub.categoryId}}&sort_name={{sub.categoryName}}&gender={{gender}}">{{sub.categoryName}}</a>
|
17
|
<a href="/list?sort={{sub.categoryId}}&sort_name={{sub.categoryName}}&gender={{gender}}">{{sub.categoryName}}</a>
|
16
|
</li>
|
18
|
</li>
|
|
@@ -229,6 +231,7 @@ |
|
@@ -229,6 +231,7 @@ |
229
|
leftcurrent: 0,
|
231
|
leftcurrent: 0,
|
230
|
page: 'cate',
|
232
|
page: 'cate',
|
231
|
gender: '1,2,3',
|
233
|
gender: '1,2,3',
|
|
|
234
|
+ rightAll: {},
|
232
|
contentCode: contentCode.brand[qs.channel || 'men']
|
235
|
contentCode: contentCode.brand[qs.channel || 'men']
|
233
|
};
|
236
|
};
|
234
|
},
|
237
|
},
|
|
@@ -248,14 +251,23 @@ |
|
@@ -248,14 +251,23 @@ |
248
|
self.$set('brandCate', result.data);
|
251
|
self.$set('brandCate', result.data);
|
249
|
self.$set('cateNavLeftData', result.data['MEN男士']);
|
252
|
self.$set('cateNavLeftData', result.data['MEN男士']);
|
250
|
self.$set('cateNavRightData', result.data['MEN男士'] ? result.data['MEN男士'][0].sub : []);
|
253
|
self.$set('cateNavRightData', result.data['MEN男士'] ? result.data['MEN男士'][0].sub : []);
|
|
|
254
|
+
|
|
|
255
|
+ this.$set('rightAll', result.data['MEN男士'] ? {
|
|
|
256
|
+ categoryId: result.data['MEN男士'][0].categoryId,
|
|
|
257
|
+ categoryName: result.data['MEN男士'][0].categoryName
|
|
|
258
|
+ } : {});
|
251
|
}
|
259
|
}
|
252
|
}).fail(() => {
|
260
|
}).fail(() => {
|
253
|
tip('网络错误');
|
261
|
tip('网络错误');
|
254
|
});
|
262
|
});
|
255
|
},
|
263
|
},
|
256
|
- cateNavLeftFun(index) {
|
264
|
+ cateNavLeftFun(index, categoryId, categoryName) {
|
257
|
this.leftcurrent = index;
|
265
|
this.leftcurrent = index;
|
258
|
this.cateNavRightData = this.cateNavLeftData[index].sub;
|
266
|
this.cateNavRightData = this.cateNavLeftData[index].sub;
|
|
|
267
|
+ this.rightAll = {
|
|
|
268
|
+ categoryId: categoryId,
|
|
|
269
|
+ categoryName: categoryName
|
|
|
270
|
+ };
|
259
|
}
|
271
|
}
|
260
|
},
|
272
|
},
|
261
|
components: {
|
273
|
components: {
|