Showing
5 changed files
with
87 additions
and
3 deletions
@@ -111,14 +111,32 @@ const getActivityDetail = () => { | @@ -111,14 +111,32 @@ const getActivityDetail = () => { | ||
111 | }); | 111 | }); |
112 | }; | 112 | }; |
113 | 113 | ||
114 | +const getHomeActivity = () => { | ||
115 | + var params = { | ||
116 | + method: 'app.outlets.activityGet', | ||
117 | + platform: 2, | ||
118 | + size: 0, | ||
119 | + yh_channel: 1, | ||
120 | + type: 0, | ||
121 | + sort: 2, | ||
122 | + client_type: 'h5' | ||
123 | + }; | ||
124 | + | ||
125 | + return api.get('', sign.apiSign(params)).then(res => { | ||
126 | + return res; | ||
127 | + }); | ||
128 | +}; | ||
129 | + | ||
130 | + | ||
114 | 131 | ||
115 | exports.getContent = () => { | 132 | exports.getContent = () => { |
116 | let floorsData = {}; | 133 | let floorsData = {}; |
117 | 134 | ||
118 | - return Promise.all([getNavData(), getOutletResource(), getGoodsList()]).then(data => { | 135 | + return Promise.all([getNavData(), getOutletResource(), getHomeActivity(), getGoodsList()]).then(data => { |
119 | floorsData.nav = data[0] || []; | 136 | floorsData.nav = data[0] || []; |
120 | floorsData.content = data[1] || []; | 137 | floorsData.content = data[1] || []; |
121 | - floorsData.goods = data[2]; | 138 | + floorsData.activity = data[2] || []; |
139 | + floorsData.goods = data[3]; | ||
122 | 140 | ||
123 | return floorsData; | 141 | return floorsData; |
124 | }); | 142 | }); |
1 | +{{log activity}} | ||
2 | +{{! 活动列表}} | ||
3 | +{{#activity}} | ||
4 | + {{> resources/acivity-outlets}} | ||
5 | +{{/activity}} | ||
6 | + | ||
1 | {{#content}} | 7 | {{#content}} |
2 | {{! 头部banner}} | 8 | {{! 头部banner}} |
3 | {{#if focus}} | 9 | {{#if focus}} |
@@ -48,4 +54,4 @@ | @@ -48,4 +54,4 @@ | ||
48 | {{> resources/plus-star}} | 54 | {{> resources/plus-star}} |
49 | {{/if}} | 55 | {{/if}} |
50 | {{/content}} | 56 | {{/content}} |
51 | -{{log goods}} | 57 | + |
1 | +{{log data}} | ||
2 | +{{#data}} | ||
3 | + <div class="back-ground-white"> | ||
4 | + <img class="back-image" src="{{image coverUrl 640 300}}"> | ||
5 | + <div class="center-square"> | ||
6 | + <img class="logo" src="{{image logoUrl 150 100}}"></img> | ||
7 | + <div class="title">{{title}}</div> | ||
8 | + <div class="num">{{promotionName}} </div> | ||
9 | + <div class="time">—{{startLeftTime}}—</div> | ||
10 | + </div> | ||
11 | + </div> | ||
12 | +{{/data}} |
public/scss/outlet/_activity.css
0 → 100644
1 | +.outlet-page { | ||
2 | + .back-ground-white { | ||
3 | + position: relative; | ||
4 | + margin: 20px 0; | ||
5 | + width: 100%; | ||
6 | + height: 300px; | ||
7 | + | ||
8 | + .back-image { | ||
9 | + width: 100%; | ||
10 | + height: auto; | ||
11 | + } | ||
12 | + .center-square { | ||
13 | + position: absolute; | ||
14 | + background: #fffefa; | ||
15 | + opacity: 0.9; | ||
16 | + top: 50px; | ||
17 | + width: 70%; | ||
18 | + margin-left: 15%; | ||
19 | + height: 200px; | ||
20 | + } | ||
21 | + | ||
22 | + .logo { | ||
23 | + opacity: 1; | ||
24 | + width: 100px; | ||
25 | + height: auto; | ||
26 | + } | ||
27 | + | ||
28 | + .num { | ||
29 | + text-align: center; | ||
30 | + font-size: 28px; | ||
31 | + color: #ff0705;; | ||
32 | + } | ||
33 | + | ||
34 | + .title { | ||
35 | + text-align: center; | ||
36 | + font-size: 28px; | ||
37 | + font-weight: bold; | ||
38 | + } | ||
39 | + | ||
40 | + .time { | ||
41 | + text-align: center; | ||
42 | + font-size: 22px; | ||
43 | + } | ||
44 | + | ||
45 | + } | ||
46 | + | ||
47 | +} |
-
Please register or login to post a comment