<style>
  .GuestAddressList .el-button-group .el-button{
    padding:5px;
  }
</style>

<template>
  <div class="flexOne GuestAddressList">
    <div class="clearfix"></div>
    <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
      <tr>
        <th>省</th>
        <th>市</th>
        <th>区县</th>
        <th>详细地址</th>
        <th>联系人</th>
        <th>联系人电话</th>
        <th>是否默认地址</th>
      </tr>
      <tr v-for="(item,index) in dataList" :key="index">
        <td>{{item.GuestProvince}}</td>
        <td>{{item.GuestCity}}</td>
        <td>{{item.GuestDistrictCounty}}</td>
        <td>{{item.DetaileAddress}}</td>
        <td>{{item.LinkMan}}</td>
        <td>{{item.LinkTel}}</td>
        <td>
          <template v-if="item.IsDefault==1">
             默认
          </template>
        </td>
      </tr>
    </table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        //查询参数
        msg: {
         GuestAccountId:0,
        },
        loading: false,
        dataList: [],
      };
    },
    mounted() {
      this.msg.GuestAccountId=this.$route.query.Id;
      this.getList();
    },
    filters: {},
    methods: {
      //获取数据
      getList() {
        this.loading = true;
        this.apipost("ShopGuest_get_GetGuestAddressListService", this.msg, res => {
          this.loading = false;
          if (res.data.resultCode === 1) {
            this.dataList = res.data.data;
          } else {
            this.Error(res.data.message);
          }
        }, null);
      },
    }
  };
</script>