...
|
...
|
@@ -11,6 +11,7 @@ const moment = require('moment'); |
|
|
const mRoot = '../models';
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const seckillModel = require(`${mRoot}/seckill`);
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
let headerData = headerModel.setNav({
|
|
|
navTitle: '秒杀活动',
|
...
|
...
|
@@ -18,6 +19,16 @@ let headerData = headerModel.setNav({ |
|
|
});
|
|
|
|
|
|
/**
|
|
|
* hotfix ios 6.5.5 版本隐藏设置提醒按钮
|
|
|
*/
|
|
|
const _iosHideRemindBtn = (products) => {
|
|
|
return _.map(products, goods => {
|
|
|
goods.hideRemind = true;
|
|
|
return goods;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* [时间缺0补0]
|
|
|
*/
|
|
|
const _timeFormat = (tick) => {
|
...
|
...
|
@@ -228,6 +239,10 @@ const indexData = (req, res, next) => { |
|
|
return fetchProductList(activityInfo, uid).then((resultProducts) => {
|
|
|
result.products = resultProducts;
|
|
|
|
|
|
if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') {
|
|
|
result.products = _iosHideRemindBtn(resultProducts);
|
|
|
}
|
|
|
|
|
|
res.json(result);
|
|
|
});
|
|
|
});
|
...
|
...
|
@@ -256,6 +271,9 @@ const getProductList = (req, res, next) => { |
|
|
};
|
|
|
|
|
|
return fetchProductList(activityInfo, uid).then(resultProducts => {
|
|
|
if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') {
|
|
|
resultProducts = _iosHideRemindBtn(resultProducts);
|
|
|
}
|
|
|
res.json({products: resultProducts});
|
|
|
}).catch(error => {
|
|
|
logger.error(error);
|
...
|
...
|
|