index.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { View } from "@tarojs/components";
  2. import AgentSettingList from './components/AgentSettingList'
  3. import AgentKnowledgeLib from './components/AgentKnowledgeLib'
  4. import AgentEmptyCard from './components/AgentEmptyCard'
  5. import AgentContactCard from './components/AgentContactCard'
  6. import React, { useEffect, useState } from "react";
  7. import { getAgents, getAgent, createAgent } from "@/service/agent";
  8. import { TAgentItem } from '@/types/agent'
  9. export default React.memo(function Index() {
  10. console.log('agent setting')
  11. const fetchAgent = async () => {
  12. // const a = await getAgent()
  13. // console.log(a)
  14. }
  15. const fetchAgents = async () => {
  16. const a = await getAgents()
  17. console.log(a)
  18. }
  19. useEffect(()=> {
  20. fetchAgents()
  21. }, [])
  22. return (
  23. <View>
  24. <AgentEmptyCard></AgentEmptyCard>
  25. <View className="mb-20">
  26. <AgentContactCard></AgentContactCard>
  27. </View>
  28. <AgentSettingList></AgentSettingList>
  29. <View className="pt-20">
  30. <AgentKnowledgeLib></AgentKnowledgeLib>
  31. </View>
  32. </View>
  33. );
  34. })