|
|
@@ -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 [];
|
|
|
}
|