channel.vue
9.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<template>
<LayoutApp :show-back="true">
<div class="body" ref="body">
<div v-for="(item, index) in list2" :key="index">
<template v-if="item.template_name == 'focus'">
<Slider :list="list"></Slider>
</template>
<template v-if="item.template_name == 'hotSeries'">
<Hot :list="item.data"></Hot>
</template>
<template v-if="item.template_name == 'single_image'">
<Banner :linkUrl="linkUrl" :imgUrl="imgUrl"></Banner>
</template>
<template v-if="item.template_name == 'twoPicture'">
<TwoBanner :list="item.data"></TwoBanner>
</template>
</div>
</div>
</LayoutApp>
</template>
<script>
import Slider from './components/slider'; // 轮播图
import Banner from './components/banner'; // 一张图广告位
import TwoBanner from './components/twoBanner'; // 两张图广告位
import Hot from './components/hot'; // 热门系列
export default {
data() {
return {
list: [
{
url: 'http://www.didichuxing.com/',
image: '//webapp.didistatic.com/static/webapp/shield/cube-ui-examples-slide01.png'
},
{
url: 'http://www.didichuxing.com/',
image: '//webapp.didistatic.com/static/webapp/shield/cube-ui-examples-slide01.png'
}
],
linkUrl: 'https://www.baidu.com',
imgUrl: 'https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/baike/pic/item/cb8065380cd79123d7648113a7345982b3b780d4.jpg',
list2: [
{
"data": [
{
"bgColor": "",
"src": "http://img10.static.yhbimg.com/yhb-img01/2017/07/26/16/01d47fc95f71a19469f38a19c7c843fe43.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "https://m.yohobuy.com/?title=标题&openby:yohobuy={\"action\":\"go.collagehome\",\"params\":{\"title\":\"标题\"}}"
},
{
"bgColor": "",
"src": "http://img10.static.yhbimg.com/yhb-img01/2017/07/26/16/01e90704cc16d5a32a1680ae1d415426c6.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "https://m.yohobuy.com/groupPurchase?activityId=56&type=2&title=模式2测试&openby:yohobuy={\"action\":\"go.activitytemplate\",\"params\":{\"activityId\":\"56\",\"type\":\"2\",\"title\":\"模式2测试\"}}"
},
{
"bgColor": "",
"src": "http://img10.static.yhbimg.com/yhb-img01/2017/07/27/09/01cc06fea3c1d22375abcd90836759f85f.png?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://m.yohobuy.com/groupPurchase?activityId=58&type=2&title=团购状态验证&openby:yohobuy={\"action\":\"go.activitytemplate\",\"params\":{\"activityId\":\"58\",\"type\":\"2\",\"title\":\"团购状态验证\"}}"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2017/09/20/09/01cf74dac1b0a354b82dc894dc66634352.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "https://list.m.yohobuy.com/?specialsale_id=2&gender=1,3&actiontype=2&cover_url=http://img10.static.yhbimg.com/couponImg/2018/08/27/10/01021a4ec4029934bcffca8ee912f61654.jpg&openby:yohobuy={\"action\":\"go.list\",\"params\":{\"actiontype\":\"2\",\"cover_url\":\"http://img10.static.yhbimg.com/couponImg/2018/08/27/10/01021a4ec4029934bcffca8ee912f61654.jpg\",\"gender\":\"1,3\",\"specialsale_id\":\"2\"}}"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2017/10/13/18/018044cceeb5a2afe6223a1412ccda89b9.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "https://search.m.yohobuy.com/?productPool=680&title=618抢先购-6.1折封顶&openby:yohobuy={\"action\":\"go.poollist\",\"params\":{\"title\":\"618抢先购-6.1折封顶\",\"productPool\":\"680\"}}"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2018/03/06/11/019dea67754e6c4c08711b118c3d050891.JPG?imageView2/{mode}/w/{width}/h/{height}",
"title": "秒杀",
"url": "http://m.yohobuy.com/product/seckill?type=2&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"type\":\"2\"},\"type\":\"2\",\"url\":\"http://m.yohobuy.com/product/seckill\"}}"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2018/03/06/11/016a0402a7ff364326046b215f4d088cb8.JPG?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "https://m.yohobuy.com/home/family?openby:yohobuy={\"action\":\"go.family\"}"
}
],
"focus_type": "2",
"original_template_id": 1,
"template_id": "1",
"template_intro": "焦点图",
"template_name": "focus"
},
{
"template_name": "hotSeries",
"data": [
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "哈哈",
"series_id": "1"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "耐克",
"series_id": "2"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "哈哈",
"series_id": "1"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "耐克",
"series_id": "2"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "哈哈",
"series_id": "1"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "耐克",
"series_id": "2"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "耐克",
"series_id": "2"
},
],
"template_intro": "热门系列",
"template_id": "1"
},
{
"template_name": "single_image",
"data": [
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "",
"series_id": "1"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "",
"series_id": "2"
}
],
"template_intro": "热门系列",
"template_id": "1"
},
{
"template_name": "twoPicture",
"data": [
{
"src": "http://img11.static.yhbimg.com/yhb-img01/2019/09/24/14/01bdf0e379025b33c9690861b843dbd966.jpg",
"id": "",
"url": "https://m.yohobuy.com/?openby:yohobuy={'action':'go.bargainlist'}"
},
{
"src": "http://img11.static.yhbimg.com/yhb-img01/2019/09/24/14/01bdf0e379025b33c9690861b843dbd966.jpg",
"id": "",
"url": "https://m.yohobuy.com/?openby:yohobuy={'action':'go.bargainlist'}"
},
],
"template_intro": "热门系列",
"template_id": "1"
},
{
"template_name": "single_image",
"data": [
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "",
"series_id": "1"
},
{
"image_url": "http://img11.static.yhbimg.com/yhb-img01/2017/07/26/16/0186f834d5a21f26717254407c28fc3c53.jpg",
"series_name": "",
"series_id": "2"
}
],
"template_intro": "热门系列",
"template_id": "1"
},
],
}
},
components: {
Slider,
Banner,
TwoBanner,
Hot
}
};
</script>
<style lang="scss" scoped>
.footer {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
}
.body {
height: 100%;
overflow-y: auto;
padding: 0 40px;
}
</style>