完成湖畔好店的搜索功能
This commit is contained in:
parent
c765dd65da
commit
3c26c8c1a0
@ -15,7 +15,7 @@
|
|||||||
<image
|
<image
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<input type="text" placeholder="请输入您想搜索的内容" />
|
<input type="text" v-model="searchText" placeholder="请输入您想搜索的内容" @confirm="handleSearch" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -141,6 +141,7 @@ export default {
|
|||||||
page_num: 1,
|
page_num: 1,
|
||||||
flag: false,
|
flag: false,
|
||||||
merchatList: [],
|
merchatList: [],
|
||||||
|
searchText: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -196,12 +197,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//搜索商家
|
||||||
|
handleSearch() {
|
||||||
|
this.page_num = 1;
|
||||||
|
this.merchatList = [];
|
||||||
|
this.getMechantList();
|
||||||
|
},
|
||||||
//查询商家列表
|
//查询商家列表
|
||||||
async getMechantList() {
|
async getMechantList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
await request(apiArr.getMerchantList, "POST", {
|
await request(apiArr.getMerchantList, "POST", {
|
||||||
page_num: that.page_num,
|
page_num: that.page_num,
|
||||||
page_size: that.page_size,
|
page_size: that.page_size,
|
||||||
|
merchant_name: that.searchText
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
let latitude = uni.getStorageSync("location").lat;
|
let latitude = uni.getStorageSync("location").lat;
|
||||||
let longitude = uni.getStorageSync("location").lng;
|
let longitude = uni.getStorageSync("location").lng;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user