...
|
...
|
@@ -26,13 +26,15 @@ const searchAPI = require('./search-api'); |
|
|
const homeService = require('./home-service');
|
|
|
const HeaderModel = require('../../../doraemon/models/header');
|
|
|
|
|
|
const UserService = require('../../passport/models/user-service');
|
|
|
|
|
|
const BLANK_STR = ' ';
|
|
|
|
|
|
const cachedRequestData = {};
|
|
|
|
|
|
const _getProductAdditionInfoAsync = (data) => {
|
|
|
return co(function * () {
|
|
|
let productId = data.id;
|
|
|
let productId = data.id || 0;
|
|
|
let uid = data.uid ? data.uid : 0;
|
|
|
let skn = data.erpProductId;
|
|
|
let brandId = data.brand.id ? data.brand.id : 0;
|
...
|
...
|
@@ -153,7 +155,7 @@ const _getVipDataByProductBaseInfo = (data, vipLevel, uid) => { |
|
|
|
|
|
if (data.productPriceBo.vipPrices) {
|
|
|
if (vipLevel) {
|
|
|
data.productPriceBo.vipPrices.for(value => {
|
|
|
data.productPriceBo.vipPrices.forEach(value => {
|
|
|
vipData.prices.push({
|
|
|
level: value.vipLevel,
|
|
|
price: value.vipPrice,
|
...
|
...
|
@@ -1341,10 +1343,12 @@ const _getSeoByGoodsInfo = function(goodsInfo, navs) { |
|
|
/**
|
|
|
* 获取某一个商品详情主页面
|
|
|
*/
|
|
|
const showMainAsync = data => {
|
|
|
const showMainAsync = (data) => {
|
|
|
return co(function * () {
|
|
|
let vipLevel = yield UserService.getVipLevelAsync(data.uid);
|
|
|
|
|
|
let result = {};
|
|
|
let currentUserProductInfo = _.curry(_detailDataPkg)(_, data.uid, data.vipLevel);
|
|
|
let currentUserProductInfo = _.curry(_detailDataPkg)(_, data.uid, vipLevel);
|
|
|
|
|
|
// 获取商品信息
|
|
|
let productInfo = yield productAPI.getProductAsync(data.pid, data.uid).then(currentUserProductInfo);
|
...
|
...
|
|