<template>
  <div class="footerInfor">
    <div class="footer_header">
      <div class="footer_model">
        <div v-for="(item,index) in model_list" :key="index">
          <div @click="skipTitle()" class="titleS">{{item.title}}</div>
          <div v-for="(list,key) in item.cont" :key="key" @click="skipCont()">{{list.text}}</div>
        </div>
      </div>
    </div>
    <div class="footer_bottom">
      <div class="bottom_model">
        <img :src="bottom_infor.leftImg" alt />
        <div>{{bottom_infor.introCopyright}}</div>
        <div>{{bottom_infor.introSite}}</div>
        <div>{{bottom_infor.introIdentificationCode}}</div>
        <div>{{bottom_infor.introAQ}}</div>
        <img :src="bottom_infor.rightImg" alt />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'footerInfor',
  data () {
    return {
      model_list: [
        {
          title: '统计法规',
          titleUrl: '',
          cont: [
            { text: '《统计法》统计法实施条例', textUrl: '' },
            { text: '人口普查条例', textUrl: '' }
          ]
        },
        {
          title: '标准制度',
          titleUrl: '',
          cont: [
            { text: '国民经济行业分类', textUrl: '' },
            { text: '国民经济核算统计报表制度', textUrl: '' },
            { text: '更多制度>>', textUrl: '' }
          ]
        },
        {
          title: '统计数据生产过程',
          titleUrl: '',
          cont: [
            { text: '统计数据生产过程 国内生产总值（GDP）', textUrl: '' },
            { text: '居民消费者价格指数（CPI）', textUrl: '' }
          ]
        },
        {
          title: '在线电话',
          titleUrl: '',
          cont: [
            { text: '咨询电话：010-68576320', textUrl: '' },
            { text: '周一至周五上午8：00-11:30,下午1:00-5:00', textUrl: '' }
          ]
        }
      ],
      // model_bottom 信息
      bottom_infor: {
        leftImg: require('../../../static/footerInfor/tbomleft.png'),
        introCopyright: '版权所有：中华人民共和国国家统计局 党政机关',
        introSite: '地址：北京市西城区月坛南街57号（100826）',
        introIdentificationCode: '网站标识码 bm36000005',
        introAQ: '京ICP备05034670号',
        rightImg: require('../../../static/footerInfor/tbomRight.png')
      }
    }
  },
  methods: {
    skipTitle () {

    },
    skipCont () {

    },
    // 获取底部导航数据
    getNavBottomInfor () {
      this.$axios({
        method: 'GET',
        url: 'footer/footer/bottom-nav',
        params: {
        }
      }).then(res => {
        // console.log(res, '底部导航')
        // 请求接口完成   请求成功
        if (res.data.code === 200) {
          let arrts = []
          res.data.data.list.forEach((item, index) => {
            let objuu = {
              title: item.name,
              titleUrl: item.desc,
              cont: item.children.map((list, key) => {
                return {
                  text: list.name,
                  textUrl: list.desc
                }
              })
            }
            arrts.push(objuu)
          })
          this.model_list = arrts
        }
      }).catch((fail) => {
        console.log(fail)
      })
    }
  },
  mounted () {
    this.getNavBottomInfor()
  }
}
</script>
<style lang="scss" scoped>
.footerInfor {
  width: 100%;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -moz-box-orient: vertical;
  -moz-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: flex-start;
  -moz-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;

  & > .footer_header {
    width: 100%;
    background-color: #336379;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -moz-box-orient: horizontal;
    -moz-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;

    & > .footer_model {
      padding-top: 3.875rem;
      width: 84.25rem;
      height: 15.75rem;
      // border: 1px solid red;
      display: -webkit-flex;
      display: -moz-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-flex-direction: row;
      -moz-box-orient: horizontal;
      -moz-box-direction: normal;
      -ms-flex-direction: row;
      flex-direction: row;
      -webkit-justify-content: space-evenly;
      -moz-box-pack: space-evenly;
      -ms-flex-pack: space-evenly;
      justify-content: space-evenly;
      -webkit-align-items: center;
      -moz-box-align: center;
      -ms-flex-align: center;
      align-items: center;

      & > div {
        height: 15.75rem;
        max-width: 20rem;

        & > .titleS {
          max-width: 20rem;
          margin-bottom: 2.375rem;
          font-size: 1.25rem;
          font-weight: normal;
          font-stretch: normal;
          letter-spacing: 0rem;
          color: #ffffff;
          overflow: hidden;
          -o-text-overflow: ellipsis;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 1;
          /* 省略号在第几行 */
        }

        & > .titleS:hover {
          cursor: pointer;
        }

        & > div:nth-child(n + 2) {
          max-width: 20rem;
          font-size: 1rem;
          font-weight: normal;
          font-stretch: normal;
          line-height: 1.75rem;
          letter-spacing: 0rem;
          color: #ffffff;
          overflow: hidden;
          -o-text-overflow: ellipsis;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 1;
          /* 省略号在第几行 */
        }

        & > div:nth-child(n + 2):hover {
          cursor: pointer;
        }
      }
    }
  }

  & > .footer_bottom {
    width: 100%;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -moz-box-orient: horizontal;
    -moz-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background-color: #19303b;

    & > .bottom_model {
      width: 84.25rem;
      height: 6.375rem;
      // border: 1px solid red;
      display: -webkit-flex;
      display: -moz-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-flex-direction: row;
      -moz-box-orient: horizontal;
      -moz-box-direction: normal;
      -ms-flex-direction: row;
      flex-direction: row;
      -webkit-justify-content: space-evenly;
      -moz-box-pack: space-evenly;
      -ms-flex-pack: space-evenly;
      justify-content: space-evenly;
      -webkit-align-items: center;
      -moz-box-align: center;
      -ms-flex-align: center;
      align-items: center;

      & > img {
        width: 3.75rem;
        height: 3.875rem;
      }

      & > img:last-child {
        width: 7rem;
        height: 4.6875rem;
      }

      & > div {
        font-size: 1.125rem;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: -0.0625rem;
        color: #ffffff;
      }
    }
  }
}
</style>
