<!--
  @description: 客服电话页面
  @Modifier：haoFx/dijia
  @routerPath: /navbarAdd
  @date：2021-11-24 15:46:46
-->
<template>
  <div class="customer">
    <div class="banner_wrap">
      <div class="banner clearfix">
        <a href="#/shop/shopHome" class="logo fl">
          <img :src="WebConfig.imgMajor">
        </a>
        <ul class="uc-nav fl">
          <li>
            <router-link to="/shop/shopHome">
              我的首页
            </router-link>
          </li>
          <li>
            <a @click="goToAccountInfo">
              我的账户
            </a>
          </li>
        </ul>
      </div>
    </div>
    <div class="autohe">
      <div style="background: #fff;">
        <!-- <div class="concent">
          <div class="top">
            <p>北京京能电子商务平台项目组</p><span style="margin-left:35px;font-weight: 700;">客服中心：400-0809-508</span>
          </div>
        </div> -->
        <div v-for="(item, index) in list" :key="index" class="concent">
          <div class="top">
            <img :src="item.picture" alt="">
            <p>{{ item.pictureName }}</p>
          </div>
          <div class="mid">
            <div style="font-weight: 700">
              客服信息：
            </div>
            <div style="font-size: 12px; margin: 8px 0 15px 0">
              客服电话：{{ item.telNumber }}
            </div>
            <div style="font-weight: 700">
              对账联系人信息：
            </div>
            <div style="font-size: 12px; margin-top: 8px">
              <span>姓名：{{ item.customerName }}</span>
              <span style="margin-left: 3em">电话：{{ item.phoneNumber }}</span>
              <span style="margin-left: 3em">联系邮箱：{{ item.email }}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- footer -->
    <div class="footer">
      <div class="footer_wrap">
        <ul class="help">
          <li class="help_list">
            <img src="@/assets/img/shopmall/footer_01.png">
            <span>正品保障</span>
          </li>
          <li class="help_list">
            <img src="@/assets/img/shopmall/footer_02.png">
            <span>价格优惠</span>
          </li>
          <li class="help_list">
            <img src="@/assets/img/shopmall/footer_03.png">
            <span>双向信用</span>
          </li>
          <li class="help_list">
            <img src="@/assets/img/shopmall/footer_04.png">
            <span>售后无忧</span>
          </li>
        </ul>
        <div class="copyright">
          <div>
            {{ WebConfig.platform }}
            <!-- © 2019 国信创新科技股份有限公司 版权所有，不得转载       粤ICP备15076859号 -->
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// api
import { getShptCustomerList } from '@/api/shoppingmall/products'
import { getLoginRegistImage } from '@/api/common/tools.js' // 地址加密获取图片
import { getToken } from '@/assets/js/utils/auth'
/* vuex*/
import { mapGetters } from 'vuex'
export default {
  name: 'NavbarAdd',
  components: {},
  data() {
    return {
      list: [],
      // 请求客服列表的对象
      requestData: {
        pageNo: 0,
        pageSize: 10,
        useStatus: '01'
      }
    }
  },
  computed: {
    /* WebConfig 项目配置数据*/
    ...mapGetters(['WebConfig'])
  },
  created() {
    this.initData()
    if (getToken()) {
      this.isLogin = true
    }
  },
  methods: {
    initData() {
      getShptCustomerList(this.requestData).then((res) => {
        this.list = res.data.records
        this.list.forEach((item) => {
          item.picture = getLoginRegistImage(item.picture)
        })
      })
    },
    // 跳转到 个人信息
    goToAccountInfo() {
      if (!this.isLogin) {
        this.$message({
          type: 'warning',
          message: '请先登录！'
        })
        return
      }
      this.$router.push('/personalCenter/accountInfo')
    }
  }
}
</script>

<style scoped lang="less">
.mid {
  padding: 5px 15px;
}
.footer {
  width: 100%;
  margin: 0 auto;
  background-color: #fff;
}
.autohe {
  // height: calc(100vh - 218px);
  max-width: 1366px;
  margin: 20px auto 10px;
  min-height: 100vh;
  overflow: auto;
}
.banner_wrap {
  background: @hyacinthine;
  height: 70px;
}
.banner {
  max-width: 1366px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  color: #fff;
  .uc-nav {
    margin-left: 104px;
    li {
      width: 120px;
      float: left;
      height: 36px;
      line-height: 36px;
      padding: 0 15px;
      // border: 1px solid transparent;
      // border-bottom: 0;
    }
  }
  .myshoppingCart {
    width: 700px;
    display: flex;
    justify-content: flex-end;
    font-size: 18px;
    p {
      // border: 1px solid #ccc;
      width: 220px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    i.iconfont {
      margin-right: 30px;
    }
  }
}
.customer {
  width: 100%;
  background: #f7f8fa;
  overflow: auto;
  height: 100vh;
}
.concent {
  margin-bottom: 10px;
  box-shadow: 2px 2px 5px #ccc;
  border: 1px solid rgba(242, 242, 242, 1);
  padding: 16px;

  .top {
    display: flex;
    align-items: center;
    // border: 1px solid #ccc;
    padding: 5px 15px;
    img {
      width: 75px;
      height: 75px;
    }
    p {
      font-size: 16px;
      margin-left: 30px;
      font-weight: 700;
      letter-spacing: 1px;
    }
  }
}
.footer_wrap {
  max-width: 1250px;
  margin: 0 auto;
  // border-top: 1px solid #EEEEEE;
  .help {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    .help_list {
      padding-right: 80px;
      border-right: 1px solid #eeeeee;
      img {
        margin-left: 50px;
        margin-right: 20px;
      }
      &:last-child {
        border: none;
      }
    }
  }
  .copyright {
    color: #999;
    font-size: 12px;
    letter-spacing: 2px;
    text-align: center;
    height: 40px;
    line-height: 40px;
  }
}
</style>
