|
|
<template>
|
|
|
<div class="resources">
|
|
|
<template v-for="floor in resources">
|
|
|
<focus v-if="floor.focus" v-bind:floor="floor.data" v-bind:style="{height: '182px'}"></focus>
|
|
|
<!-- 轮播图,通栏 -->
|
|
|
<focus v-if="floor.focus && floor.focusType === '1'" v-bind:floor="floor.data" v-bind:style="{height: '182px'}"></focus>
|
|
|
<!-- 轮播图,左右滑动 -->
|
|
|
<focus-left-right v-if="floor.focus && floor.focusType === '2'" v-bind:floor="floor.data"></focus-left-right>
|
|
|
<!-- 标题图片 -->
|
|
|
<title-image v-if="floor.titleImage" v-bind:floor="floor.data"></title-image>
|
|
|
<!-- 商品 -->
|
|
|
<goods v-if="floor.goods" v-bind:floor="floor.data"></goods>
|
|
|
</template>
|
|
|
</div>
|
...
|
...
|
@@ -13,6 +18,7 @@ |
|
|
const tip = require('common/tip');
|
|
|
const bus = require('common/vue-bus');
|
|
|
const focus = require('component/resources/focus.vue');
|
|
|
const focusLeftRight = require('component/resources/focus-left-right.vue');
|
|
|
const titleImage = require('component/resources/title-image.vue');
|
|
|
const goods = require('component/resources/goods.vue');
|
|
|
|
...
|
...
|
@@ -24,9 +30,10 @@ |
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
focus: focus,
|
|
|
titleImage: titleImage,
|
|
|
goods: goods
|
|
|
focus,
|
|
|
focusLeftRight,
|
|
|
titleImage,
|
|
|
goods
|
|
|
},
|
|
|
watch: {
|
|
|
channel() {
|
...
|
...
|
@@ -60,7 +67,6 @@ |
|
|
this.getResourcesData();
|
|
|
bus.$on('changeChannel', channel => {
|
|
|
this.channel = channel;
|
|
|
this.getResourcesData();
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
|