Authored by lijing

合并代码

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