index.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { View } from "@tarojs/components";
  2. import BottomBar from "@/components/BottomBar";
  3. import PageCustom from "@/components/page-custom/index";
  4. import NavBarNormal from "@/components/NavBarNormal/index";
  5. import editorStyle from "../editor.module.less";
  6. import { useAgentStore } from "@/store/agentStore";
  7. import WemetaTextarea from "@/components/wemeta-textarea/index";
  8. import useEditContactCard from "@/hooks/useEditContactCard";
  9. export default function Index() {
  10. const agentCard = useAgentStore((state) => state.agentContactCard);
  11. const { value, onChange, handleSubmit } = useEditContactCard(
  12. "mobile",
  13. agentCard?.mobile
  14. );
  15. return (
  16. <PageCustom>
  17. <NavBarNormal backText="手机号码"></NavBarNormal>
  18. <View className="flex flex-col items-center w-full">
  19. <View className="w-full p-16">
  20. <WemetaTextarea
  21. value={value}
  22. onBlur={(value: string) => onChange(value)}
  23. onInput={(value: string) => onChange(value)}
  24. placeholder="填写手机号码"
  25. autoFocus
  26. />
  27. </View>
  28. <BottomBar>
  29. <View
  30. className="button-rounded button-primary flex-1"
  31. onClick={handleSubmit}
  32. >
  33. 保存
  34. </View>
  35. </BottomBar>
  36. </View>
  37. </PageCustom>
  38. );
  39. }