...
|
...
|
@@ -14,13 +14,15 @@ |
|
|
<i class="icon icon-search-new" @click="searchSliderSwitch"></i>
|
|
|
</span>
|
|
|
</header-box>
|
|
|
<div class="resources">
|
|
|
<component
|
|
|
:is="component.template_name"
|
|
|
v-for="(component, index) in channel.home.filter(c => ['twoPicture', 'newSingleImage', 'shopFloor'].some(k => k === c.template_name) )"
|
|
|
:value="component.data"
|
|
|
:key="index"></component>
|
|
|
</div>
|
|
|
<scroller ref="scroller" @loading="loading">
|
|
|
<div class="resources">
|
|
|
<component
|
|
|
:is="component.template_name"
|
|
|
v-for="(component, index) in channel.home.filter(c => ['twoPicture', 'newSingleImage', 'shopFloor', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
|
|
|
:value="component.data"
|
|
|
:key="index"></component>
|
|
|
</div>
|
|
|
</scroller>
|
|
|
</layout-body>
|
|
|
</div>
|
|
|
</template>
|
...
|
...
|
@@ -32,7 +34,8 @@ import { |
|
|
import {
|
|
|
ResourceTwoImage,
|
|
|
ResourceSingleImage,
|
|
|
ResourceShopFloor
|
|
|
ResourceShopFloor,
|
|
|
ResourceProductList
|
|
|
} from 'components/resources';
|
|
|
import {SearchSlider} from 'components/search';
|
|
|
import {mapState} from 'vuex';
|
...
|
...
|
@@ -59,11 +62,17 @@ export default { |
|
|
searchSliderSwitch() {
|
|
|
this.searchSlider = !this.searchSlider;
|
|
|
},
|
|
|
async loading() {
|
|
|
console.log('loading')
|
|
|
await this.$store.dispatch(FETCH_HOME_REQUEST);
|
|
|
this.$refs.scroller.stop();
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
twoPicture: ResourceTwoImage,
|
|
|
newSingleImage: ResourceSingleImage,
|
|
|
shopFloor: ResourceShopFloor,
|
|
|
BlkNewProductFloorResource: ResourceProductList,
|
|
|
SearchSlider,
|
|
|
HomeSlider
|
|
|
}
|
...
|
...
|
|