<template>
	<view class="search-container">
		<d-search-log :search_list_hot="search_list_hot" :store_key="store_key" @onClickDelAllApi="onClickDelAll"
			@onSearchNameApi="onSearchName"></d-search-log>
	</view>
</template>

<script>
	import {
		getTagByCode
	} from '@/request/api/house.js'
	export default {
		data() {
			return {
				search_list_hot: []
			}
		},
		onShow() {
			getTagByCode(this.$store.getters.activeCity.cityCode).then(res => {
				if (res.code == 200) {
					this.search_list_hot = res.data.map(node => node.name);
				}
			})
		},
		methods: {
			onClickDelAll() {
				console.log('[父级接收事件]：删除全部搜索记录')
			},
			onSearchName(e) {
				this.$navigateTo('/pages/searchlist/searchlist?searchValue=' + e);
			}
		}
	}
</script>

<style lang="scss">
	.search-container {}
</style>