result.vue 1 KB
<template>
  <div class="home-search">
    <SearchLayout :history="false" :defKeyword="keyword" :searchData="data" @search="handleSearch" />
  </div>
</template>

<script>
import SearchLayout from './components/SearchLayout'
export default {
  name: 'HomeSearchResult',
  components: { SearchLayout },
  data () {
    return {
      keyword: null,
      data: null
    }
  },
  methods: {
    handleSearch (val) {

      this.data = {
        apps: [{ icon: '', name: '新闻动态' }],
        modules: [
          {
            type: 1 + parseInt(Math.random() * 3),
            list: [
              {
                title: '创新推出碳中和债,助理实现30·60目标',
                date: '2020-02-02',
                dataType: '公告'
              }
            ]
          }
        ]
      }
    }
  },
  mounted () {
    const { keyword } = this.$route.query
    this.keyword = keyword
    this.handleSearch(keyword)
  }
}
</script>

<style lang="less" scoped>
.home-search {
  height: 100%;
}
</style>