|
@@ -6,7 +6,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 搜索历史 -->
|
|
|
- <view class="history">
|
|
|
+ <view class="history" v-show="search_list.length != 0">
|
|
|
<view class="history-top">
|
|
|
<hotCom>搜索历史</hotCom>
|
|
|
<view class="history-right" @click="handlerAllSearchRecord">
|
|
@@ -97,6 +97,7 @@ export default {
|
|
|
...mapGetters(['location']),
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.search_text = ''
|
|
|
if (uni.getStorageSync('searchItem')) {
|
|
|
this.search_list = uni.getStorageSync('searchItem');
|
|
|
}
|
|
@@ -121,10 +122,10 @@ export default {
|
|
|
let params = {
|
|
|
name: this.search_text,
|
|
|
};
|
|
|
- this.search_list.push(params);
|
|
|
+ this.search_list.unshift(params);
|
|
|
uni.setStorageSync('searchItem', this.search_list);
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/client/clientPackage/storeList?keyword=${this.search_text}`,
|
|
|
+ url: `/pagesHome/category/categoryStoreList?keyword=${this.search_text}`,
|
|
|
});
|
|
|
},
|
|
|
// 删除搜索记录按钮
|
|
@@ -136,7 +137,7 @@ export default {
|
|
|
handlerSelctHistItem(item) {
|
|
|
this.search_text = item.name;
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/client/clientPackage/storeList?keyword=${this.search_text}`,
|
|
|
+ url: `/pagesHome/category/categoryStoreList?keyword=${this.search_text}`,
|
|
|
});
|
|
|
},
|
|
|
// 删除所有搜索记录按钮
|