Browse Source

品牌详情,器件详情,图片展示逻辑修改。

yangc 8 years ago
parent
commit
35a0d4aa81

+ 4 - 5
components/product/ComponentGoods.vue

@@ -25,9 +25,9 @@
         <td>
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
           <nuxt-link v-if="compGoods.batchCode" :to="`/store/${compGoods.storeId}/${compGoods.batchCode}`" target="_blank">
-            <img :src="compGoods.img?compGoods.img:'/images/all/default.png'"/>
+            <img :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
           </nuxt-link>
-          <img v-if="!compGoods.batchCode" :src="compGoods.img || '/images/all/default.png'"/>
+            <img v-if="!compGoods.batchCode" :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
           <!--store/{{compGoods.storeId}}#/home-->
           <nuxt-link :to="'/store/' + compGoods.storeId" class="contact" :title="compGoods.storeName" target="_blank">{{compGoods.storeName}}</nuxt-link>
         </td>
@@ -234,12 +234,11 @@
   .product-list tbody>tr {
     border: 1px solid #e8e8e8;
   }
-
   .product-list tbody>tr img {
     border: 1px solid #e8e8e8;
     margin: 10px 0 5px 0;
-    width: 36px;
-    height: 36px;
+    max-width: 36px;
+    max-height: 36px;
   }
   .product-list tbody>tr .contact{
     font-size: 14px;

+ 1 - 1
components/product/component/ComponentDetail.vue

@@ -6,7 +6,7 @@
       </div>-->
       <div class="detail">
         <div class="component-img">
-          <img :src="list.img||'/images/component/default.png'"/>
+          <img :src="list.img?list.img:list.brand&&list.brand.logoUrl?list.brand.logoUrl:'/images/component/default.png'"/>
         </div>
         <div class="component-message">
           <div class="message-code">