Authored by 姜枫

修改店铺介绍不显示问题

@@ -60,15 +60,20 @@ const shop = { @@ -60,15 +60,20 @@ const shop = {
60 q.page = q.page || 1; 60 q.page = q.page || 1;
61 61
62 ShopData.getShopHeadData(domain, uid).then(result => { 62 ShopData.getShopHeadData(domain, uid).then(result => {
  63 +
63 data.banner = result; 64 data.banner = result;
64 - q.brand = result.brandId;  
65 - q.shop_id = result.shopId;  
66 - nav.push({  
67 - name: result.name  
68 - }); 65 + if (result.brandId) {
  66 + q.brand = result.brandId;
  67 + q.shop_id = result.shopId;
  68 + nav.push({
  69 + name: result.name
  70 + });
  71 + } else {
  72 + res.status(404);
  73 + return Promise.reject('brand not found');
  74 + }
69 }).then(() => { 75 }).then(() => {
70 return Search.queryProductOfBrand(q).then(result => { 76 return Search.queryProductOfBrand(q).then(result => {
71 -  
72 if (result && result.code === 200 && result.data) { 77 if (result && result.code === 200 && result.data) {
73 let ret = camelCase(result.data); 78 let ret = camelCase(result.data);
74 79
@@ -94,7 +99,7 @@ const shop = { @@ -94,7 +99,7 @@ const shop = {
94 order: q.order 99 order: q.order
95 })); 100 }));
96 } else { 101 } else {
97 - return Promise.reject('query product error'); 102 + return Promise.reject('query shop index error');
98 } 103 }
99 }); 104 });
100 }).catch(next); 105 }).catch(next);
1 -{{# brandBanner}} 1 +{{# banner}}
2 <div class="brand-info-wrapper"> 2 <div class="brand-info-wrapper">
3 <div class="brand-info"> 3 <div class="brand-info">
4 <div class="nano-content"> 4 <div class="nano-content">
@@ -12,4 +12,4 @@ @@ -12,4 +12,4 @@
12 </div> 12 </div>
13 </div> 13 </div>
14 </div> 14 </div>
15 -{{/brandBanner}} 15 +{{/banner}}
@@ -129,6 +129,12 @@ @@ -129,6 +129,12 @@
129 } 129 }
130 } 130 }
131 } 131 }
  132 +
  133 + .desc {
  134 + .name {
  135 + color: #FFF;
  136 + }
  137 + }
132 } 138 }
133 139
134 .floor-header { 140 .floor-header {
@@ -210,6 +216,9 @@ @@ -210,6 +216,9 @@
210 } 216 }
211 217
212 .brand-info-content { 218 .brand-info-content {
  219 + text-align: left;
  220 + font-size: 12px;
  221 + line-height: 20px;
213 p { 222 p {
214 font-size: 12px; 223 font-size: 12px;
215 line-height: 20px; 224 line-height: 20px;