Authored by 王水玲

修改时间获取方式

... ... @@ -221,3 +221,7 @@ exports.tplPraiseToggle = function(req, res, next) {
res.jsonp(result);
}).catch(next);
};
exports.getServerTimes = function(req, res) {
res.jsonp(Math.round(new Date() / 1000));
};
... ...
... ... @@ -284,6 +284,7 @@ router.get('/feature/goods', feature.goods); // 批量获取商品信息
router.get('/feature/goods/detail', feature.goodsDetail); // 获取商品详情
router.get('/feature/floors/praise', feature.tplPraiseInfo); // 楼层点赞信息
router.get('/feature/floors/togglepraise', feature.tplPraiseToggle); // 楼层点赞/取消
router.get('/feature/getServerTimes', feature.getServerTimes); // 获取服务段时间
// 2016 年度账单
router.get('/annual-account', annualAccount.index);
... ...
... ... @@ -828,13 +828,16 @@ function activityPlan() {
let templateId = $('.template-id').val();
if (atlBo) {
let curTime = Math.round(new Date() / 1000);
$.ajax({
url: '//m.yohobuy.com/activity/feature/getServerTimes',
dataType: 'jsonp'
}).then(function(curTime) {
let showTimes = [];
let planTimes = [];
let localUrl = '';
let query = '';
qs.timeStamp = curTime;
qs.timeStamp = curTime || Math.round(new Date() / 1000);
Object.keys(qs).map((key, index) => {
if (index === 0) {
... ... @@ -875,6 +878,7 @@ function activityPlan() {
clearTimeout(countDown);
}, time);
}
});
}
}
... ...