Authored by 刘传洋

m

... ... @@ -848,7 +848,7 @@ const getRecommendProduct = (channel, uid, udid, page) => {
*/
const getTogetherProduct = (page) => {
return co(function * (){
return co(function * () {
let result = {
code: 200,
message: '',
... ... @@ -866,7 +866,7 @@ const getTogetherProduct = (page) => {
let together = yield cartApi.togetherProduct(page);
if(!_.get(together, 'data.goods')) {
if (!_.get(together, 'data.goods')) {
return result;
}
... ... @@ -878,6 +878,7 @@ const getTogetherProduct = (page) => {
let item = {
id: it.id,
skn: it.product_skn,
// it.url,
href: it.url,
title: it.product_name,
... ... @@ -887,7 +888,7 @@ const getTogetherProduct = (page) => {
};
// 商品链接
/*let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
/* let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
let firstGoods = it.goods_list && it.goods_list[0];
let productSkc = firstGoods && firstGoods.product_skc;
... ... @@ -905,7 +906,7 @@ const getTogetherProduct = (page) => {
result.data.hasPrev = false;
}
if(!result.data.item || result.data.item.length < 6) {
if (!result.data.item || result.data.item.length < 6) {
result.data.hasNext = false;
}
... ...
... ... @@ -302,7 +302,8 @@ function getFineProduct(page) {
}).then(function(d) {
return d;
/*if (d.code === 200 && d.data.item.length > 0) {
/* if (d.code === 200 && d.data.item.length > 0) {
$obj.html(' ');
togetherProductStr = togetherProductTemplate(d.data);
$obj.append($(togetherProductStr));
... ... @@ -347,7 +348,8 @@ function getTogetherProduct(page) {
data: page
}).then(function(d) {
return d;
/*if (d.code === 200 && d.data.item.length > 0) {
/* if (d.code === 200 && d.data.item.length > 0) {
$obj.html(' ');
togetherProductStr = togetherProductTemplate(d.data);
$obj.append($(togetherProductStr));
... ...
... ... @@ -93,7 +93,7 @@ loadSlideGoods();
function loadTogetherProduct(page) {
capi.getTogetherProduct(page).done(function(togetherInfo) {
$togetherSlide.html(togetherTpl(togetherInfo));
})/*.fail(function() {
});/* .fail(function() {
});*/
}
... ... @@ -101,12 +101,12 @@ function loadTogetherProduct(page) {
function loadFineProduct(page) {
capi.getFineProduct(page).done(function(fineInfo) {
$fineSlide.html(togetherTpl(fineInfo));
})/*.fail(function() {
});/* .fail(function() {
});*/
}
setTimeout(function(){
setTimeout(function() {
loadTogetherProduct(1);
loadFineProduct(1);
}, 0);
... ...