Authored by zhangxiaoru

merge

@@ -158,6 +158,8 @@ const index = (req, res, next) => { @@ -158,6 +158,8 @@ const index = (req, res, next) => {
158 if (focusIndex !== -1) { 158 if (focusIndex !== -1) {
159 result.activitys[focusIndex].focus = true; 159 result.activitys[focusIndex].focus = true;
160 focusIndex = true; 160 focusIndex = true;
  161 + } else {
  162 + focusIndex = false;
161 } 163 }
162 } 164 }
163 165
@@ -179,12 +181,13 @@ const index = (req, res, next) => { @@ -179,12 +181,13 @@ const index = (req, res, next) => {
179 181
180 if (nowTime < nextTime) { // 下一个时间段与当前时间来区别是否正在抢购 182 if (nowTime < nextTime) { // 下一个时间段与当前时间来区别是否正在抢购
181 activity.now = true; 183 activity.now = true;
182 - focusIndex || (activity.focus = true); 184 + focusIndex || (activity.focus = focusIndex = true);
183 } else { 185 } else {
184 activity.over = true; 186 activity.over = true;
185 } 187 }
186 } else { // 大于这个时间段但是后面没有秒抢时间端了,则依然显示抢购中 188 } else { // 大于这个时间段但是后面没有秒抢时间端了,则依然显示抢购中
187 activity.now = true; 189 activity.now = true;
  190 + focusIndex || (activity.focus = focusIndex = true);
188 } 191 }
189 } else { 192 } else {
190 activity.wait = true; 193 activity.wait = true;
@@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
8 const helpers = global.yoho.helpers; 8 const helpers = global.yoho.helpers;
9 9
10 module.exports = (req, res, next) => { 10 module.exports = (req, res, next) => {
11 - console.log('....');  
12 if (!req.user.uid) { 11 if (!req.user.uid) {
13 if (req.xhr) { 12 if (req.xhr) {
14 return res.json({ 13 return res.json({