...
|
...
|
@@ -27,7 +27,6 @@ const shopAPI = require('./shop-api'); |
|
|
const searchAPI = require('./search-api');
|
|
|
const homeService = require('./home-service');
|
|
|
const HeaderModel = require('../../../doraemon/models/header');
|
|
|
const fake = require('./fake');
|
|
|
|
|
|
const BLANK_STR = ' ';
|
|
|
|
...
|
...
|
@@ -435,41 +434,41 @@ const getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
|
|
// 显示获取限购码按钮
|
|
|
switch (showStatus) {
|
|
|
case 1: // 开售前/后,立即分享获得限购码(用户未领取限购码)
|
|
|
{
|
|
|
if (isBeginSale) {
|
|
|
{
|
|
|
if (isBeginSale) {
|
|
|
result.buyNow = true;
|
|
|
result.dis = true;
|
|
|
} else {
|
|
|
result.openSoon = true;
|
|
|
result.hasLimitedCode = false;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 2: // 开售后,限购码已抢光(用户未领取限购码)
|
|
|
{
|
|
|
result.buyNow = true;
|
|
|
result.dis = true;
|
|
|
} else {
|
|
|
result.openSoon = true;
|
|
|
result.limitedCodeSoldOut = true;
|
|
|
result.getLimitedCode = false;
|
|
|
result.hasLimitedCode = false;
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 2: // 开售后,限购码已抢光(用户未领取限购码)
|
|
|
{
|
|
|
result.buyNow = true;
|
|
|
result.dis = true;
|
|
|
result.limitedCodeSoldOut = true;
|
|
|
result.getLimitedCode = false;
|
|
|
result.hasLimitedCode = false;
|
|
|
break;
|
|
|
}
|
|
|
case 3: // 开售后,商品已经售罄
|
|
|
{
|
|
|
result.soldOut = true;
|
|
|
result.getLimitedCode = false;
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
result.soldOut = true;
|
|
|
result.getLimitedCode = false;
|
|
|
break;
|
|
|
}
|
|
|
case 4:// 开售后,立即购买(用户已领取限购码)
|
|
|
{
|
|
|
result.buyNow = true;
|
|
|
result.dis = false;
|
|
|
result.hasLimitedCode = true;
|
|
|
if (uid) { // 限购码失效
|
|
|
result.getLimitedCodeDis = true;
|
|
|
{
|
|
|
result.buyNow = true;
|
|
|
result.dis = false;
|
|
|
result.hasLimitedCode = true;
|
|
|
if (uid) { // 限购码失效
|
|
|
result.getLimitedCodeDis = true;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 5: // 开售前,限购码已被抢光(用户未领取限购码)
|
|
|
result.openSoon = true;
|
|
|
result.hasLimitedCode = true;
|
...
|
...
|
@@ -736,19 +735,19 @@ const detailDataPkg = (origin, uid, vipLevel) => { |
|
|
if (domainBrand.type && domainBrand.shopId) {
|
|
|
switch (parseInt(domainBrand.type)) {
|
|
|
case 1:
|
|
|
{
|
|
|
{
|
|
|
// 多品店不显示
|
|
|
banner = [];
|
|
|
break;
|
|
|
}
|
|
|
banner = [];
|
|
|
break;
|
|
|
}
|
|
|
case 2:
|
|
|
{
|
|
|
{
|
|
|
// TODO:单品店显示新版的店铺banner,item.php 210
|
|
|
let basisData = shopAPI.basisTemplateAsync(domainBrand.shopId);
|
|
|
let basisData = shopAPI.basisTemplateAsync(domainBrand.shopId);
|
|
|
|
|
|
banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;
|
|
|
break;
|
|
|
}
|
|
|
banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -823,15 +822,15 @@ function getDescriptionDataBySizeInfo(sizeInfo) { |
|
|
|
|
|
switch (sizeInfo.productDescBo.gender) {
|
|
|
case 1:
|
|
|
{
|
|
|
sex = '男款';
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
sex = '男款';
|
|
|
break;
|
|
|
}
|
|
|
case 2:
|
|
|
{
|
|
|
sex = '女款';
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
sex = '女款';
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
description.basic = [];
|
...
|
...
|
@@ -1192,25 +1191,25 @@ function getSizeAttrByMaxSortId(maxSortId, sizeList) { |
|
|
switch (maxSortId) {
|
|
|
case 1:
|
|
|
case 2:
|
|
|
{
|
|
|
attributeIds = [3, 4];
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
attributeIds = [3, 4];
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
case 3:
|
|
|
{
|
|
|
attributeIds = [6, 10];
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
attributeIds = [6, 10];
|
|
|
break;
|
|
|
}
|
|
|
case 6:
|
|
|
{
|
|
|
attributeIds = [13];
|
|
|
break;
|
|
|
}
|
|
|
{
|
|
|
attributeIds = [13];
|
|
|
break;
|
|
|
}
|
|
|
default:
|
|
|
{
|
|
|
attributeIds = [];
|
|
|
}
|
|
|
{
|
|
|
attributeIds = [];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let sizeInfos = [];
|
...
|
...
|
@@ -1281,7 +1280,8 @@ const getSizeInfo = (productSkn, maxSortId)=> { |
|
|
|
|
|
// 模特数据
|
|
|
let reference = getReferenceDataBySizeInfo(sizeInfo);
|
|
|
if(_.isEmpty(reference)){
|
|
|
|
|
|
if (_.isEmpty(reference)) {
|
|
|
result.reference = reference;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1343,8 +1343,8 @@ module.exports.showMainAsync = (data) => { |
|
|
result.productDetailPage = true;
|
|
|
result.detail = Object.assign(productInfo, sizeInfo);
|
|
|
result.statGoodsInfo = Object.assign({
|
|
|
fullSortName: navs.map(x => x.name).join('-')
|
|
|
},
|
|
|
fullSortName: navs.map(x => x.name).join('-')
|
|
|
},
|
|
|
productInfo.statGoodsInfo
|
|
|
);
|
|
|
|
...
|
...
|
|