|
@@ -5,8 +5,10 @@
|
|
<view style='flex:6;' class="search-form round" >
|
|
<view style='flex:6;' class="search-form round" >
|
|
<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
|
|
<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
|
|
<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入货名或标题" confirm-type="search"></input>
|
|
<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入货名或标题" confirm-type="search"></input>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
- <view style="width:4%;flex:1;">{{content}}</view>
|
|
|
|
|
|
+ <view @click='emptysearch1' style="width:4%;flex:1;">{{content}}</view>
|
|
|
|
+ <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
|
|
</view>
|
|
</view>
|
|
<!-- mSearch组件 如果使用原样式,删除组件元素-->
|
|
<!-- mSearch组件 如果使用原样式,删除组件元素-->
|
|
<!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
|
|
<!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
|
|
@@ -131,7 +133,9 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
- this.searchKeyWord=options.searchKeyWord
|
|
|
|
|
|
+ if(options.searchKeyWord){
|
|
|
|
+ this.searchKeyWord=options.searchKeyWord
|
|
|
|
+ }
|
|
this.TabCur = options.TabCur
|
|
this.TabCur = options.TabCur
|
|
if(this.searchKeyWord){
|
|
if(this.searchKeyWord){
|
|
this.isShowKeywordList=true
|
|
this.isShowKeywordList=true
|
|
@@ -176,6 +180,16 @@
|
|
blur(){
|
|
blur(){
|
|
uni.hideKeyboard()
|
|
uni.hideKeyboard()
|
|
},
|
|
},
|
|
|
|
+ emptysearch1(){
|
|
|
|
+ if(this.content=='取消'){
|
|
|
|
+ this.searchKeyWord=''
|
|
|
|
+ this.content='搜索'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ emptysearch(){
|
|
|
|
+ this.searchKeyWord=''
|
|
|
|
+ this.content='搜索'
|
|
|
|
+ },
|
|
loadHotKeyword(){
|
|
loadHotKeyword(){
|
|
this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,
|
|
this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,
|
|
currentPage:this.currentPage,commonId:this.userInfo.id}).then(res => {
|
|
currentPage:this.currentPage,commonId:this.userInfo.id}).then(res => {
|
|
@@ -489,7 +503,10 @@
|
|
.keyword-box .keyword-block .keyword {width:94%;padding:3px 3%;display:flex;flex-flow:wrap;justify-content:flex-start;}
|
|
.keyword-box .keyword-block .keyword {width:94%;padding:3px 3%;display:flex;flex-flow:wrap;justify-content:flex-start;}
|
|
.keyword-box .keyword-block .hide-hot-tis {display:flex;justify-content:center;font-size:28upx;color:#6b6b6b;}
|
|
.keyword-box .keyword-block .hide-hot-tis {display:flex;justify-content:center;font-size:28upx;color:#6b6b6b;}
|
|
.keyword-box .keyword-block .keyword>view {display:flex;justify-content:center;align-items:center;border-radius:60upx;padding:0 20upx;margin:10upx 20upx 10upx 0;height:60upx;font-size:28upx;background-color:rgb(242,242,242);color:#6b6b6b;}
|
|
.keyword-box .keyword-block .keyword>view {display:flex;justify-content:center;align-items:center;border-radius:60upx;padding:0 20upx;margin:10upx 20upx 10upx 0;height:60upx;font-size:28upx;background-color:rgb(242,242,242);color:#6b6b6b;}
|
|
-
|
|
|
|
|
|
+ .cuIcon-roundclosefill{
|
|
|
|
+ position:absolute;
|
|
|
|
+ right:80px;
|
|
|
|
+ }
|
|
.tag1 {
|
|
.tag1 {
|
|
background:#F5F6F9;
|
|
background:#F5F6F9;
|
|
padding: 5px;
|
|
padding: 5px;
|