Authored by biao

update for activity

@@ -27,12 +27,12 @@ exports.activity = (req, res) => { @@ -27,12 +27,12 @@ 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 - res.render('outlet/willBeEnd', Object.assign(renderData, result)); 30 + res.render('outlet/will-end', Object.assign(renderData, result));
31 }); 31 });
32 }; 32 };
33 33
34 exports.willBeCome = (req, res) => { 34 exports.willBeCome = (req, res) => {
35 outletModel.willBeCome().then(result => { 35 outletModel.willBeCome().then(result => {
36 - res.render('outlet/willBeCome', Object.assign(renderData, result)); 36 + res.render('outlet/will-start', Object.assign(renderData, result));
37 }); 37 });
38 }; 38 };
@@ -188,12 +188,18 @@ exports.getActivity = (id) => { @@ -188,12 +188,18 @@ exports.getActivity = (id) => {
188 188
189 exports.willBeEnd = () => { 189 exports.willBeEnd = () => {
190 return getHomeActivity(3).then(res => { 190 return getHomeActivity(3).then(res => {
191 - return res; 191 + var data = {};
  192 +
  193 + data.activity = res;
  194 + return data;
192 }); 195 });
193 }; 196 };
194 197
195 exports.willBeCome = () => { 198 exports.willBeCome = () => {
196 return getHomeActivity(4).then(res => { 199 return getHomeActivity(4).then(res => {
  200 + var data = {};
  201 +
  202 + data.activity = res;
197 return res; 203 return res;
198 }); 204 });
199 }; 205 };
  1 +{{# activity}}
  2 +{{> resources/acivity-outlets}}
  3 +{{/ activity}}
  1 +{{# activity}}
  2 +{{> resources/acivity-outlets}}
  3 +{{/ activity}}
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 {{#each data}} 4 {{#each data}}
5 <li><a href="{{url}}">{{name}}</a></li> 5 <li><a href="{{url}}">{{name}}</a></li>
6 {{/each}} 6 {{/each}}
7 - <li><a href="{{url}}" data-url="outlet/willBeEnd">即将结束</a></li>  
8 - <li><a href="{{url}}" data-url="/outlet/willBeCome">上线预告</a></li> 7 + <li><a href="willBeEnd">即将结束</a></li>
  8 + <li><a href="willBeCome">上线预告</a></li>
9 </ul> 9 </ul>
10 </nav> 10 </nav>
11 {{/nav}} 11 {{/nav}}
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 'use strict'; 5 'use strict';
6 6
7 -const library = '../../../library'; 7 +const library = '../library';
8 const helpers = require(`${library}/helpers`); 8 const helpers = require(`${library}/helpers`);
9 9
10 const timeFormat = { 10 const timeFormat = {