<style>
  .hor_BtmContent {
    display: inline-block;
    width: 100%;
    background: #fff;
  }

  .hor_BtmContent .footer-top {
    padding: 0 40px 18px;
    background-color: #313131;
  }

  .hor_BtmContent .footer-link {
    display: inline-block;
    width: 100%;
    height: 44px;
    background-color: #292929;
    text-align: left;
    font-weight: 700;
  }

  .hor_BtmContent .hor_footuu li:first-child {
    color: #fff;
    margin-left: 24px;
  }

  .hor_BtmContent .hor_footuu {
    margin: 0;
    padding: 0;
  }

  .hor_BtmContent .hor_footuu li {
    list-style-type: none;
    display: inline-block;
    margin-left: 30px;
    font-size: 15px;
    color: #76ccff;
    line-height: 44px;
    position: relative;
    cursor: pointer;
  }

  .hor_BtmContent .hor_footuu li a {
    color: #76ccff;
  }

  .hor_BtmContent .hor_BtmContent ul {
    margin: 0;
    padding: 0;
  }

  .hor_BtmContent .other_li:before {
    position: absolute;
    top: 10px;
    left: -16px;
    content: '';
    width: 1px;
    height: 25px;
    background-color: rgba(58, 58, 58, .8);
  }

  .hor_BtmContent .foot_content {
    display: flex;
    justify-content: space-around;
    width: 100%;
    text-align: left;
  }

  .hor_BtmContent .footer-box {
    width: 100%;
    padding: 20px;
    font-size: 14px;
    text-align: left;
  }

  .hor_BtmContent .footer-box .footer_title1 {
    font-size: 15px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 1px;
  }

  .hor_BtmContent .footer_table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 10px;
  }

  .hor_BtmContent .footer_table td {
    color: #b1b1b1;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
  }

  .hor_BtmContent .footer_tbtitle {
    min-width: 100px;
    color: #9bdaff !important;
  }

  .hor_BtmContent .footer-box>* {
    display: block;
    margin-bottom: 10px;
  }

  .hor_BtmContent .social-link a {
    display: inline-block;
    text-decoration: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    line-height: 55px;
    text-align: center;
    margin: 15px 0 0 20px;
    -webkit-box-shadow: 0 3px 12px rgba(39, 39, 39, .95);
    -moz-box-shadow: 0 3px 12px rgba(39, 39, 39, .95);
    box-shadow: 0 3px 12px rgba(39, 39, 39, .95);
  }

  .hor_BtmContent .social-link a:first-child {
    margin-left: 0;
  }

  .social-link a i {
    font-size: 30px;
  }

  .hor_BtmContent .foot_line {
    background-color: #1bb71f
  }

  .hor_BtmContent .foot_fb {
    background-color: #334f8d;
  }

  .hor_BtmContent .foot_mail {
    background-color: #00a6ff;
  }

  .hor_BtmContent .footer_logo_block {
    display: block;
    margin-top: 5px;
  }

  .hor_BtmContent .footer_fb_group {
    display: block;
    width: 300px;
    height: 130px;
    background-color: #2b2b2b;
  }

  .footer_fb_group a img {
    height: 100%;
    min-height: initial;
    width: auto;
  }

  .hor_BtmContent .footer_qrcode a {
    display: inline-block;
    width: 100px;
    height: 100px;
  }

  .hor_BtmContent .footer_qrcode a span {
    color: #fff;
    letter-spacing: 2px;
  }

  .hor_BtmContent .branch-company {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 20px;
    background-color: #2d2d2d;
  }

  .hor_BtmContent .footer-bottom {
    width: 100%;
    padding: 30px;
    text-align: center;
  }

  .hor_BtmContent .sponsor {
    display: inline-block;
  }

  .hor_BtmContent .sponsor>a {
    float: left;
    width: 40px;
    text-decoration: none;
    margin-right: 10px;
  }

  .hor_BtmContent .sponsor>a img {
    width: 100%;
  }

  .hor_BtmContent .copyright {
    display: inline-block;
    width: 100%;
    font-size: 13px;
    margin: 20px 0;
    color: #757575;
  }

  .hor_BtmContent .branch-company .footer-box {
    width: 33%;
  }

  .hor_BtmContent .footer-watermark {
    position: fixed;
    top: 110px;
    z-index: 999;
    width: auto;
  }

  .hor_BtmContent .footer_Left {
    left: 10px;
  }

  .hor_BtmContent .footer_Right {
    right: 10px;
  }

  .footer-watermark>div {
    width: auto;
    width: 140px;
    height: 140px;
    margin-bottom: 10px;
  }

  .footer-watermark>div img {
    width: 100%;
    height: 100%;
  }

  @media only screen and (max-width: 930px) {
    .hor_BtmContent .footer-top {
      padding: 0 15px;
    }

    .hor_BtmContent .footer-link {
      height: auto;
    }

    .hor_BtmContent .hor_footuu li:first-child {
      margin-left: 24px;
    }

    .hor_BtmContent .hor_footuu li {
      font-size: 13px;
      margin-left: 28px;
    }

    .hor_BtmContent .foot_content {
      flex-wrap: wrap;
      justify-content: flex-start;
    }

    .hor_BtmContent .footer-box {
      width: 50% !important;
    }
  }

  @media only screen and (max-width: 520px) {
    .hor_BtmContent .footer-box {
      width: 100% !important;
    }
  }

