<template>
  <q-item class="bg-white" :to="{path:'/customer/'+props.item.id}">
    <q-item-section avatar>
      <UserAvatar color="accent" :src="props.item.avatar_url||props.item.avatar"/>
    </q-item-section>
    <q-item-section>
      <q-item-label>{{ props.item.remark || props.item.nickname || '匿名' }}</q-item-label>
      <q-item-label caption v-if="props.type == 1">{{ props.item.pay_time }} 下单{{ formatMoney(props.item.pay_money) }} {{ props.item.lottery_state_name }}</q-item-label>
      <q-item-label caption v-else>注册：{{ formatDate(props.item.created_at) }}</q-item-label>
    </q-item-section>
    <q-item-section side>
      <q-item-label class="text-red">{{ formatMoney(props.item.balance) }}</q-item-label>
      <q-item-label caption v-if="props.type == 1">{{ props.item.profit_rate }}</q-item-label>
    </q-item-section>
  </q-item>
</template>
<script setup>
import { formatDate,formatMoney } from 'src/utils/tools'
const props = defineProps({
  item: {},
  type: {

  }
})
</script>
