<template>
  <BasicSearchPage placeHolder="搜索米家相关行业、产品" :search="search" :activeTypes="[]"/>
</template>

<script>
  import components from '../../components/index'

  export default {

    components,
    methods: {
      async search(key) {
        await new Promise((resolve)=>{
          setTimeout(()=>{
            resolve()
          },2000)
        })
        const result = {
          'overall': {
            name: '整体',
            weight: 12,
            icon: 'icon-quanbu1',
            items: [{
              name: '小米-米加',
              url: '/mijia/overall'
            }]
          },
          'category': {
            name: '行业',
            weight: 231,
            icon: 'icon-xingye',
            items: [{
              name: '行业1',
              url: '/mijia/hangye1'
            },
              {
                name: '行业2',
                url: '/mijia/hangye2'
              }]
          },
          'product': {
            name: '产品',
            weight: 34,
            icon: 'icon-msnui-product',
            items: [
              {
                name: '产品1',
                url: '/mijia/product1'
              },
              {
                name: '产品2',
                url: '/mijia/product2'
              },
              {
                name: '产品3',
                url: '/mijia/product3'
              }
            ]
          }
        }
        return result;
      },
    }

  }
</script>

<style scoped>

</style>
