|
|
<template>
|
|
|
<layout-body class="page-detail">
|
|
|
<header-box slot="header">
|
|
|
<span slot="left">
|
|
|
<i class="icon icon-nav"></i>
|
|
|
</span>
|
|
|
<span slot="title">
|
|
|
{{title[gender]}}
|
|
|
</span>
|
|
|
<span slot="right">
|
|
|
<i class="icon icon-search"></i>
|
|
|
</span>
|
|
|
</header-box>
|
|
|
<div class="resources" v-for="floor in data.data">
|
|
|
<resource-category :gender="gender" :value="data.sort" v-if="floor.category"></resource-category>
|
|
|
<resource-focus-image v-if="floor.template_name=='focus'" :value="floor.data"></resource-focus-image>
|
|
|
<resource-single-image v-if="floor.template_name =='newSingleImage'"
|
|
|
:value="floor.data.list[0]"></resource-single-image>
|
|
|
<div class="shop-floor" v-if="floor.template_name=='shopFloor'">
|
|
|
<resource-single-image :value="floor.data.list[0]"></resource-single-image>
|
|
|
<resource-product-list :value="products"></resource-product-list>
|
|
|
<div>
|
|
|
<search-slider v-model="searchSlider"></search-slider>
|
|
|
<layout-body class="page-detail">
|
|
|
<header-box slot="header">
|
|
|
<span slot="title">
|
|
|
{{title[gender]}}
|
|
|
</span>
|
|
|
<span slot="right">
|
|
|
<i class="icon icon-search-new" @click="searchSliderSwitch"></i>
|
|
|
</span>
|
|
|
</header-box>
|
|
|
<div class="resources" v-for="floor in data.data">
|
|
|
<resource-category :gender="gender" :value="data.sort" v-if="floor.category"></resource-category>
|
|
|
<resource-focus-image v-if="floor.template_name=='focus'" :value="floor.data"></resource-focus-image>
|
|
|
<resource-single-image v-if="floor.template_name =='newSingleImage'"
|
|
|
:value="floor.data.list[0]"></resource-single-image>
|
|
|
<div class="shop-floor" v-if="floor.template_name=='shopFloor'">
|
|
|
<resource-single-image :value="floor.data.list[0]"></resource-single-image>
|
|
|
<resource-product-list :value="products"></resource-product-list>
|
|
|
</div>
|
|
|
<div class="new-arrival-floor" v-if="floor.template_name=='BlkNewProductFloorResource'">
|
|
|
<resource-product-list :value="floor.data.list"></resource-product-list>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</layout-body>
|
|
|
</layout-body>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
...
|
...
|
@@ -29,12 +32,19 @@ |
|
|
FETCH_CHANNEL_REQUEST,
|
|
|
} from 'store/channel/types';
|
|
|
import {mapState} from 'vuex';
|
|
|
import components from 'components/resources';
|
|
|
import {
|
|
|
ResourceCategory,
|
|
|
ResourceFocusImage,
|
|
|
ResourceSingleImage,
|
|
|
ResourceProductList
|
|
|
} from 'components/resources';
|
|
|
import {SearchSlider} from 'components/search';
|
|
|
|
|
|
export default {
|
|
|
name: 'ChannelHome',
|
|
|
data() {
|
|
|
return {
|
|
|
searchSlider: false,
|
|
|
title: {
|
|
|
men: '男士',
|
|
|
women: '女士'
|
...
|
...
|
@@ -82,6 +92,11 @@ |
|
|
}]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
searchSliderSwitch() {
|
|
|
this.searchSlider = !this.searchSlider;
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['channel']),
|
|
|
gender() {
|
...
|
...
|
@@ -95,7 +110,13 @@ |
|
|
const gender = /\/channel\/men/.test(to.path) ? 'men' : 'women';
|
|
|
return store.dispatch(FETCH_CHANNEL_REQUEST, gender);
|
|
|
},
|
|
|
components: {...components}
|
|
|
components: {
|
|
|
ResourceCategory,
|
|
|
ResourceFocusImage,
|
|
|
ResourceSingleImage,
|
|
|
ResourceProductList,
|
|
|
SearchSlider
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
...
|
...
|
|