...
|
...
|
@@ -70,6 +70,7 @@ const index = (req, res, next) => { |
|
|
hbsHelper = {
|
|
|
helpers: _helpers
|
|
|
};
|
|
|
|
|
|
return seckillModel.queryActivity().then((resultActivity) => {
|
|
|
if (resultActivity.code !== 200) {
|
|
|
return next();
|
...
|
...
|
@@ -91,6 +92,7 @@ const index = (req, res, next) => { |
|
|
if (nowTime > activity.startTime) { // 当前时间大于这个时间段,已经开始和即将开始两种情况
|
|
|
if (i < result.activitys.length - 1) {
|
|
|
let nextTime = result.activitys[i + 1].startTime * 1000;
|
|
|
|
|
|
if (nowTime < nextTime) { // 下一个时间段与当前时间来区别是否正在抢购
|
|
|
activity.now = true;
|
|
|
activity.focus = true;
|
...
|
...
|
|