|
|
@@ -7,7 +7,7 @@
|
|
|
</div>
|
|
|
<div class="mobile-fix-content mobile-centerfix-content" id="mobileFixContent">
|
|
|
<div class="search-content search-content2" style="position: relative">
|
|
|
- <input type="text" placeholder="请输入您要询价求购的型号" @blur="checkBrand" @input="onBrandChange" v-model="keyword" @keyup.13="searchComplist">
|
|
|
+ <input type="text" placeholder="请输入您要询价求购的型号" @input="onBrandChange" v-model="keyword" @keyup.13="searchComplist">
|
|
|
<span @click.stop="searchComplist" >
|
|
|
<i class="iconfont icon-sousuo"></i>
|
|
|
</span>
|
|
|
@@ -98,14 +98,6 @@
|
|
|
PublishSeek
|
|
|
},
|
|
|
methods: {
|
|
|
- checkBrand: function () {
|
|
|
- if (!this.keyword) {
|
|
|
- // this.setRemindText('品牌不能为空')
|
|
|
- this.remindText = '型号不能为空'
|
|
|
- this.timeoutCount++
|
|
|
- }
|
|
|
- return this.keyword
|
|
|
- },
|
|
|
onBrandChange: function () {
|
|
|
this.keyword = this.keyword.trim()
|
|
|
if ((/[^\x00-\xff]/g).test(this.keyword)) {
|
|
|
@@ -127,10 +119,10 @@
|
|
|
},
|
|
|
getSimilarBrand: function () {
|
|
|
if (this.keyword) {
|
|
|
- this.$http.get('/search/similarComponents', {params: {keyword: this.keyword}})
|
|
|
+ this.$http.get('/search/similarKeywords', {params: {keyword: this.keyword, type: 'component'}})
|
|
|
.then(response => {
|
|
|
- this.similarBrand = response.data
|
|
|
- this.showSimilarBrandList = response.data.length > 0
|
|
|
+ this.similarBrand = response.data.result
|
|
|
+ this.showSimilarBrandList = response.data.result.length > 0
|
|
|
})
|
|
|
} else {
|
|
|
this.showSimilarBrandList = false
|
|
|
@@ -148,6 +140,9 @@
|
|
|
this.showPublishBox = false
|
|
|
this.page = 1
|
|
|
this.isChange = true
|
|
|
+ } else {
|
|
|
+ this.remindText = '请输入您要询价求购型号'
|
|
|
+ this.timeoutCount++
|
|
|
}
|
|
|
},
|
|
|
onRemind: function (str) {
|
|
|
@@ -165,10 +160,10 @@
|
|
|
if (e) {
|
|
|
e.stopPropagation()
|
|
|
}
|
|
|
- this.componentSeekObj.code = item.cmpCode ? item.cmpCode : '-'
|
|
|
- this.componentSeekObj.brand = item.brand ? item.brand : '-'
|
|
|
- this.componentSeekObj.spec = item.spec ? item.spec : '-'
|
|
|
- this.componentSeekObj.prodTitle = item.kind ? item.kind : '-'
|
|
|
+ this.componentSeekObj.code = item.cmpCode ? item.cmpCode : ''
|
|
|
+ this.componentSeekObj.brand = item.brand ? item.brand : ''
|
|
|
+ this.componentSeekObj.spec = item.spec ? item.spec : ''
|
|
|
+ this.componentSeekObj.prodTitle = item.kind ? item.kind : ''
|
|
|
this.componentSeekObj = JSON.parse(JSON.stringify(this.componentSeekObj))
|
|
|
this.showPublishBox = true
|
|
|
},
|
|
|
@@ -199,7 +194,10 @@
|
|
|
font-size: .26rem;
|
|
|
color: #999;
|
|
|
padding-left: .19rem;
|
|
|
- margin-top: 0px;
|
|
|
+ text-align: left;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
&:focus, &:active, &:hover {
|
|
|
background: #999;
|
|
|
color: #fff;
|