...
|
...
|
@@ -69,38 +69,40 @@ |
|
|
page: ++_this.page
|
|
|
}
|
|
|
}).then(data => {
|
|
|
if (_this.page === data.pageTotal) {
|
|
|
if (data.pageTotal && _this.page === data.pageTotal) {
|
|
|
_this.busy = true;
|
|
|
} else {
|
|
|
_this.busy = false;
|
|
|
}
|
|
|
|
|
|
data.productList.forEach(function(o){
|
|
|
if (!o.productSkn) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!_this.keys[o.productId]) {
|
|
|
_this.keys[o.productId] = true;
|
|
|
|
|
|
let discountPrice = false;
|
|
|
|
|
|
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
|
|
|
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
|
|
|
if (data.productList) {
|
|
|
data.productList.forEach(function(o){
|
|
|
if (!o.productSkn) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
_this.productData.push({
|
|
|
fav_id: o.productId,
|
|
|
link: o.goodsId && o.cnAlphabet ? o.productId : '',
|
|
|
imgUrl: o.image,
|
|
|
title: o.productName,
|
|
|
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
|
|
|
discountPrice: discountPrice,
|
|
|
sellOut: o.storage <= 0,
|
|
|
invalidGoods: o.status === 0
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
if (!_this.keys[o.productId]) {
|
|
|
_this.keys[o.productId] = true;
|
|
|
|
|
|
let discountPrice = false;
|
|
|
|
|
|
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
|
|
|
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
|
|
|
}
|
|
|
|
|
|
_this.productData.push({
|
|
|
fav_id: o.productId,
|
|
|
link: o.goodsId && o.cnAlphabet ? o.productId : '',
|
|
|
imgUrl: o.image,
|
|
|
title: o.productName,
|
|
|
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
|
|
|
discountPrice: discountPrice,
|
|
|
sellOut: o.storage <= 0,
|
|
|
invalidGoods: o.status === 0
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
_this.nullbox = _this.productData.length ? 'hide' : '';
|
|
|
}).fail(() => {
|
...
|
...
|
|