Forráskód Böngészése

页面图片大小固定,不经过品牌进入器件详情,不显示品牌title bug处理

yangc 8 éve
szülő
commit
25d75fa91a

+ 1 - 1
components/mobile/Home.vue

@@ -18,7 +18,7 @@
           <li :class="activeType=='shops'?'active':''" @click="activeType='shops'"><span>商家</span></li>
         </ul>
         <div class="home-input">
-          <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="keyword"
+          <input type="text" placeholder="请输入您要查找的型号、品牌或商家" v-model="keyword"
                  @focus.stop.prevent="onFocus()"/>
           <span @click="onSearch()"><i class="iconfont icon-sousuo"></i></span>
         </div>

+ 14 - 3
components/mobile/MobileHeader.vue

@@ -77,6 +77,9 @@
       },
       store () {
         return this.$store.state.shop.storeInfo.store.data
+      },
+      component () {
+        return this.$store.state.componentDetail.detail.data
       }
     },
     methods: {
@@ -86,10 +89,18 @@
       initHeader: function (val) {
         let title = '优软商城'
         if (val.startsWith('/mobile/brand/')) {
-          if (this.brandDetail.nameCn !== this.brandDetail.nameEn) {
-            title = this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')'
+          if (this.brandDetail.nameCn) {
+            if (this.brandDetail.nameCn !== this.brandDetail.nameEn) {
+              title = this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')'
+            } else {
+              title = this.brandDetail.nameCn
+            }
           } else {
-            title = this.brandDetail.nameCn
+            if (this.component.brand.nameCn !== this.component.brand.nameEn) {
+              title = this.component.brand.nameEn + '(' + this.component.brand.nameCn + ')'
+            } else {
+              title = this.component.brand.nameCn
+            }
           }
           this.rightIcon = 'share'
         } else if (val.startsWith('/mobile/shop')) {

+ 16 - 22
components/mobile/brand/BrandDetail.vue

@@ -42,7 +42,7 @@
         </div>
         <div class="kind-search">
           <input type="text" v-model="keyword" placeholder="请输入型号">
-          <i @click="goodsSearch()"><img src="/images/mobile/@2x/productDetail/search@2x.png" alt=""></i>
+          <i @click="goodsSearch()" class="icon-sousuo iconfont"></i>
         </div>
       </div>
       <ul class="product-list">
@@ -200,7 +200,7 @@
   .brand-detail {
     margin: 0 auto;
     margin-top: .88rem;
-    margin-bottom: .98rem;
+    margin-bottom: 1.2rem;
     text-align: center;
     .brand-logo {
       height: 2.21rem;
@@ -208,9 +208,9 @@
       display: inline-block;
       border: .01rem solid #e75610;
       margin: .38rem auto;
+      line-height: 2.21rem;
       img {
-        max-height: 2.17rem;
-        margin-top: .01rem;
+        max-height: 2.13rem;
       }
     }
     .brand-switch-item {
@@ -263,15 +263,8 @@
           z-index: -5;
         }
         &:first-child.active:before {
-          content: '';
           background: #e75610;
           border: .01rem solid #e75610;
-          width: .64rem;
-          height: .68rem;
-          border-radius: 100%;
-          position: absolute;
-          left: -.33rem;
-          top: -.01rem;
         }
         &:last-child:before {
           content: '';
@@ -286,16 +279,8 @@
           top: -.01rem;
         }
         &:last-child.active:before {
-          content: '';
           background: #e75610;
-          width: .64rem;
-          height: .68rem;
-          border-radius: 100%;
-          position: absolute;
           border: .01rem solid #e75610;
-          left: 1.04rem;
-          z-index: -5;
-          top: -.01rem;
         }
       }
     }
@@ -361,6 +346,9 @@
             color: #333;
             img {
               margin-left: .54rem;
+              width: .39rem;
+              height: .26rem;
+              margin-right: .27rem;
             }
           }
         }
@@ -382,7 +370,8 @@
             display: inline-block;
             background: url('/images/mobile/@2x/productDetail/kind-narrow-down@2x.png')no-repeat;
             padding-right: .15rem;
-            background-position: 1.35rem .2rem;
+            background-position: 1.35rem .25rem;
+            background-size: .14rem .1rem;
             overflow: hidden;
           }
         }
@@ -390,7 +379,7 @@
           display: inline-block;
           margin-right: .19rem;
           input[type = "text"] {
-            width: 3.63rem;
+            width: 3.61rem;
             height: .6rem;
             padding-left: .21rem;
             font-size: .24rem;
@@ -398,10 +387,15 @@
           }
           i {
             background: rgb(65,142,247);
-            padding: .125rem .21rem;
             float: right;
             position: relative;
             left: -.01rem;
+            width: .61rem;
+            height: .6rem;
+            line-height: .6rem;
+            font-size: .32rem;
+            color: #fff;
+            display: inline-block;
           }
         }
         ul {

+ 13 - 3
components/mobile/brand/ComponentDetail.vue

@@ -22,7 +22,7 @@
       <span :class="activeType=='store'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='store'">商家</span>
     </div>
     <div class="product-params" v-if="activeType == 'param'">
-      <div class="param-item" v-for="prop in component.properties">
+      <div class="param-item" v-if="prop.value && prop.value!=''" v-for="prop in component.properties">
         <span class="prop-name">{{prop.property.labelCn}}</span>
         <span class="prop-value">{{prop.value}}</span>
       </div>
@@ -166,12 +166,16 @@
   .component-detail {
     font-size: .28rem;
     margin-top: .88rem;
-    margin-bottom: .98rem;
+    margin-bottom: 1.2rem;
     .base-detail {
       margin: 0 .66rem .34rem .40rem;
       padding-top: .34rem;
       .base-detail-item {
         margin-bottom: .3rem;
+        img {
+          width: .39rem;
+          height: .26rem;
+        }
         &:last-child {
           margin-bottom: 0;
         }
@@ -275,8 +279,12 @@
     }
     .product-params {
       line-height: .28rem;
+      margin-top: .19rem;
       .param-item {
-        margin: .38rem .4rem;
+        padding: .19rem .4rem;
+        &:nth-child(even) {
+          background: #eee;
+        }
         .prop-name {
           width: 3.72rem;
           display: inline-block;
@@ -334,6 +342,8 @@
           text-align: center;
           margin: 0 auto;
           margin-bottom: .45rem;
+          width: 1.97rem;
+          height: 1.8rem;
         }
         div {
           width: 5.27rem;