Authored by runner

商品库存为0等修改

@@ -21,7 +21,7 @@ exports.index = (req, res) => { @@ -21,7 +21,7 @@ exports.index = (req, res) => {
21 }); 21 });
22 22
23 let categoryId = req.query.category_id; 23 let categoryId = req.query.category_id;
24 - let yhChannel = req.query.yh_channel || 1; 24 + let yhChannel = req.query.yh_channel || 0;
25 let contentcode = req.query.content_code; 25 let contentcode = req.query.content_code;
26 26
27 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => { 27 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => {
@@ -26,6 +26,12 @@ @@ -26,6 +26,12 @@
26 {{# isSoonSoldOut}} 26 {{# isSoonSoldOut}}
27 <p class="few-tag">即将售罄</p> 27 <p class="few-tag">即将售罄</p>
28 {{/ isSoonSoldOut}} 28 {{/ isSoonSoldOut}}
  29 +
  30 + {{#if noStorage}}
  31 + <div class="no-storage">
  32 + <div class="no-storage-img"></div>
  33 + </div>
  34 + {{/if}}
29 </div> 35 </div>
30 <div class="good-detail-text"> 36 <div class="good-detail-text">
31 <div class="name"> 37 <div class="name">
@@ -4783,6 +4783,27 @@ a{ @@ -4783,6 +4783,27 @@ a{
4783 font-size: 0.45rem; 4783 font-size: 0.45rem;
4784 line-height: 0.7rem; 4784 line-height: 0.7rem;
4785 } 4785 }
  4786 +.good-detail-img .no-storage{
  4787 + width: 100%;
  4788 + height: 100%;
  4789 + overflow: hidden;
  4790 + background-color: #000;
  4791 + opacity: 0.4;
  4792 + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
  4793 + z-index: 10;
  4794 + position: absolute;
  4795 + top: 0;
  4796 +}
  4797 +.good-detail-img .no-storage .no-storage-img{
  4798 + display: block;
  4799 + width: 2.25rem;
  4800 + height: 2.25rem;
  4801 + margin-left: 2.325rem;
  4802 + margin-top: 3.475rem;
  4803 + background-image: url('../img/product/bag_moren.png');
  4804 + background-repeat: no-repeat;
  4805 + background-size: contain;
  4806 +}
4786 .good-detail-text .name a{ 4807 .good-detail-text .name a{
4787 display: block; 4808 display: block;
4788 margin: 0.5rem 0; 4809 margin: 0.5rem 0;
@@ -5665,7 +5686,7 @@ a{ @@ -5665,7 +5686,7 @@ a{
5665 margin-top: 0; 5686 margin-top: 0;
5666 position: fixed; 5687 position: fixed;
5667 width: 16rem; 5688 width: 16rem;
5668 - padding: 0.125rem 0; 5689 + padding: 0.75rem 0;
5669 z-index: 9; 5690 z-index: 9;
5670 background: #000; 5691 background: #000;
5671 } 5692 }
@@ -5867,6 +5888,7 @@ a{ @@ -5867,6 +5888,7 @@ a{
5867 } 5888 }
5868 .star-index-bg{ 5889 .star-index-bg{
5869 background: #000; 5890 background: #000;
  5891 + overflow: hidden;
5870 } 5892 }
5871 .star-index-bg .star-page{ 5893 .star-index-bg .star-page{
5872 background: #000; 5894 background: #000;
This diff could not be displayed because it is too large.
@@ -77,6 +77,7 @@ if ($('.outlet-category-nav').length > 0) { @@ -77,6 +77,7 @@ if ($('.outlet-category-nav').length > 0) {
77 }).goto(0); 77 }).goto(0);
78 } 78 }
79 79
  80 +//更多活动按钮
80 if ($('.back-ground-white').length > 10) { 81 if ($('.back-ground-white').length > 10) {
81 $('.more-activity').show(); 82 $('.more-activity').show();
82 $('.back-ground-white').each(function(index, e) { 83 $('.back-ground-white').each(function(index, e) {
@@ -94,6 +94,28 @@ @@ -94,6 +94,28 @@
94 font-size: 18px; 94 font-size: 18px;
95 line-height: 28px; 95 line-height: 28px;
96 } 96 }
  97 +
  98 + .no-storage {
  99 + width: 100%;
  100 + height: 100%;
  101 + overflow: hidden;
  102 + background-color: #000;
  103 + opacity: 0.4;
  104 + z-index: 10;
  105 + position: absolute;
  106 + top: 0;
  107 +
  108 + .no-storage-img {
  109 + display: block;
  110 + width: 90px;
  111 + height: 90px;
  112 + margin-left: 93px;
  113 + margin-top: 139px;
  114 + background-image: resolve("product/bag_moren.png");
  115 + background-repeat: no-repeat;
  116 + background-size: contain;
  117 + }
  118 + }
97 } 119 }
98 120
99 .good-detail-text { 121 .good-detail-text {
@@ -43,6 +43,11 @@ exports.processProductList = (list, options) => { @@ -43,6 +43,11 @@ exports.processProductList = (list, options) => {
43 return; 43 return;
44 } 44 }
45 45
  46 + //如果库存为0,显示已抢完
  47 + if (product.storageNum === 0){
  48 + product.noStorage = true;
  49 + }
  50 +
46 // 市场价和售价一样,则不显示市场价 51 // 市场价和售价一样,则不显示市场价
47 if (product.marketPrice === product.salesPrice) { 52 if (product.marketPrice === product.salesPrice) {
48 product.marketPrice = false; 53 product.marketPrice = false;
@@ -103,7 +108,7 @@ exports.processProductList = (list, options) => { @@ -103,7 +108,7 @@ exports.processProductList = (list, options) => {
103 108
104 pruductList.push(product); 109 pruductList.push(product);
105 }); 110 });
106 - 111 + console.log(pruductList);
107 return pruductList; 112 return pruductList;
108 }; 113 };
109 114