<!--
    @name: OrderAddress
    @author: kahu4
    @date: 2024-01-22 11:41
    @description：OrderAddress
    @update: 2024-01-22 11:41
-->
<script setup>

import { toRefs } from "vue";
import { orderAddressIcon } from "@/utils/images";

const props = defineProps({
  orderInfoData: {
    type: Object,
    required: true
  }
})

const {orderInfoData} = toRefs(props)
</script>

<template>
  <view class="address noBorder">
    <view class="address-icon">
      <image
          :src="orderAddressIcon"
          class="image"
      />
    </view>
    <view class="address-main">
      <template v-if="orderInfoData.shippingType!==2">
        <view class="address-header">
          <view class="address-name">{{ orderInfoData.realName }}</view>
          <view class="address-phone">{{ orderInfoData.userPhone }}</view>
        </view>
        <view class="address-content">
          <view class="address-desc">{{ orderInfoData.userAddress }}</view>
        </view>
      </template>
      <template v-else>
        <view class="address-header">
          <view class="address-name">{{ orderInfoData.storeName }}</view>
        </view>
        <view class="address-content">
          <view class="address-desc">{{ orderInfoData.shopAddress }}</view>
        </view>
      </template>
    </view>
  </view>
</template>

<style
    scoped
    lang="scss">

</style>
