Browse Source

bug 修复

lilei 3 năm trước cách đây
mục cha
commit
e31b0c37b9
1 tập tin đã thay đổi với 9 bổ sung7 xóa
  1. 9 7
      src/views/productManagement/newProduct/detail.vue

+ 9 - 7
src/views/productManagement/newProduct/detail.vue

@@ -31,11 +31,11 @@
             </div>
           </div>
         </div>
-        <div class="productImg" v-if="detailsData && detailsData.productPicList">
+        <div class="productImg" v-if="detailsData && detailsData.productMsg">
           <a-carousel arrows>
             <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" /></div>
             <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" /></div>
-            <div><img v-for="item in detailsData.productPicList" :src="item.imageUrl" /></div>
+            <div><img :src="detailsData.productMsg" /></div>
           </a-carousel>
           <!-- <div class="sycxImg">
             <p>适用车型图片</p>
@@ -71,6 +71,7 @@ export default {
   methods: {
     //  获取详情
     getDetail () {
+      this.detailsData = null
       productDetail({ sn: this.itemId }).then(res => {
         if (res.status == 200) {
           this.detailsData = res.data
@@ -97,10 +98,11 @@ export default {
 /* For demo */
 .ant-carousel .slick-slide {
   text-align: center;
-  height: 190px;
-  line-height: 190px;
-  background: #364d79;
   overflow: hidden;
+  border: 1px solid #eee;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 .ant-carousel .custom-slick-arrow {
   width: 25px;
@@ -117,7 +119,7 @@ export default {
 }
 .ant-carousel .slick-slide img {
   width: 100%;
-  height: 100%;
+  max-height: 100%;
 }
 .newProductDetail-back {
   margin-bottom: 10px;
@@ -131,7 +133,7 @@ export default {
   .productHead {
     display: flex;
     .productImg {
-      width: 25%;
+      width: 240px;
     }
     .productInfo {
       flex-grow: 1;