</style>
<template>
  <div class="hor_BtmContent">
    <template v-if="dataList&&dataList.Config">
      <div class="footer-top">
        <div class="footer-link">
          <ul class="hor_footuu">
            <li><a @click="CommonJump('/index',{})">{{dataList.Config.Name}}</a></li>
            <li class="other_li" v-for="(item,index) in dataList.FooterList" :key="index">
              <a @click="CommonJump(item.url,{})">{{item.title}}</a>
            </li>
          </ul>
        </div>
        <div class="foot_content">
          <div class="footer-box">
            <div class="footer_title1">聯絡資訊</div>
            <table class="footer_table">
              <tbody>
                <tr>
                  <td class="footer_tbtitle">地址</td>
                  <td>
                    {{dataList.Config.Address}}
                  </td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">電話</td>
                  <td>{{dataList.Config.Tel}}</td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">傳真</td>
                  <td>{{dataList.Config.Fax}}</td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">服務時間</td>
                  <td>{{dataList.Config.ServiceTime}}</td>
                </tr>
              </tbody>
            </table>
            <div class="social-link">
              <a class="foot_line" @click="OpenNewUrl(dataList.Config.LineUrl)">
                <i class="iconfont iconline"></i>
              </a>
              <a class="foot_fb" @click="OpenNewUrl(dataList.Config.FaceBookUrl)">
                <i class="iconfont iconzan" style="position:relative;top:-2px;"></i>
              </a>
              <a class="foot_mail" @click="OpenNewUrl(dataList.Config.ServiceMail)">
                <i class="iconfont iconemail"></i>
              </a>
            </div>
          </div>
          <div class="footer-box">
            <div class="footer_title1">公司資訊</div>
            <table class="footer_table">
              <tbody>
                <tr>
                  <td class="footer_tbtitle">{{dataList.Config.TypeStr}}</td>
                  <td>{{dataList.Config.JiaoGuanCode}}</td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">品保協會會員</td>
                  <td>{{dataList.Config.PingBaoCode}}</td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">統一編號</td>
                  <td>{{dataList.Config.UnifyCode}}</td>
                </tr>
                <tr>
                  <td class="footer_tbtitle">代表人</td>
                  <td>{{dataList.Config.Behalf}}</td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="footer-box">
            <div class="footer_logo_block">
              <img style="width:120px;height:auto;" :src="dataList.Config.WhiteLogo" />
            </div>
            <div class="footer_fb_group">
              <a :href="dataList.Config.FaceBookUrl">
                <div class="fb-page" :data-href="dataList.Config.FaceBookUrl" data-tabs="timeline" data-width="340"
                  data-height="130" data-small-header="false" data-adapt-container-width="false" data-hide-cover="false"
                  data-show-facepile="false">
                  <blockquote :cite="dataList.Config.FaceBookUrl" class="fb-xfbml-parse-ignore"><a
                      :href="dataList.Config.FaceBookUrl">{{dataList.Config.Name}}</a></blockquote>
                </div>
              </a>
            </div>
          </div>
        </div>
        <div class="branch-company">
          <div class="footer-box">
            <template v-if="dataList.BranchList&&dataList.BranchList.length>0">
              <div class="footer_title1">{{dataList.BranchList[0].Name}}</div>
              <table class="footer_table">
                <tbody>
                  <tr>
                    <td class="footer_tbtitle">地址</td>
                    <td>{{dataList.BranchList[0].Address}}</td>
                  </tr>
                  <tr>
                    <td class="footer_tbtitle">電話</td>
                    <td>{{dataList.BranchList[0].Tel}}</td>
                  </tr>
                  <tr>
                    <td class="footer_tbtitle">傳真</td>
                    <td>{{dataList.BranchList[0].Fax}}</td>
                  </tr>
                </tbody>
              </table>
            </template>
          </div>
        </div>
      </div>
      <div class="footer-bottom">
        <div class="sponsor">
          <a @click="OpenNewUrl(item.url)" target="_blank" v-for="(item,index) in dataList.BottomList" :key="index">
            <img :src="item.icon" />
          </a>
        </div>
        <div class="copyright">
          © {{year}} {{dataList.Config.Name}}. All rights reserved.
        </div>
      </div>
      <div class="footer-watermark footer_Left">
        <template v-if="dataList&&dataList.AdLeftList">
          <div v-for="(item,index) in getAdLeftList" :key="index">
            <a @click="OpenNewUrl(item.AdLink)">
              <img style="width:100%" :src="item.AdImg" />
            </a>
          </div>
        </template>
      </div>
      <div class="footer-watermark footer_Right">
        <template v-if="dataList&&dataList.AdRightList">
          <div v-for="(item,index) in getAdRightList" :key="index">
            <a @click="OpenNewUrl(item.AdLink)">
              <img style="width:100%" :src="item.AdImg" />
            </a>
          </div>
        </template>
      </div>
    </template>
  </div>
