panhui 5 жил өмнө
parent
commit
c5da3ac033

+ 9 - 6
src/mixins/vendorInfo.js

@@ -3,24 +3,27 @@ export default {
         name() {
             return this.$i18n.locale().indexOf('zh') != -1 ? this.info.chCompanyName : this.info.enCompanyName;
         },
-        categories() {
+        allcategories() {
             let str = this.info.categories
                 ? [...this.info.categories]
                       .filter((item, index) => {
                           return index === 0 || item.id !== [...this.info.categories][index - 1].id;
                       })
                       .map(item => {
-                          return this.$i18n.locale().indexOf('zh') != -1 ? item.chName.split('/').pop() : item.enName;
+                          return this.$i18n.locale().indexOf('zh') != -1 ? item.chName.split('_/').pop() : item.enName;
                       })
-                      .join('/')
+                      .join('_/')
                 : '';
 
             if (this.info.customCategory) {
-                str += (str ? '/' : '') + this.info.customCategory.split(',').join('/');
+                str += (str ? '_/' : '') + this.info.customCategory.split(',').join('_/');
             }
 
             return str;
         },
+        categories() {
+            return this.allcategories.replace(/_\//g, '/');
+        },
         country() {
             return this.info.headquarter || this.info.country || '中国';
         },
@@ -28,8 +31,8 @@ export default {
             return this.info.logo ? this.info.logo + '?x-oss-process=image/resize,m_fill,h_480,w_480' : '';
         },
         categoriesList() {
-            if (this.categories) {
-                return this.categories.split('/');
+            if (this.allcategories) {
+                return this.allcategories.split('_/');
             } else {
                 return [];
             }

+ 17 - 1
src/pages/Home.vue

@@ -558,14 +558,30 @@ export default {
 .menus {
     padding: 20px 0;
     .text {
-        width: 25%;
+        // width: 25%;
         font-size: 11px;
         color: #bcc1cc;
         line-height: 16px;
         text-align: center;
+        padding: 0 18px;
+        white-space: nowrap;
+        position: relative;
+
+        &:not(:first-child) {
+            &::before {
+                content: '';
+                width: 1px;
+                height: 10px;
+                background: #f2f3f5;
+                position: absolute;
+                left: 0;
+                top: 3px;
+            }
+        }
     }
     display: flex;
     align-items: center;
+    justify-content: center;
 }
 .menu-info {
     padding: 0 8px !important;