index.tsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { View, Text, Image } from "@tarojs/components";
  2. import DigitalCardBasic from "@/components/DigitalCard/DigitalCardBasic";
  3. export interface IndexProps {
  4. data: {
  5. certificated?: boolean
  6. name: string
  7. position?: string
  8. avatarUrl?: string
  9. company: string
  10. agentName: string
  11. visitNum: number
  12. chatNum: number
  13. disLikeNum: number
  14. visitTime: number
  15. }
  16. }
  17. const Index = ({ data }: IndexProps) => {
  18. return <View className="bg-white rounded-12 p-12">
  19. <View className="flex items-start gap-12">
  20. <View className="flex items-star rounded-full overflow-hidden">
  21. <View className="w-56 h-56 bg-gray-3 rounded-full">
  22. {(!!data.avatarUrl) && <Image src={data.avatarUrl} mode="aspectFill" className="w-56 h-56 bg-gray-3 rounded-full"></Image>}
  23. </View>
  24. </View>
  25. <View className="flex flex-col gap-8">
  26. <DigitalCardBasic name={data.name} position={data.position ?? ''} company={data.company} certificated />
  27. <View className="text-14 font-medium leading-22">第 <Text className="text-yellow">{data.visitNum}</Text> 次访问了你的智能体【{data.agentName}】</View>
  28. <View className="flex-center text-12 leading-20">
  29. <View className="flex-1"><Text className="text-primary">{data.chatNum}</Text> 轮对话</View>
  30. <View className="text-gray-45 leading-20">5小时前</View>
  31. </View>
  32. </View>
  33. </View>
  34. </View>
  35. }
  36. export default Index;