...
|
...
|
@@ -480,30 +480,30 @@ function parseActivityTimeLsit(json, focusTime=0) { |
|
|
activityTimeItem.over = true;
|
|
|
}else{
|
|
|
activityTimeItem.now = true;
|
|
|
focusIndex || (activityTimeItem.focus = focusIndex = true);
|
|
|
// focusIndex || (activityTimeItem.focus = focusIndex = true);
|
|
|
}
|
|
|
} else {
|
|
|
activityTimeItem.wait = true;
|
|
|
}
|
|
|
});
|
|
|
if (newActivityTimeList.length && newActivityTimeList.findIndex(activityTimeItem => activityTimeItem.focus) < 0) {
|
|
|
let i = newActivityTimeList.length;
|
|
|
// let i = newActivityTimeList.length;
|
|
|
|
|
|
// 没有focus的活动,则focus 最后一个 over 的活动
|
|
|
while (i) {
|
|
|
let activityTimeItem = newActivityTimeList[i - 1];
|
|
|
// // 没有focus的活动,则focus 最后一个 over 的活动
|
|
|
// while (i) {
|
|
|
// let activityTimeItem = newActivityTimeList[i - 1];
|
|
|
|
|
|
if (activityTimeItem.over) {
|
|
|
activityTimeItem.focus = true;
|
|
|
break;
|
|
|
}
|
|
|
i = i - 1;
|
|
|
}
|
|
|
// if (activityTimeItem.over) {
|
|
|
// activityTimeItem.focus = true;
|
|
|
// break;
|
|
|
// }
|
|
|
// i = i - 1;
|
|
|
// }
|
|
|
|
|
|
// 没有over,全部都是未开抢,则focus第一个
|
|
|
if (!i) {
|
|
|
// // 没有over,全部都是未开抢,则focus第一个
|
|
|
// if (!i) {
|
|
|
newActivityTimeList[0].focus = true;
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
let focusActivity = newActivityTimeList.find(activityTimeItem => activityTimeItem.focus);
|
...
|
...
|
|