Authored by 陈轩

fix YH-5062

... ... @@ -31,7 +31,7 @@ const _timeFormat = (tick) => {
function _productAddFlag(productList) {
let now = Date.now();
productList.sort((a, b) => a.orderBy < b.orderBy);
productList.sort((a, b) => -(a.orderBy - b.orderBy));
productList.forEach(product => {
if (now < product.startTime * 1000) { // 未开抢
product.wait = true;
... ... @@ -97,7 +97,7 @@ const index = (req, res, next) => {
});
}
result.activitys = resultActivity.data.secKillProductVoList.sort((a, b) => a.startTime > b.startTime);
result.activitys = resultActivity.data.secKillProductVoList.sort((a, b) => a.startTime - b.startTime); // orderBy startTime ASC
let nowTime = Date.parse(new Date());
result.activitys.forEach((activity, i) => {
... ...