Browse Source

品牌中心品牌索引字体颜色和索引以及索引列表按升序排列,产品详情页字体颜色的调整

hangb 8 years ago
parent
commit
64549572eb

+ 45 - 9
components/product/BrandList.vue

@@ -26,29 +26,57 @@
 </template>
 
 <script>
+  function sortList (letter) {
+    return function (a, b) {
+      var value1 = a[letter]
+      var value2 = b[letter]
+      if (value1 > value2) {
+        return 1
+      } else if (value1 < value2) {
+        return -1
+      } else {
+        return 0
+      }
+    }
+  }
   export default {
     name: 'brandList',
     computed: {
       brandList () {
-        return this.$store.state.product.brand.brandList.data
+        let brandsList = this.$store.state.product.brand.brandList.data
+        if (brandsList) {
+          for (let i in brandsList) {
+            brandsList[i] = brandsList[i].sort(sortList('nameEn'))
+          }
+        }
+        let temp = {}
+        let keys = []
+        for (let key in brandsList) {
+          keys.push(key)
+        }
+        keys = keys.sort()
+        for (let i = 0; i < keys.length; i++) {
+          temp[keys[i]] = brandsList[keys[i]]
+        }
+        return temp
       }
     }
   }
 </script>
 
-<style scoped>
+<style>
   /** brandList*/
   #brandsList {
     clear: both;
     width: 1190px;
-    padding: 0px;
+    padding: 0;
   }
 
   #brandsList .hr-blue {
     border-bottom: 2px solid #6493FF;
-    border-right: 0px;
-    border-top: 0px;
-    border-left: 0px;
+    border-right: 0;
+    border-top: 0;
+    border-left: 0;
     width: 100%;
   }
 
@@ -57,7 +85,7 @@
   }
 
   #brandsList .row {
-    margin: 20px 0px;
+    margin: 20px 0;
   }
 
   #brandsList .row .initial {
@@ -67,7 +95,7 @@
     color: #787878;
   }
 
-  #brandsList .row .initial:hover{
+  #brandsList .row .initial:hover a,#brandsList .row li.initial.active a {
     color: #5078CB;
     font-weight: bold;
     cursor: pointer;
@@ -77,7 +105,15 @@
     color: #5078CB;
     font-weight: bold;
   }
-
+  #brandsList .row .initial a{
+    font-size: 16px;
+    color: #787878;
+  }
+  #brandsList .row .initial:hover a{
+    color: #5078CB;
+    font-weight: bold;
+    cursor: pointer;
+  }
   #brands .container {
     width: 1190px;
     padding: 0px;

+ 1 - 1
components/provider/RecommendOriginal.vue

@@ -39,7 +39,7 @@ export default {
 		padding: 0px;
 	}
 
-	#recommends .title-icon {
+  .title-icon {
 	  font-size: 24px;
     color: #323232;
     margin-top: 30px;

+ 7 - 2
components/store/CommodityInfo.vue

@@ -411,8 +411,13 @@ export default {
 	.content .com-info .name {
 		letter-spacing: 15px;
 	}
-
-	.commodity-info-detail {
+  .content .com-info a{
+    color: #1162a4;
+  }
+  .content .com-info:hover a{
+    color: #23527c;
+  }
+  .commodity-info-detail {
 		float: left;
 		padding-top: 10px;
 		width: 582px;