邓洁 : 修改搜索框bug
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="bug-fix"></view>
|
||||
<view class="search-box">
|
||||
<view class="search-box-input">
|
||||
<u-input placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
<u-input v-model="keyword" placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||
</u-input>
|
||||
</view>
|
||||
@@ -39,7 +39,8 @@
|
||||
customQuery: {},
|
||||
shopListLength: '',
|
||||
showNull: false,
|
||||
refresh: false
|
||||
refresh: false,
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -59,6 +60,7 @@
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.refresh && this.shopListLength !== 0) {
|
||||
this.keyword = ''
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
@@ -70,16 +72,16 @@
|
||||
this.getShopList()
|
||||
},
|
||||
methods: {
|
||||
getInput(val){
|
||||
console.log('搜索值',val);
|
||||
if(this.pageNum!==1){
|
||||
this.pageNum=1
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
const q = this.$u.queryParams({
|
||||
type: 4,
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum,
|
||||
kw:val
|
||||
kw: val
|
||||
})
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
|
||||
Reference in New Issue
Block a user