|
|
@@ -24,7 +24,7 @@
|
|
|
</template>
|
|
|
<template v-if="similarList.brand && similarList.brand.length">
|
|
|
<li class="title text-ellipse">品牌</li>
|
|
|
- <li class="text-ellipse" v-for="brand in similarList.brand.slice(0, 4)" @click="onSearch(brand.nameCn, 'brand', $event)">{{brand.nameCn}}</li>
|
|
|
+ <li class="text-ellipse" v-for="brand in similarList.brand.slice(0, 4)" @click="onSearch(brand.nameEn, 'brand', $event)">{{brand.nameEn}}</li>
|
|
|
</template>
|
|
|
<template v-if="similarList.kind && similarList.kind.length">
|
|
|
<li class="title text-ellipse">类目</li>
|
|
|
@@ -112,7 +112,29 @@
|
|
|
})
|
|
|
} else {
|
|
|
let sType = null
|
|
|
- if (this.type === 'supplier' && this.keyword && this.keyword !== '') {
|
|
|
+ if (this.type === 'default' && this.keyword && this.keyword !== '') {
|
|
|
+ if (this.similarList.component[0] && this.keyword === this.similarList.component[0].code) {
|
|
|
+ sType = 'code'
|
|
|
+ } else if (this.similarList.brand[0] && this.keyword === this.similarList.brand[0].nameEn) {
|
|
|
+ sType = 'brand'
|
|
|
+ } else if (this.similarList.kind[0] && this.keyword === this.similarList.kind[0].nameCn) {
|
|
|
+ sType = 'kind'
|
|
|
+ } else {
|
|
|
+ let arr = [...this.similarList.component, ...this.similarList.brand, ...this.similarList.kind]
|
|
|
+ if (arr[0]) {
|
|
|
+ if (arr[0].code) {
|
|
|
+ this.keyword = arr[0].code
|
|
|
+ sType = 'code'
|
|
|
+ } else if (arr[0].nameEn) {
|
|
|
+ this.keyword = arr[0].nameEn
|
|
|
+ sType = 'brand'
|
|
|
+ } else if (arr[0].nameCn) {
|
|
|
+ this.keyword = arr[0].nameCn
|
|
|
+ sType = 'kind'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.type === 'supplier' && this.keyword && this.keyword !== '') {
|
|
|
if (this.similarList.pCmpCode[0] && this.keyword === this.similarList.pCmpCode[0].pCmpCode) {
|
|
|
sType = 'pCmpCode'
|
|
|
} else if (this.similarList.pBrandEn[0] && this.keyword === this.similarList.pBrandEn[0].nameEn) {
|