<template>
  <view class="address-book-container">
    <u-card :show-head="false" :show-foot="false" margin="0" border-radius="16">
      <template #body>
        <view class="address-book-content">
          <view class="left">
            <u-image
              width="92rpx"
              height="92rpx"
              shape="circle"
              :src="baseUrl + '/' + addressBookItem.proPhoto"
            ></u-image>
            <view class="content">
              <h4>{{ addressBookItem.stuName }}</h4>
              <text class="tel">{{ addressBookItem.Phone }}</text>
              <text>单位：{{ addressBookItem.stuUnit }}</text>
            </view>
          </view>
        </view>
      </template>
    </u-card>
  </view>
</template>

<script setup lang="ts">
import { baseUrl } from "@/utils/request";
const props = defineProps({
  addressBookItem: {
    type: Array,
    default: () => [],
  } as any,
});

const contact = () => {
  location.href = "tel:" + props.addressBookItem.Phone;
};
</script>

<style lang="scss" scoped>
.address-book-container {
  margin-bottom: 32rpx;
  // height: 200rpx;

  :deep(.u-card__body) {
    padding: 16rpx 32rpx !important;
  }

  .address-book-content {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .left {
      display: flex;
      align-items: center;

      .content {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        margin-left: 20rpx;
        color: #909399;
        font-size: 26rpx;

        h4 {
          font-size: 28rpx;
          font-weight: 500;
          color: #000000;
        }

        .tel {
          margin: 8rpx 0 4rpx;
          font-size: 24rpx;
          font-weight: 400;
          color: rgba(34, 34, 34, 0.5);
        }
      }
    }

    uni-button {
      margin: 0;
    }
  }
}
</style>
