1
|
<template>
|
1
|
<template>
|
2
|
<div class="resources">
|
2
|
<div class="resources">
|
3
|
<template v-for="floor in resources">
|
3
|
<template v-for="floor in resources">
|
4
|
- <focus v-if="floor.focus" v-bind:floor="floor.data" v-bind:style="{height: '182px'}"></focus>
|
4
|
+ <!-- 轮播图,通栏 -->
|
|
|
5
|
+ <focus v-if="floor.focus && floor.focusType === '1'" v-bind:floor="floor.data" v-bind:style="{height: '182px'}"></focus>
|
|
|
6
|
+ <!-- 轮播图,左右滑动 -->
|
|
|
7
|
+ <focus-left-right v-if="floor.focus && floor.focusType === '2'" v-bind:floor="floor.data"></focus-left-right>
|
|
|
8
|
+ <!-- 标题图片 -->
|
5
|
<title-image v-if="floor.titleImage" v-bind:floor="floor.data"></title-image>
|
9
|
<title-image v-if="floor.titleImage" v-bind:floor="floor.data"></title-image>
|
|
|
10
|
+ <!-- 商品 -->
|
6
|
<goods v-if="floor.goods" v-bind:floor="floor.data"></goods>
|
11
|
<goods v-if="floor.goods" v-bind:floor="floor.data"></goods>
|
7
|
</template>
|
12
|
</template>
|
8
|
</div>
|
13
|
</div>
|
|
@@ -13,6 +18,7 @@ |
|
@@ -13,6 +18,7 @@ |
13
|
const tip = require('common/tip');
|
18
|
const tip = require('common/tip');
|
14
|
const bus = require('common/vue-bus');
|
19
|
const bus = require('common/vue-bus');
|
15
|
const focus = require('component/resources/focus.vue');
|
20
|
const focus = require('component/resources/focus.vue');
|
|
|
21
|
+ const focusLeftRight = require('component/resources/focus-left-right.vue');
|
16
|
const titleImage = require('component/resources/title-image.vue');
|
22
|
const titleImage = require('component/resources/title-image.vue');
|
17
|
const goods = require('component/resources/goods.vue');
|
23
|
const goods = require('component/resources/goods.vue');
|
18
|
|
24
|
|
|
@@ -24,9 +30,10 @@ |
|
@@ -24,9 +30,10 @@ |
24
|
};
|
30
|
};
|
25
|
},
|
31
|
},
|
26
|
components: {
|
32
|
components: {
|
27
|
- focus: focus,
|
|
|
28
|
- titleImage: titleImage,
|
|
|
29
|
- goods: goods
|
33
|
+ focus,
|
|
|
34
|
+ focusLeftRight,
|
|
|
35
|
+ titleImage,
|
|
|
36
|
+ goods
|
30
|
},
|
37
|
},
|
31
|
watch: {
|
38
|
watch: {
|
32
|
channel() {
|
39
|
channel() {
|
|
@@ -60,7 +67,6 @@ |
|
@@ -60,7 +67,6 @@ |
60
|
this.getResourcesData();
|
67
|
this.getResourcesData();
|
61
|
bus.$on('changeChannel', channel => {
|
68
|
bus.$on('changeChannel', channel => {
|
62
|
this.channel = channel;
|
69
|
this.channel = channel;
|
63
|
- this.getResourcesData();
|
|
|
64
|
});
|
70
|
});
|
65
|
}
|
71
|
}
|
66
|
};
|
72
|
};
|