<template>
<div>
  <div class="header pc">
    <div class="inner">
        <div class="fl header_l">
            <a target="_blank"><img src="../../assets/img/logo.png" alt=""></a>
        </div>
        <div class="header_r fl">
            <ul style="overflow:hidden">
                <li @click="goToSearchPage(0,'')" class="active"><a>全部</a></li>
                <li @click="goToSearchPage(1,'财经')"><a>财经</a></li>
                <li @click="goToSearchPage(2,'法制')"><a>法制</a></li>
                <li @click="goToSearchPage(3,'国际')"><a>国际</a></li>
                <li @click="goToSearchPage(4,'健康')"><a>健康</a></li>
                <li @click="goToSearchPage(5,'军事')"><a>军事</a></li>
                <li @click="goToSearchPage(6,'科技')"><a>科技</a></li>
                <li @click="goToSearchPage(7,'时政')"><a>时政</a></li>
                <li @click="goToSearchPage(8,'体育')"><a>体育</a></li>
                <li @click="goToSearchPage(9,'文教')"><a>文教</a></li>
                <li @click="goToSearchPage(10,'娱乐')"><a>娱乐</a></li>
            </ul>
            <!-- 搜索开始 -->
            <div class="search_wrap">
              <div class="search_wrap_l fl">
                  <input type="text" placeholder="请输入标题或关键字" v-model="keywords">
                  <button @click="goToSearchPage(0,'')"></button>
              </div>
              <div class="search_wrap_r fr" style="cursor:pointer" @click="goToGaojiIndex()">
                高级检索+
              </div>
            </div>
            <!-- 搜索结束 -->
        </div>

    </div>

    </div>



  <div class="mobile">
    <div class="header_m">
      <a href="https://www.tongliao.gov.cn/" target="_blank"><img src="../../assets/img/heise_logo.png" alt=""></a>
    </div>
  </div>
</div>


</template>

<script>
export default {
  name: '',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      keywords:''
    }
  },
  methods:{
    // 跳转到高级检索
        goToGaojiIndex() {
          this.$router.push({path:'/search',query: {gaoji:'1'}});
          // this.$router.push({ path: '/search', params: { level: 'true' } });
        },
        // 跳转到搜索页
        goToSearchPage(id,name){
          this.$router.push({path:'/search',query: {id:id,name:name}});
            // window.open('http://www.nmg.gov.cn/nmg_search/#/Door?keywords='+this.keywords, '_blank');

        },
        // 回车搜索
        searchgo(event){
            if (event.keyCode === 13) {
                // this.sendquestion();//回车搜索
                this.gotolink();
            }
        },
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
