Authored by biao

update for activity

... ... @@ -27,12 +27,12 @@ exports.activity = (req, res) => {
exports.willBeEnd = (req, res) => {
outletModel.willBeEnd().then(result => {
res.render('outlet/willBeEnd', Object.assign(renderData, result));
res.render('outlet/will-end', Object.assign(renderData, result));
});
};
exports.willBeCome = (req, res) => {
outletModel.willBeCome().then(result => {
res.render('outlet/willBeCome', Object.assign(renderData, result));
res.render('outlet/will-start', Object.assign(renderData, result));
});
};
... ...
... ... @@ -188,12 +188,18 @@ exports.getActivity = (id) => {
exports.willBeEnd = () => {
return getHomeActivity(3).then(res => {
return res;
var data = {};
data.activity = res;
return data;
});
};
exports.willBeCome = () => {
return getHomeActivity(4).then(res => {
var data = {};
data.activity = res;
return res;
});
};
... ...
{{# activity}}
{{> resources/acivity-outlets}}
{{/ activity}}
... ...
{{# activity}}
{{> resources/acivity-outlets}}
{{/ activity}}
... ...
... ... @@ -4,8 +4,8 @@
{{#each data}}
<li><a href="{{url}}">{{name}}</a></li>
{{/each}}
<li><a href="{{url}}" data-url="outlet/willBeEnd">即将结束</a></li>
<li><a href="{{url}}" data-url="/outlet/willBeCome">上线预告</a></li>
<li><a href="willBeEnd">即将结束</a></li>
<li><a href="willBeCome">上线预告</a></li>
</ul>
</nav>
{{/nav}}
... ...
... ... @@ -4,7 +4,7 @@
'use strict';
const library = '../../../library';
const library = '../library';
const helpers = require(`${library}/helpers`);
const timeFormat = {
... ...