...
|
...
|
@@ -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,14 +110,7 @@ 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,
|
|
|
});
|
|
|
|
|
|
if (!req.xhr) {
|
|
|
const index = (req, res) => {
|
|
|
return res.render('seckill', {
|
|
|
title: '秒杀活动',
|
|
|
pageHeader: headerData,
|
...
|
...
|
@@ -120,8 +118,13 @@ const index = (req, res, next) => { |
|
|
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
|
...
|
...
|
|