youyawu 4 tahun lalu
induk
melakukan
82637beb86

+ 11 - 7
src/components/productImgs.vue

@@ -1,10 +1,11 @@
 <template>
   <div class="imgs ">
-    <img :src="imgs[currImgIndex]" alt="" />
+    <img class="main" :src="imgs[currImgIndex]" alt="" />
     <img
       v-for="(s, index) in imgs"
-      :key="`imgs${index}`"
+      :key="`${index}`"
       :src="s"
+      class="img"
       @mouseover="currImgIndex = index"
     />
   </div>
@@ -26,15 +27,18 @@ export default class extends Vue {
 <style lang="scss" scoped>
 .imgs {
   width: 400px;
-  img {
+  .main {
+    width: 400px;
+    height: 400px;
+    margin-bottom: 20px;
+  }
+  .img {
     width: 92px;
     height: 92px;
     margin-right: 10px;
     cursor: pointer;
-    &:nth-child(1) {
-      width: 400px;
-      height: 400px;
-      margin-bottom: 20px;
+    &:last-child {
+      margin-right: 0;
     }
   }
 }

+ 4 - 0
src/views/home/index.vue

@@ -414,6 +414,10 @@ export default class extends Vue {
           top: 50%;
           left: 50%;
           transform: translate(-50%, -50%);
+          img {
+            width: 38px;
+            height: 38px;
+          }
         }
       }
     }

+ 12 - 7
src/views/shops/details/product.vue

@@ -11,9 +11,9 @@
           <div class="tit">
             {{ $t("page.views.shops.details.product.price") }} :
           </div>
-          <div class="amount fl"><span>¥</span>{{ product.price }}</div>
+          <div class="amount fl"><span>¥ </span>{{ product.price }}</div>
         </div>
-        <div class="row">
+        <div class="row" v-if="product.goodsSizes && product.goodsSizes.length">
           <div class="tit">
             {{ $t("page.views.shops.details.product.specifications") }} :
           </div>
@@ -28,7 +28,10 @@
             </div>
           </div>
         </div>
-        <div class="row">
+        <div
+          class="row"
+          v-if="product.goodsColors && product.goodsColors.length"
+        >
           <div class="tit">
             {{ $t("page.views.shops.details.product.color") }} :
           </div>
@@ -80,7 +83,7 @@
         <div class="item">
           {{
             $t("page.views.shops.details.product.commoditySpecifications")
-          }}:{{ sizes }}{{ sizes }}
+          }}:{{ sizes }}
         </div>
         <div class="item">
           {{ $t("page.views.shops.details.product.distributionMode") }}:{{
@@ -156,6 +159,8 @@ export default class extends Vue {
     .info {
       overflow: hidden;
       padding: 20px 30px;
+      width: 760px;
+      box-sizing: border-box;
       .title {
         font-size: 16px;
         color: rgb(51, 51, 51);
@@ -164,7 +169,7 @@ export default class extends Vue {
       .desc {
         font-size: 12px;
         color: rgb(102, 102, 102);
-        margin-bottom: 20px;
+        margin-bottom: 30px;
       }
       .amount {
         color: rgb(253, 85, 34);
@@ -174,14 +179,14 @@ export default class extends Vue {
         }
       }
       .row {
-        margin-bottom: 10px;
+        margin-bottom: 20px;
         width: 100%;
         overflow: hidden;
+        // margin-top: 10px;
         .tit {
           color: rgb(102, 102, 102);
           margin-right: 15px;
           float: left;
-          margin-top: 10px;
         }
         .items {
           overflow: hidden;

+ 2 - 2
src/views/shops/enter/add.vue

@@ -213,7 +213,6 @@
           :label="`${$t(`page.views.shops.enter.add.defaultImg`)}`"
           prop="defaultImgUrl"
         >
-          {{ form.defaultImgUrl }}
           <el-upload
             :class="{ uploadHide: form.defaultImgUrl }"
             list-type="picture-card"
@@ -603,7 +602,8 @@ export default class extends Vue {
   }
 
   beforeUpload(file: any) {
-    if (/image\/(png|jpg)$/.test(file.type)) return true;
+    console.log(file.type);
+    if (/image\/(png|jpe?g)$/.test(file.type)) return true;
     this.$message.error(`${this.$i18n.t("message.error.imgUpload")}`);
     return false;
   }