...
|
...
|
@@ -994,7 +994,7 @@ const _getSeckillData = (productSkn) => { |
|
|
'productSkn': 512581470,
|
|
|
'activityId': 4,
|
|
|
'startTime': 1375192655,
|
|
|
'endTime': 1475758971,
|
|
|
'endTime': 1475558971,
|
|
|
'formatSecKillPrice': '¥50.00',
|
|
|
'secKillPrice': 50,
|
|
|
'status': 1,
|
...
|
...
|
@@ -1042,6 +1042,7 @@ let getProductData = (data) => { |
|
|
}
|
|
|
|
|
|
return _getUserProfile(params.uid).then((user) => {
|
|
|
|
|
|
data.vipLevel = (user.data && user.data.vip_info && user.data.vip_info.cur_level) || '0';
|
|
|
data.isStudent = (user.data && user.data.vip_info && user.data.vip_info.is_student) ? true : false;
|
|
|
params.is_student = data.isStudent ? 1 : 0;
|
...
|
...
|
@@ -1071,31 +1072,45 @@ let getProductData = (data) => { |
|
|
|
|
|
Object.assign(finalResult.feedbacks, info[2]);
|
|
|
|
|
|
// 判断是否是秒杀
|
|
|
let is_secKill = result.isSecKill || true;
|
|
|
|
|
|
// 秒杀详情页
|
|
|
if (is_secKill && info[5]) {
|
|
|
|
|
|
let nowDate = Date.parse(new Date()) / 1000;
|
|
|
|
|
|
let end = nowDate > info[5].endTime ? true : false;
|
|
|
|
|
|
let nowDate = Date.parse(new Date()) / 1000;
|
|
|
if (!end) {
|
|
|
|
|
|
let notStart = nowDate < info[5].startTime ? true : false;
|
|
|
let notStart = nowDate < info[5].startTime ? true : false;
|
|
|
|
|
|
let startIng = info[5].startTime < nowDate && info[5].endTime > nowDate ? true : false;
|
|
|
let startIng = info[5].startTime < nowDate && info[5].endTime > nowDate ? true : false;
|
|
|
|
|
|
let end = nowDate > info[5].endTime ? true : false;
|
|
|
let leftCount = 0;
|
|
|
|
|
|
info[5].secKillSku.forEach(val => {
|
|
|
leftCount = leftCount + val.storageNum;
|
|
|
});
|
|
|
|
|
|
Object.assign(finalResult, {
|
|
|
isSecKill: {
|
|
|
notStart: notStart,
|
|
|
startIng: startIng,
|
|
|
startTime: info[5].startTime,
|
|
|
endTime: info[5].endTime,
|
|
|
secKillPrice: info[5].formatSecKillPrice,
|
|
|
noneLeft: leftCount === 0 ? true : false
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Object.assign(finalResult, {
|
|
|
isSecKill: {
|
|
|
notStart: notStart,
|
|
|
startIng: startIng,
|
|
|
end: startIng,
|
|
|
startTime: info[5].startTime,
|
|
|
endTime: info[5].endTime,
|
|
|
secKillPrice: info[5].formatSecKillPrice,
|
|
|
noneLeft: false
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/* 如果有咨询,显示咨询,否则显示常见问题 */
|
|
|
}
|
|
|
|
|
|
/* 如果有咨询,显示咨询,否则显示常见问题 */
|
|
|
|
|
|
if (info[4].total) {
|
|
|
finalResult.feedbacks.consultsNum = parseInt(info[4].total, 10);
|
|
|
|
...
|
...
|
|