</template>
<script>
  export default {
    props: ["dataList"],
    data() {
      return {
        year: ''
      };
    },
    created() {},
    mounted() {
      //获取当前年
      var myDate = new Date();
      this.year = myDate.getFullYear();
    },
    computed: {
      getAdLeftList() {
        var tempArray = [];
        var showId = this.getShowId();
        if (this.dataList && this.dataList.AdLeftList) {
          this.dataList.AdLeftList.forEach(item => {
            if (item.ShowPage.indexOf(showId) > -1) {
              tempArray.push(item);
            }
          });
        }
        return tempArray;
      },
      getAdRightList() {
        var tempArray = [];
        var showId = this.getShowId();
        if (this.dataList && this.dataList.AdRightList) {
          this.dataList.AdRightList.forEach(item => {
            if (item.ShowPage.indexOf(showId) > -1) {
              tempArray.push(item);
            }
          });
        }
        return tempArray;
      }
    },
    methods: {
      getShowId() {
        let locationName = this.GetDomain();
        var routeStr = this.$route.path.toLowerCase();
        var showId = 0;
        switch (routeStr) {
          case "/index":
            showId = 1;
            break;
          case '/search':
            showId = 2;
            break;
          case '/trip':
            showId = 3;
            break;
          case '/self':
            showId = 4;
            break;
        }
        return showId;
      }
    },
  };

</script>
