Authored by 514335620@qq.com

提交即将结束代码

@@ -27,6 +27,7 @@ exports.activity = (req, res) => { @@ -27,6 +27,7 @@ exports.activity = (req, res) => {
27 27
28 exports.willBeEnd = (req, res) => { 28 exports.willBeEnd = (req, res) => {
29 outletModel.willBeEnd().then(result => { 29 outletModel.willBeEnd().then(result => {
  30 + console.log(result);
30 res.render('outlet/will-end', Object.assign(renderData, result)); 31 res.render('outlet/will-end', Object.assign(renderData, result));
31 }); 32 });
32 }; 33 };
@@ -149,7 +149,7 @@ const getHomeActivity = (id) => { @@ -149,7 +149,7 @@ const getHomeActivity = (id) => {
149 platform: 2, 149 platform: 2,
150 size: 0, 150 size: 0,
151 yh_channel: 1, 151 yh_channel: 1,
152 - type: id, 152 + type: 0,
153 sort: 2, 153 sort: 2,
154 client_type: 'h5' 154 client_type: 'h5'
155 }; 155 };
@@ -187,19 +187,25 @@ exports.getActivity = (id) => { @@ -187,19 +187,25 @@ exports.getActivity = (id) => {
187 }; 187 };
188 188
189 exports.willBeEnd = () => { 189 exports.willBeEnd = () => {
190 - return getHomeActivity(3).then(res => {  
191 - var data = {}; 190 + return getHomeActivity().then(res => {
  191 + var data = {
  192 + activity: {
  193 + data: res
  194 + }
  195 + };
192 196
193 - data.activity = res;  
194 return data; 197 return data;
195 }); 198 });
196 }; 199 };
197 200
198 exports.willBeCome = () => { 201 exports.willBeCome = () => {
199 - return getHomeActivity(4).then(res => {  
200 - var data = {}; 202 + return getHomeActivity().then(res => {
  203 + var data = {
  204 + activity: {
  205 + data: res
  206 + }
  207 + };
201 208
202 - data.activity = res;  
203 - return res; 209 + return data;
204 }); 210 });
205 }; 211 };
1 -{{# activity}}  
2 -{{> resources/acivity-outlets}}  
3 -{{/ activity}} 1 +<div class="outlet-page">
  2 + {{log activity}}
  3 + {{# activity}}
  4 + {{#data}}
  5 + <a class="will-end-back" href="{{activityUrl}}" >
  6 + <img class="back-image" src="{{image coverUrl 640 300}}">
  7 + <div class="last-time">{{startLeftTime}}</div>
  8 + <div class="line-space">
  9 + <span class="num">{{promotionName}} </span>
  10 + <span class="title">{{title}}</span>
  11 + <img class="logo" src="{{image logoUrl 150 100}}"></img>
  12 + </div>
  13 + </a>
  14 + {{/data}}
  15 + {{/ activity}}
  16 +</div>
1 -{{# activity}}  
2 -{{> resources/acivity-outlets}}  
3 -{{/ activity}} 1 +<div class="outlet-page">
  2 + {{log activity}}
  3 + {{# activity}}
  4 + {{> resources/acivity-outlets}}
  5 + {{/ activity}}
  6 +</div>
  7 +
1 -{{log data}}  
2 {{#data}} 1 {{#data}}
3 <a class="back-ground-white {{#if hide}} hidden {{/if}}" href="{{activityUrl}}" > 2 <a class="back-ground-white {{#if hide}} hidden {{/if}}" href="{{activityUrl}}" >
4 <img class="back-image" src="{{image coverUrl 640 300}}"> 3 <img class="back-image" src="{{image coverUrl 640 300}}">
@@ -75,6 +75,57 @@ @@ -75,6 +75,57 @@
75 75
76 } 76 }
77 77
  78 + .will-end-back {
  79 + display: inline-block;
  80 + position: relative;
  81 + margin: 40px 0;
  82 + width: 100%;
  83 + height: 300px;
  84 +
  85 + .last-time {
  86 + position: absolute;
  87 + top: 10px;
  88 + margin-left: 15px;
  89 + height: 20px;
  90 + }
  91 +
  92 + .logo {
  93 + top: 10px;
  94 + width: 80px;
  95 + height: 60px;
  96 + margin-right: 20px;
  97 + float: right;
  98 + }
  99 +
  100 + .line-space {
  101 + width: 100%;
  102 + height: auto;
  103 + display: inline-block;
  104 + margin-bottom: 40px;
  105 + }
  106 +
  107 + .num {
  108 + top: 10px;
  109 + width: 100px;
  110 + font-size: 30px;
  111 + color: #ff0705;
  112 + margin-left: 30px;
  113 + }
  114 +
  115 + .title {
  116 + top: 10px;
  117 + margin-left: 30px;
  118 + width: 200px;
  119 + font-size: 28px;
  120 + font-weight: bold;
  121 + }
  122 +
  123 + .time {
  124 + font-size: 22px;
  125 + }
  126 +
  127 + }
  128 +
78 .outlet-discount { 129 .outlet-discount {
79 width: 100%; 130 width: 100%;
80 color: #fff; 131 color: #fff;