...
|
...
|
@@ -12,6 +12,11 @@ const mRoot = '../models'; |
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const seckillModel = require(`${mRoot}/seckill`);
|
|
|
|
|
|
let headerData = headerModel.setNav({
|
|
|
navTitle: '秒杀活动',
|
|
|
navBtn: true,
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* [时间缺0补0]
|
|
|
*/
|
...
|
...
|
@@ -105,23 +110,21 @@ function fetchProductList(activityInfo, uid) { |
|
|
/**
|
|
|
* [秒杀列表页面]
|
|
|
*/
|
|
|
const index = (req, res, next) => {
|
|
|
let focusTime = Number.parseInt(req.query.time, 10) || 0;
|
|
|
let headerData = headerModel.setNav({
|
|
|
navTitle: '秒杀活动',
|
|
|
navBtn: true,
|
|
|
const index = (req, res) => {
|
|
|
return res.render('seckill', {
|
|
|
title: '秒杀活动',
|
|
|
pageHeader: headerData,
|
|
|
pageStyle: 'seckill-page',
|
|
|
pageFooter: true,
|
|
|
width750: true,
|
|
|
});
|
|
|
};
|
|
|
|
|
|
if (!req.xhr) {
|
|
|
return res.render('seckill', {
|
|
|
title: '秒杀活动',
|
|
|
pageHeader: headerData,
|
|
|
pageStyle: 'seckill-page',
|
|
|
pageFooter: true,
|
|
|
width750: true,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* [秒杀列表 页面 初始数据]
|
|
|
*/
|
|
|
const indexData = (req, res, next) => {
|
|
|
let focusTime = Number.parseInt(req.query.time, 10) || 0;
|
|
|
let result = {};
|
|
|
let uid = req.yoho.isApp && req.query.uid;
|
|
|
|
...
|
...
|
@@ -227,6 +230,7 @@ const index = (req, res, next) => { |
|
|
res.json(result);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -332,6 +336,7 @@ const checkAppVer = function(okVersion) { |
|
|
|
|
|
module.exports = {
|
|
|
index,
|
|
|
indexData,
|
|
|
getProductList,
|
|
|
remind,
|
|
|
checkAppVer
|
...
|
...
|
|