<template>
  <view class="flex rounded-19rpx box-content card" @click="goPage(`/pages/user/detail?id=${item.id}`)">
    <view class="rounded-full w-100rpx h-100rpx overflow-hidden">
      <image class="w-full h-full" :src="item.avatar"></image>
    </view>
    <view class="flex-1 ml-20rpx flex flex-col justify-between">
      <view class="flex text-sm">
        <view>{{ item.name }}</view>
        <template v-if="item.jobs">
          <uv-tags
            v-for="job in item.jobs"
            class="ml-20rpx"
            :text="job.name"
            :key="job.id"
            plain
            size="mini"
            type="primary"
          ></uv-tags>
        </template>
      </view>
      <view class="text-24rpx text-hex-999">
        <view class="">电话：{{ item.phone }}</view>
        <view class="" v-if="item.store">门店：{{ item.store.address }}</view>
      </view>
    </view>
  </view>
</template>
<script setup>
defineProps({
  item: {
    type: Object,
    default: () => ({}),
  },
})
const goPage = (url) => {
  uni.navigateTo({
    url,
  })
}
</script>
