<template>
  <div class="Search">
    <header-top>
      <span slot="Bigtitle">搜索结果</span>
    </header-top>
    <card :poicefilelist="showMessage"></card>
  </div>
</template>

<script>
//导入的插件
import Card from "../../components/carditem/card.vue";
import HeaderTop from "../../components/header/header.vue";
// 方法
import {getpoicefile} from "../../network/poicefile";

export default {
  name: "Search",
  components: {
    HeaderTop,
    Card,
  },
  data() {
    return {
      kw: "",
      showMessage: [],
    };
  },
  created() {
    // 获取当前关键词
  this.kw = this.$route.params.kw;
    this.getpoicefile()
  },

  methods: {
      
    getpoicefile(){
      getpoicefile(this.kw,1,12).then((res)=>{
        // console.log(res);
        this.showMessage.push(...res.data.data)
      })
    }
  },
};
</script>

<style scoped>
/deep/.search{
  display: none;
}
</style>