Authored by runner

商品库存为0等修改

... ... @@ -21,7 +21,7 @@ exports.index = (req, res) => {
});
let categoryId = req.query.category_id;
let yhChannel = req.query.yh_channel || 1;
let yhChannel = req.query.yh_channel || 0;
let contentcode = req.query.content_code;
outletModel.getContent(categoryId, yhChannel, contentcode).then(result => {
... ...
... ... @@ -26,6 +26,12 @@
{{# isSoonSoldOut}}
<p class="few-tag">即将售罄</p>
{{/ isSoonSoldOut}}
{{#if noStorage}}
<div class="no-storage">
<div class="no-storage-img"></div>
</div>
{{/if}}
</div>
<div class="good-detail-text">
<div class="name">
... ...
... ... @@ -4783,6 +4783,27 @@ a{
font-size: 0.45rem;
line-height: 0.7rem;
}
.good-detail-img .no-storage{
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
opacity: 0.4;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
z-index: 10;
position: absolute;
top: 0;
}
.good-detail-img .no-storage .no-storage-img{
display: block;
width: 2.25rem;
height: 2.25rem;
margin-left: 2.325rem;
margin-top: 3.475rem;
background-image: url('../img/product/bag_moren.png');
background-repeat: no-repeat;
background-size: contain;
}
.good-detail-text .name a{
display: block;
margin: 0.5rem 0;
... ... @@ -5665,7 +5686,7 @@ a{
margin-top: 0;
position: fixed;
width: 16rem;
padding: 0.125rem 0;
padding: 0.75rem 0;
z-index: 9;
background: #000;
}
... ... @@ -5867,6 +5888,7 @@ a{
}
.star-index-bg{
background: #000;
overflow: hidden;
}
.star-index-bg .star-page{
background: #000;
... ...
This diff could not be displayed because it is too large.
... ... @@ -77,6 +77,7 @@ if ($('.outlet-category-nav').length > 0) {
}).goto(0);
}
//更多活动按钮
if ($('.back-ground-white').length > 10) {
$('.more-activity').show();
$('.back-ground-white').each(function(index, e) {
... ...
... ... @@ -94,6 +94,28 @@
font-size: 18px;
line-height: 28px;
}
.no-storage {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
opacity: 0.4;
z-index: 10;
position: absolute;
top: 0;
.no-storage-img {
display: block;
width: 90px;
height: 90px;
margin-left: 93px;
margin-top: 139px;
background-image: resolve("product/bag_moren.png");
background-repeat: no-repeat;
background-size: contain;
}
}
}
.good-detail-text {
... ...
... ... @@ -43,6 +43,11 @@ exports.processProductList = (list, options) => {
return;
}
//如果库存为0,显示已抢完
if (product.storageNum === 0){
product.noStorage = true;
}
// 市场价和售价一样,则不显示市场价
if (product.marketPrice === product.salesPrice) {
product.marketPrice = false;
... ... @@ -103,7 +108,7 @@ exports.processProductList = (list, options) => {
pruductList.push(product);
});
console.log(pruductList);
return pruductList;
};
... ...