Explorar o código

删除原联系人设置逻辑

王晓东 hai 1 mes
pai
achega
fcac7962a0
Modificáronse 49 ficheiros con 155 adicións e 761 borrados
  1. 0 15
      src/app.config.ts
  2. 24 34
      src/components/AgentPage/components/AgentActionBar/index.tsx
  3. 2 1
      src/components/AgentPage/components/AgentQRcode/index.module.less
  4. 5 3
      src/components/AgentPage/components/AgentQRcode/index.tsx
  5. 2 2
      src/components/AgentPage/components/AgentSwap/index.module.less
  6. 36 5
      src/components/AgentPage/components/AgentSwap/index.tsx
  7. 7 8
      src/components/AvatarConfirm/index.module.less
  8. 1 1
      src/components/AvatarConfirm/index.tsx
  9. 3 3
      src/components/UploaderGrid/index.tsx
  10. 1 1
      src/components/form/FormItemSingleImage/index.tsx
  11. 9 0
      src/components/icon/IconDelete/index.tsx
  12. 0 7
      src/components/icon/IconDeleteGray16/index.tsx
  13. 1 2
      src/components/qrcode-upload-tips/index.tsx
  14. 0 55
      src/hooks/useEditAgent.ts
  15. 0 50
      src/hooks/useEditContactCard.ts
  16. 3 0
      src/images/svgs/IconDeleteBlack16.svg
  17. 1 1
      src/pages/agent-avatars/index.tsx
  18. 4 3
      src/pages/agent/components/AgentSetting/components/AgentCard/index.module.less
  19. 3 1
      src/pages/agent/components/AgentSetting/components/AgentContactCard/index.module.less
  20. 8 74
      src/pages/editor-contact/index.tsx
  21. 7 7
      src/pages/editor-correction-item/index.tsx
  22. 7 7
      src/pages/editor-knowledge-item/index.tsx
  23. 0 5
      src/pages/editor-pages/editor-address/index.config.ts
  24. 0 2
      src/pages/editor-pages/editor-address/index.module.less
  25. 0 61
      src/pages/editor-pages/editor-address/index.tsx
  26. 0 5
      src/pages/editor-pages/editor-email/index.config.ts
  27. 0 2
      src/pages/editor-pages/editor-email/index.module.less
  28. 0 40
      src/pages/editor-pages/editor-email/index.tsx
  29. 0 5
      src/pages/editor-pages/editor-ent-name/index.config.ts
  30. 0 2
      src/pages/editor-pages/editor-ent-name/index.module.less
  31. 0 40
      src/pages/editor-pages/editor-ent-name/index.tsx
  32. 24 16
      src/pages/editor-pages/editor-link-contact/index.tsx
  33. 1 1
      src/pages/editor-pages/editor-link/index.tsx
  34. 0 5
      src/pages/editor-pages/editor-name/index.config.ts
  35. 0 2
      src/pages/editor-pages/editor-name/index.module.less
  36. 0 40
      src/pages/editor-pages/editor-name/index.tsx
  37. 0 5
      src/pages/editor-pages/editor-phone/index.config.ts
  38. 0 2
      src/pages/editor-pages/editor-phone/index.module.less
  39. 0 42
      src/pages/editor-pages/editor-phone/index.tsx
  40. 0 5
      src/pages/editor-pages/editor-position/index.config.ts
  41. 0 2
      src/pages/editor-pages/editor-position/index.module.less
  42. 0 40
      src/pages/editor-pages/editor-position/index.tsx
  43. 0 5
      src/pages/editor-pages/editor-qrcode/index.config.ts
  44. 0 13
      src/pages/editor-pages/editor-qrcode/index.module.less
  45. 0 70
      src/pages/editor-pages/editor-qrcode/index.tsx
  46. 1 1
      src/pages/message-editor/index.tsx
  47. 0 36
      src/service/agent.ts
  48. 2 33
      src/store/agentStore.ts
  49. 3 1
      src/store/modalStore.ts

+ 0 - 15
src/app.config.ts

@@ -26,27 +26,12 @@ export default defineAppConfig({
     'pages/privacy/index',
     'pages/account/index',
     'pages/agreement/index',
-
-    'pages/test/index',
     'pages/component-library/index',
-    'pages/editor-pages/editor-name/index',
 
-    'pages/editor-pages/editor-phone/index',
     'pages/editor-pages/editor-tel/index',
-    'pages/editor-pages/editor-email/index',
-    'pages/editor-pages/editor-address/index',
-    'pages/editor-pages/editor-qrcode/index',
-    'pages/editor-pages/editor-ent-name/index',
-    'pages/editor-pages/editor-position/index',
-
-
-
     'pages/editor-pages/editor-channels/index',
-
-
     'pages/editor-pages/editor-media/index',
 
-
     'pages/editor-pages/editor-link/index',
     'pages/editor-pages/editor-mini-program/index',
     'pages/editor-pages/editor-link-social/index',

+ 24 - 34
src/components/AgentPage/components/AgentActionBar/index.tsx

@@ -7,7 +7,7 @@ import IconChatWhite from "@/components/icon/icon-chat-white";
 import IconQRCodeBlack from "@/components/icon/icon-qrcode-black";
 import IconSendBlack from "@/components/icon/icon-send-black";
 import IconEditBlack from "@/components/icon/icon-edit-black";
-import IconMoreBlack from "@/components/icon/IconMoreBlack";
+import IconDelete from "@/components/icon/IconDelete";
 
 import ContactIcon from '@/components/ContactIcon'
 import { useIsLogin } from "@/xiaolanbenlib/hooks/data/useAuth";
@@ -49,18 +49,17 @@ export default ({agent, isVisitor}: IProps) => {
         content: <View className="w-200">{agent.deletedTip}</View>,
         showCancelButton: false,
         onConfirm() {
-          Taro.showTabBar().catch(()=> {});
-        },
-        onCancel() {
-          Taro.showTabBar().catch(()=> {});
-        },
+          Taro.showTabBar();
+        }
       })
+
       return
     }
 
     Taro.navigateTo({
       url: `/pages/chat/index?agentId=${agent.agentId}&isVisitor=${isVisitor}`,
     });
+
   }
 
   const handleEdit = ()=> {
@@ -78,11 +77,20 @@ export default ({agent, isVisitor}: IProps) => {
     return value?.length ? value :  <Text className="text-12 text-black-50">{defaultValue}</Text>
   }
 
-  // 允许更多操作,非企业智能体且非访问者身份
-  const enableMoreAction = !agent?.isEnt && !isVisitor
+  // 允许删除操作,非企业智能体且非访问者身份
+  const enableDeleteAction = !agent?.isEnt && !isVisitor
   // 是自己的智能体或者有二维码地址
   const enableQrcode = !isVisitor || !!agent?.qrCodeUrl?.length
 
+  const handleDelete = ()=> {
+    Taro.hideTabBar();
+    showModal({
+      content: <>确认删除该智能体?</>,
+      onConfirm() {
+        confirmDelete()
+      }
+    })
+  }
 
   return (
     <View className="relative w-full">
@@ -133,6 +141,11 @@ export default ({agent, isVisitor}: IProps) => {
                 <IconQRCodeBlack />
               </View>}
 
+              {/* 删除  */}
+              {enableDeleteAction && <View className={style.boxButton} onClick={handleDelete}>
+                <IconDelete color="black" />
+              </View>}
+
               {/* 智能体分享 */}
               <View
                 className={style.boxButton}
@@ -150,13 +163,6 @@ export default ({agent, isVisitor}: IProps) => {
               >
                 <IconEditBlack />
               </View>}
-
-              {/* 更多操作 */}
-              {enableMoreAction && <View className={style.boxButton} onClick={()=> {
-                setShowPopup(true)
-              }}>
-                <IconMoreBlack />
-              </View>}
             </View>
           </View>
 
@@ -195,31 +201,15 @@ export default ({agent, isVisitor}: IProps) => {
       ></SharePopup>}
 
       {/* 删除弹层 */}
-      <PopupSheets
+        {/* <PopupSheets
           setShow={setShowPopup}
           show={showPopup}
           content={[
             {item: <View className="text-12 font-normal text-gray-4">删除后所有数据将被清空,且无法恢复</View>},
-            {item:'删除', type: 'warn', onClick: ()=> {
-              setShowPopup(false);
-              setTimeout(()=> {
-                Taro.hideTabBar();
-              },300)
-              showModal({
-                content: <>确认删除该智能体?</>,
-                onConfirm() {
-                  confirmDelete()
-                  Taro.showTabBar().catch(()=> {});
-                },
-                onCancel() {
-                  Taro.showTabBar().catch(()=> {});
-                },
-              })
-
-            }},
+            {item:'删除', type: 'warn'},
           ]}
         >
-        </PopupSheets>
+        </PopupSheets> */}
 
         {/* 登录弹窗 */}
         <LoginPopup showPopup={showLogin} setShowPopup={setShowLogin}></LoginPopup>

+ 2 - 1
src/components/AgentPage/components/AgentQRcode/index.module.less

@@ -1,6 +1,6 @@
 .container{
   padding-top: 12px;
-  height: 60vh;
+  min-height: 346px;
   display: flex;
   align-items: center;
   flex-direction: column;
@@ -12,6 +12,7 @@
   align-items: center;
   justify-content: center;
   padding: 20px;
+  overflow: hidden;
   width: 206px;
   height: 206px;
   border-radius: 16px;

+ 5 - 3
src/components/AgentPage/components/AgentQRcode/index.tsx

@@ -17,6 +17,8 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
   const { saveAgent, updateEditAgent } = useAgentStoreActions();
   const agentEdit = useAgentStore((state) => state.agentEdit);
   const isMine = (!isVisitor)
+  // 如果是自己的,则直接使用编辑的,如果是访问别人的则用 agent 内存储的信息`
+  const currentAgent = isMine ? agentEdit : agent
 
   const handleClick = async () => {
     Taro.showLoading();
@@ -40,8 +42,8 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
   }
 
   const renderQrcode = () => {
-    if (agentEdit?.qrCodeUrl) {
-      return <Image src={agentEdit?.qrCodeUrl} showMenuByLongpress mode="widthFix" style={{width: '206px', height: '206px'}}></Image>;
+    if (currentAgent?.qrCodeUrl) {
+      return <Image src={currentAgent?.qrCodeUrl} showMenuByLongpress mode="widthFix" style={{width: '206px', height: '206px'}}></Image>;
     }
 
     if(isMine){
@@ -63,7 +65,7 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
             {renderQrcode()}
           </View>
 
-          {isMine && <View className='flex items-center text-12 font-pingfangSCMedium font-medium gap-16 pt-24'>
+          {isMine && currentAgent?.qrCodeUrl && <View className='flex items-center text-12 font-pingfangSCMedium font-medium gap-16 pt-24'>
             <View className="text-primary" onClick={handleClick}>替换</View>
             <View className="text-gray-3">|</View>
             <View className="text-primary" onClick={handleClear}>清空</View>

+ 2 - 2
src/components/AgentPage/components/AgentSwap/index.module.less

@@ -5,7 +5,7 @@
 }
 .card{
   margin-bottom: 12px;
-  padding: 20px;
+  padding: 16px;
   width: 100%;
   min-height: 144px;
   border-radius: 12px;
@@ -30,4 +30,4 @@
   height: 24px;
   border-radius: 100%;
   background-color: rgba(#000, .05);
-}
+}

+ 36 - 5
src/components/AgentPage/components/AgentSwap/index.tsx

@@ -67,7 +67,7 @@ export default ({ show, setShow }: IProps) => {
     return (
       <View className={item.isDefault ? style.cardActive : style.card} onClick={() => handleClick(item)}>
         <View
-          className="flex items-start mb-24"
+          className="flex items-start mb-12"
         >
           <View className="flex flex-col flex-1 truncate">
             <View className="flex items-end gap-8 text-gray-5 truncate">
@@ -96,6 +96,15 @@ export default ({ show, setShow }: IProps) => {
     );
   };
 
+  const renderAgents = () => {
+    if(agents.length <= 0){
+      return <EmptyData type='search' className="mt-44"></EmptyData>
+    }
+    return agents.map((item) => {
+      return renderCard(item, !!item.entId);
+    });
+  };
+
   const renderPersonalAgents = () => {
     if(personalAgents.length <= 0){
       return <EmptyData type='search' className="mt-44"></EmptyData>
@@ -105,6 +114,7 @@ export default ({ show, setShow }: IProps) => {
     });
   };
 
+
   const renderEntAgents = () => {
     if (entAgents.length) {
       return entAgents.map((item) => {
@@ -129,7 +139,28 @@ export default ({ show, setShow }: IProps) => {
 
   const tabList = [
     {
-      key: "1",
+      key: "all",
+      label: "全部",
+      children: (
+        <>
+          <View className="pt-12 relative">
+            <View className={style.tabContainer}>
+              <View className="pb-66">
+                {renderAgents()}
+              </View>
+            </View>
+            <View className="absolute left-0 right-0 bottom-0 z-10 bg-white pt-14" onClick={handleCreate}>
+              <View className="button-rounded button-primary-light gap-8 mb-15">
+                <IconPlusBlue />
+                <View>创建新的智能体</View>
+              </View>
+            </View>
+          </View>
+        </>
+      )
+    },
+    {
+      key: "personal",
       label: "个人",
       children: (
         <>
@@ -150,7 +181,7 @@ export default ({ show, setShow }: IProps) => {
       ),
     },
     {
-      key: "2",
+      key: "ent",
       label: "企业",
       children: (
         <>
@@ -163,8 +194,8 @@ export default ({ show, setShow }: IProps) => {
   ];
   return (
     <View className="relative">
-      <Popup setShow={setShow} show={show} title="小蓝本">
-        <WemetaTabs current="1" list={tabList}></WemetaTabs>
+      <Popup setShow={setShow} show={show} title="切换智能体">
+        <WemetaTabs current="all" list={tabList}></WemetaTabs>
       </Popup>
     </View>
   );

+ 7 - 8
src/components/AvatarConfirm/index.module.less

@@ -21,14 +21,14 @@
 .confirmChatAvatarBg{
   position: relative;
   width: 240px;
-  min-height: 373px;
+  height: 427px;
   margin-bottom: 16px;
-  border-radius: 24px;
+  border-radius: 12px;
   overflow: hidden;
 }
 .confirmChatAvatarImage{
   width: 240px;
-  min-height: 373px;
+  height: 427px;
   overflow: hidden;
 }
 .confirmChatAvatarBgCover{
@@ -42,12 +42,11 @@
   right: 0;
   z-index: 1;
   width: 240px;
-  min-height: 373px;
+  height: 100%;
   box-sizing: border-box;
-  padding: 0 24px 54px;
-  border-radius: 24px;
+  padding: 0 24px 24px;
+  border-radius: 12px;
   gap: 8px;
-  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50.12%, #D6D6D6 100%);
 }
 .block{
   background-color: white;
@@ -62,7 +61,7 @@
   .block();
   align-self: flex-end;
   width: 123px;
-  background-color: rgba(#317CFA, .5);
+  background-color: rgba(#317CFA, 1);
 }
 .block3{
   .block();

+ 1 - 1
src/components/AvatarConfirm/index.tsx

@@ -102,7 +102,7 @@ export default function Index({ avatarItem, enabledChatBg, setEnabledChatBg, onC
 
         <View className="bottom-bar">
           <View className="grid grid-cols-2 gap-8 px-20 py-12">
-            <View className={`button-rounded`} onClick={handleChange}>更换形象</View>
+            <WemetaButton className="flex-1" type="normal"onClick={handleChange}>更换形象</WemetaButton>
             <WemetaButton className="flex-1" onClick={handleConfirm}>确定</WemetaButton>
           </View>
         </View>

+ 3 - 3
src/components/UploaderGrid/index.tsx

@@ -1,7 +1,7 @@
 import { View } from "@tarojs/components";
 import MediaItem from "@/components/media-item/index";
 import style from "./index.module.less";
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 import IconPlusGray16 from "@/components/icon/IconPlusGray16";
 import type { TMediaType } from "@/types/index";
 import Taro from "@tarojs/taro";
@@ -15,7 +15,7 @@ export interface IndexProps {
 }
 
 const Index = ({onNewUpload, list, onChange, onDelete }: IndexProps) => {
-  
+
   // 预览媒体
   const handlePreview = (e: any, index: number, item: TMediaType) => {
     e.stopPropagation();
@@ -30,7 +30,7 @@ const Index = ({onNewUpload, list, onChange, onDelete }: IndexProps) => {
       }),
     })
   };
-  
+
   return (
     <View className="grid grid-cols-3 gap-x-8 gap-y-12 justify-center">
       <View className="flex">

+ 1 - 1
src/components/form/FormItemSingleImage/index.tsx

@@ -1,7 +1,7 @@
 import { View, Image } from "@tarojs/components";
 import Taro from "@tarojs/taro";
 
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 
 import style from "./index.module.less";
 import { uploadImage } from "@/utils/http";

+ 9 - 0
src/components/icon/IconDelete/index.tsx

@@ -0,0 +1,9 @@
+import { Image } from '@tarojs/components'
+import IconGray from '@/images/svgs/IconDeleteGray16.svg'
+import IconBlack from '@/images/svgs/IconDeleteBlack16.svg'
+export default ({color = 'gray'}:{color: 'gray' | 'black'}) => {
+  if(color === 'black'){
+    return <Image src={IconBlack} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
+  }
+  return <Image src={IconGray} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
+}

+ 0 - 7
src/components/icon/IconDeleteGray16/index.tsx

@@ -1,7 +0,0 @@
-import { Image } from '@tarojs/components'
-import Icon from '@/images/svgs/IconDeleteGray16.svg'
-export default () => {
-  return (
-    <Image src={Icon} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
-  )
-}

+ 1 - 2
src/components/qrcode-upload-tips/index.tsx

@@ -7,8 +7,7 @@ export default ()=> {
         <View className="w-36 h-36 rounded-full flex-center mb-12 bg-primary">
           <IconPlusBig/>
         </View>
-        <View className="text-14 leading-22 font-medium mb-4">上传你的二维码</View>
-        <View className="text-12 leading-20 text-gray-4">方便客户快速沟通,扫码即可联系你</View>
+        <View className="pt-8 text-12 leading-22 text-primary">上传你的二维码</View>
       </View>
     </View>
   )

+ 0 - 55
src/hooks/useEditAgent.ts

@@ -1,55 +0,0 @@
-import Taro, { useRouter } from "@tarojs/taro";
-import { useState } from "react";
-import { useAgentStore } from "@/store/agentStore";
-import { TAgentDetail } from "@/types/agent";
-
-const useEditAgent = (
-  editKey: string,
-  initValue?: string,
-  _agent?: TAgentDetail
-) => {
-  const router = useRouter();
-  const { agentId } = router.params;
-  const agent = useAgentStore((state) => _agent ?? state.agent);
-  const agentCharacter = useAgentStore((state) => state.agentCharacter);
-  const [value, setValue] = useState(initValue ?? "");
-  const { editAgentCharacter,fetchAgent } = useAgentStore();
-  const handleSubmit = async () => {
-    if (!agent?.agentId) {
-      return;
-    }
-    if (value.length <= 0) {
-      return;
-    }
-    if(!agentCharacter){
-      return
-    }
-
-    // {
-    //   enabledPersonalKb: agent.enabledPersonalKb ?? false,
-    //   greeting: agent.greeting ?? '',
-    //   personality: value,
-    //   questionGuides: agent.questionGuides ?? [],
-    //   voiceId: agent.voiceId ?? '',
-    // }
-    const result = await editAgentCharacter(agent.agentId, {
-      ...agentCharacter,
-      [editKey]: value,
-    });
-    if(result){
-      await fetchAgent(agent.agentId)
-      Taro.navigateBack()
-    }
-  };
-  const onChange = (e: any) => {
-    setValue(e);
-  };
-  return {
-    value,
-    setValue,
-    onChange,
-    handleSubmit,
-  };
-};
-
-export default useEditAgent;

+ 0 - 50
src/hooks/useEditContactCard.ts

@@ -1,50 +0,0 @@
-import Taro, { useRouter } from "@tarojs/taro";
-import { useState } from "react";
-import { useAgentStore } from "@/store/agentStore";
-import { TAgentDetail } from "@/types/agent";
-
-const useEditContactCard = (
-  editKey: string,
-  initValue?: string | null,
-  _agent?: TAgentDetail
-) => {
-  const agent = useAgentStore((state) => _agent ?? state.agent);
-  const agentContactCard = useAgentStore((state) => state.agentContactCard);
-  const [value, setValue] = useState(initValue ?? "");
-  const { editAgentCard,fetchAgent } = useAgentStore();
-  const handleSubmit = async () => {
-    submit(value)
-  };
-  const submit = async (_value: string, navBack: boolean = true) => {
-    if (!agent?.agentId) {
-      return;
-    }
-    if (_value === undefined) {
-      return;
-    }
-
-    
-    // const prev = pickNonEmpty(agentContactCard??{})
-
-    const result = await editAgentCard(agent.agentId, {
-      ...agentContactCard,
-      [editKey]: _value,
-    });
-    if(result){
-      await fetchAgent(agent.agentId)
-      navBack && Taro.navigateBack()
-    }
-  }
-  const onChange = (e: any) => {
-    setValue(e);
-  };
-  return {
-    value,
-    setValue,
-    onChange,
-    submit,
-    handleSubmit,
-  };
-};
-
-export default useEditContactCard;

+ 3 - 0
src/images/svgs/IconDeleteBlack16.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5247 3.49596C13.7841 3.49596 14 3.71129 14 3.98529V4.23862C14 4.50595 13.7841 4.72795 13.5247 4.72795H2.4759C2.21591 4.72795 2 4.50595 2 4.23862V3.98529C2 3.71129 2.21591 3.49596 2.4759 3.49596H4.41971C4.81457 3.49596 5.1582 3.2153 5.24703 2.8193L5.34882 2.36464C5.50702 1.74531 6.02766 1.33398 6.62351 1.33398H9.37649C9.96585 1.33398 10.4923 1.74531 10.6447 2.33197L10.7536 2.81864C10.8418 3.2153 11.1854 3.49596 11.5809 3.49596H13.5247ZM12.5371 12.7568C12.74 10.8654 13.0953 6.37216 13.0953 6.32682C13.1083 6.18949 13.0635 6.05949 12.9747 5.95483C12.8794 5.85683 12.7588 5.79883 12.6259 5.79883H3.37887C3.24531 5.79883 3.11823 5.85683 3.03005 5.95483C2.94057 6.05949 2.89648 6.18949 2.90297 6.32682C2.90416 6.33515 2.91691 6.49343 2.93822 6.75804C3.03291 7.93354 3.29664 11.2075 3.46705 12.7568C3.58765 13.8981 4.33651 14.6154 5.42123 14.6414C6.25827 14.6607 7.1206 14.6674 8.00239 14.6674C8.83294 14.6674 9.67647 14.6607 10.5395 14.6414C11.6618 14.6221 12.41 13.9174 12.5371 12.7568Z" fill="#111111"/>
+</svg>

+ 1 - 1
src/pages/agent-avatars/index.tsx

@@ -154,7 +154,7 @@ export default function Index() {
             loop={true}
             muted={true}
             objectFit="cover"
-            src={`${avatar.avatarUrl}?x-oss-process=image/resize,w_450/quality,q_60`}
+            src={avatar.avatarUrl}
             className="w-full h-full"
           />
           <View className={style.blurBg}></View>

+ 4 - 3
src/pages/agent/components/AgentSetting/components/AgentCard/index.module.less

@@ -11,6 +11,8 @@
   overflow: hidden;
   border-radius: 12px;
   background-color: white;
+  background-image: url(https://cdn.wehome.cn/cmn/png/117/META-H8UKXHWU-X0WXBKY1C0G0QA1DIH762-HABOZOFM-A41.png);
+  background-size: cover;
 }
 .card{
   width: 140px;
@@ -18,8 +20,6 @@
   overflow: hidden;
   border-radius: 12px;
   background-color: white;
-  background-image: url(https://cdn.wehome.cn/cmn/png/117/META-H8UKXHWU-X0WXBKY1C0G0QA1DIH762-HABOZOFM-A41.png);
-  background-size: cover;
 }
 
 .tips{
@@ -64,6 +64,7 @@
   font-size: 12px;
   line-height: 22px;
   color: white;
+  font-family: PingFangSC-Medium;
   background-color: rgba(#111, .45);
   backdrop-filter: blur(7px) brightness(0.94) contrast(146%) grayscale(3%) opacity(81%);
 }
@@ -98,7 +99,7 @@
   .block();
   align-self: flex-end;
   width: 80px;
-  background-color: rgba(#317CFA, .5);
+  background-color: rgba(#317CFA, 1);
 }
 .block3{
   .block();

+ 3 - 1
src/pages/agent/components/AgentSetting/components/AgentContactCard/index.module.less

@@ -28,7 +28,9 @@
   width: 62px;
 }
 
-
+.value{
+  width: 100%;
+}
 .editButton{
   display: block;
   padding: 14px 0;

+ 8 - 74
src/pages/editor-contact/index.tsx

@@ -12,71 +12,7 @@ import WemetaButton from "@/components/buttons/WemetaButton";
 import style from './index.module.less'
 import { pickAndUploadImageWithCrop } from "@/utils/upload";
 
-// const RenderEntCard = (
-//   agent: TAgentDetail | null,
-//   navToUrl: (url: string) => void
-// ) => {
 
-//   if (!agent?.isEnt) {
-//     return <View className="px-16 w-full pt-12">
-//       <ListWrapper>
-//         <Vie//           arrow
-//           onClick={() => { navToUrl('/pages/editor-pages/editor-ent-name/index') }}
-//         >
-//           <View className="flex items-center font-normal">
-//             <View className="flex-1 font-normal">企业</View>
-//             <View className="text-gray-5 truncate max-w-[188px]">
-//               {agent?.entName}
-//             </View>
-//           </View>
-//         </View>
-//         <View
-//           arrow
-//           onClick={() => { navToUrl('/pages/editor-pages/editor-position/index') }}
-//         >
-//           <View className="flex items-center font-normal">
-//             <View className="flex-1 font-normal">职位</View>
-//             <View className="text-gray-5 mr-8">{agent?.position}</View>
-//           </View>
-//         </View>
-//       </ListWrapper>
-//     </View>;
-//   }
-
-//   return (
-//     <View className="px-16 w-full pt-12">
-//       <ListWrapper>
-//         <Vie//         >
-//           <View className="flex items-center font-normal">
-//             <View className="flex-1 font-normal">企业</View>
-//             <View className="text-gray-5 truncate max-w-[188px]">
-//               {agent?.entName}
-//             </View>
-//           </View>
-//         </View>//           <View className="flex items-center font-normal">
-//             <View className="flex-1 font-normal">企业认证</View>
-//             <TagCertificated />
-//           </View>
-//         </View>
-//         <View
-//           arrow
-//           onClick={() => { navToUrl('/pages/editor-pages/editor-position/index') }}
-//         >
-//           <View className="flex items-center font-normal">
-//             <View className="flex-1 font-normal">职位</View>
-//             <View className="text-gray-5 mr-8">{agent?.position}</View>
-//           </View>
-//           {/* <PickerSingleColumn headerTitle="您的岗位" options={options} selected={selected} onPicked={handlePicked} showPicker={showPicker} setShowPicker={setShowPicker}>
-//               <View className="flex items-center font-normal" onClick={() => setShowPicker(true)}>
-//                 <View className="flex-1 font-normal">职位</View>
-//                 <View className="text-gray-5 mr-8">{agent?.position}</View>
-//               </View>
-//             </PickerSingleColumn> */}
-//         </View>
-//       </ListWrapper>
-//     </View>
-//   );
-// };
 
 export default function Index() {
   const router = useRouter();
@@ -144,7 +80,7 @@ export default function Index() {
       <NavBarNormal backText="数字名片"></NavBarNormal>
       <View className="p-16 w-full pb-126">
         <View className="flex flex-col gap-16 w-full">
-          <View>
+          <View className="flex flex-col gap-6">
             <View className={style.label}>姓名 <Text className="text-red leading-22 text-14">*</Text> </View>
             <View className={style.value}>
               <WemetaInput
@@ -157,7 +93,7 @@ export default function Index() {
               />
             </View>
           </View>
-          <View>
+          <View className="flex flex-col gap-6">
             <View className={style.label}>职位</View>
             <View className={style.value}>
               <WemetaInput
@@ -170,7 +106,7 @@ export default function Index() {
             </View>
           </View>
 
-          <View>
+          <View className="flex flex-col gap-6">
             <View className={style.label}>企业</View>
             <View className={style.value}>
               <WemetaInput
@@ -182,7 +118,7 @@ export default function Index() {
               />
             </View>
           </View>
-          <View>
+          <View className="flex flex-col gap-6">
             <View className={style.label}>手机号</View>
             <View className={style.value}>
               <WemetaInput
@@ -194,7 +130,7 @@ export default function Index() {
               />
             </View>
           </View>
-          <View>
+          <View className="flex flex-col gap-6">
             <View className={style.label}>联系邮箱</View>
             <View className={style.value}>
               <WemetaInput
@@ -206,7 +142,7 @@ export default function Index() {
               />
             </View>
           </View>
-          <View>
+          <View className="flex flex-col gap-6">
 
             <View className={style.label}>
               <View className="flex-1 font-pingfangSCMedium font-medium">地址</View>
@@ -223,11 +159,10 @@ export default function Index() {
               />
             </View>
           </View>
-          <View
-          >
+          <View className="flex flex-col gap-6">
             <View className={style.label}>
               <View className="flex-1">二维码</View>
-              {agentEdit?.qrCodeUrl?.length && <View className="flex items-center font-pingfangSCMedium font-medium text-primary gap-16">
+              {!!agentEdit?.qrCodeUrl?.length && <View className="flex items-center font-pingfangSCMedium font-medium text-primary gap-16">
                 <View onClick={handleUpload}>替换</View>
                 <View>|</View>
                 <View onClick={() => handleFieldChange('qrCodeUrl', '')}>清空</View>
@@ -242,7 +177,6 @@ export default function Index() {
         </View>
       </View>
 
-      {/* {RenderEntCard(agent, navToUrl)} */}
       <BottomBar>
         <WemetaButton disabled={disabled} className="flex-1" onClick={handleSave}>保存</WemetaButton>
       </BottomBar>

+ 7 - 7
src/pages/editor-correction-item/index.tsx

@@ -13,7 +13,7 @@ import IconA from "@/components/icon/IconA";
 
 import IconPlusColor14 from "@/components/icon/IconPlusColor14";
 import IconALink from "@/components/icon/IconALink";
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 import { useEffect, useState } from "react";
 import IconAImage from "@/components/icon/IconAImage";
 import WemetaTextarea from "@/components/wemeta-textarea";
@@ -35,7 +35,7 @@ export default function Index() {
 
   const router = useRouter()
   const { correctionId } = router.params
-  
+
   const [formData, setFormData] = useState<TFormdata>(
     {
       q: '',
@@ -101,11 +101,11 @@ export default function Index() {
 
     if(formData.a.length <= 0){
       Taro.showToast({title: '请输入回答', icon: 'none'})
-      return 
+      return
     }
     if(formData.q.length <= 0){
       Taro.showToast({title: '请输入问题描述', icon: 'none'})
-      return 
+      return
     }
 
     const dataToSubmit = {
@@ -162,10 +162,10 @@ export default function Index() {
     if(correctionId){
         getQaDetail(correctionId)
     }
-    
+
   }, [correctionId])
 
-  
+
 
   return (
     <PageCustom>
@@ -246,7 +246,7 @@ export default function Index() {
               </View>
               <UploaderGrid onNewUpload={handleChooseMedia}  list = {formData.mediaList} onChange={()=> {}} onDelete={handleDeleteMedia} />
             </View>
-            
+
           </View>
         </View>
 

+ 7 - 7
src/pages/editor-knowledge-item/index.tsx

@@ -13,7 +13,7 @@ import IconA from "@/components/icon/IconA";
 
 import IconPlusColor14 from "@/components/icon/IconPlusColor14";
 import IconALink from "@/components/icon/IconALink";
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 import { useEffect, useRef, useState } from "react";
 import IconAImage from "@/components/icon/IconAImage";
 import WemetaTextarea from "@/components/wemeta-textarea";
@@ -38,7 +38,7 @@ export default function Index() {
 
   const router = useRouter()
   const { knowledgeId, qaId, knowledgeTitle } = router.params
-  
+
   const [formData, setFormData] = useState<TFormdata>(
     {
       q: '',
@@ -104,11 +104,11 @@ export default function Index() {
 
     if(formData.a.length <= 0){
       Taro.showToast({title: '请输入回答', icon: 'none'})
-      return 
+      return
     }
     if(formData.q.length <= 0){
       Taro.showToast({title: '请输入问题描述', icon: 'none'})
-      return 
+      return
     }
 
     const dataToSubmit = {
@@ -165,10 +165,10 @@ export default function Index() {
     if(knowledgeId && qaId){
         getQaDetail(knowledgeId, qaId)
     }
-    
+
   }, [knowledgeId, qaId])
 
-  
+
 
   return (
     <PageCustom>
@@ -249,7 +249,7 @@ export default function Index() {
               </View>
               <UploaderGrid onNewUpload={handleChooseMedia}  list = {formData.mediaList} onChange={()=> {}} onDelete={handleDeleteMedia} />
             </View>
-            
+
           </View>
         </View>
 

+ 0 - 5
src/pages/editor-pages/editor-address/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-address/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 61
src/pages/editor-pages/editor-address/index.tsx

@@ -1,61 +0,0 @@
-import { View } from "@tarojs/components";
-import BottomBar from "@/components/BottomBar";
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import { useAgentStore } from "@/store/agentStore";
-import useEditContactCard from "@/hooks/useEditContactCard";
-import Taro from "@tarojs/taro";
-export default function Index() {
-  const agentContactCard = useAgentStore((state) => state.agentContactCard);
-  
-
-  const { value, onChange, handleSubmit, setValue } = useEditContactCard(
-    "address",
-    agentContactCard?.address
-  );
-
-  // todo: 定位当前位置
-  const handleEditAddress = ()=> {
-    const option = {
-      address:  '',
-      latitude: 39.916527,
-      longitude: 116.397128,
-      success(result:Taro.chooseLocation.SuccessCallbackResult) {
-          console.log(result)
-          setValue(result.address)
-      }
-    }
-    console.log(option)
-    Taro.chooseLocation(option)
-  }
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="联系地址"></NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View className="w-full p-16">
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写联系地址"
-            autoFocus
-            maxlength={100}
-          />
-          <View className="text-primary" onClick={handleEditAddress}>
-            选择地址
-          </View>
-        </View>
-        <BottomBar>
-          <View
-            className="button-rounded button-primary flex-1"
-            onClick={handleSubmit}
-          >
-            保存
-          </View>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 0 - 5
src/pages/editor-pages/editor-email/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-email/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 40
src/pages/editor-pages/editor-email/index.tsx

@@ -1,40 +0,0 @@
-import { View } from "@tarojs/components";
-import BottomBar from "@/components/BottomBar";
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import editorStyle from "../editor.module.less";
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import { useAgentStore } from "@/store/agentStore";
-import useEditContactCard from "@/hooks/useEditContactCard";
-export default function Index() {
-  const agentContactCard = useAgentStore((state) => state.agentContactCard);
-  const { value, onChange, handleSubmit } = useEditContactCard(
-    "email",
-    agentContactCard?.email
-  );
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="联系邮箱"></NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View className="w-full p-16">
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写联系邮箱"
-            autoFocus
-          />
-        </View>
-        <BottomBar>
-          <View
-            className="button-rounded button-primary flex-1"
-            onClick={handleSubmit}
-          >
-            保存
-          </View>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 0 - 5
src/pages/editor-pages/editor-ent-name/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-ent-name/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 40
src/pages/editor-pages/editor-ent-name/index.tsx

@@ -1,40 +0,0 @@
-import { useState } from "react";
-import { View } from "@tarojs/components";
-
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import WemetaButton from "@/components/buttons/WemetaButton";
-import BottomBar from "@/components/BottomBar";
-
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import { useAgentStore } from "@/store/agentStore";
-import useEditContactCard from "@/hooks/useEditContactCard";
-export default function Index() {
-  const agentContactCard = useAgentStore((state)=> state.agentContactCard)
-  const {value, onChange, handleSubmit} = useEditContactCard('entName', agentContactCard?.entName)
-
-
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="企业名称"></NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View
-          className="w-full p-16"
-        >
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写企业名称"
-            autoFocus
-            maxlength={20}
-          />
-        </View>
-        <BottomBar>
-          <WemetaButton className="flex-1" disabled={!value.length} onClick={handleSubmit}>保存</WemetaButton>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 24 - 16
src/pages/editor-pages/editor-link-contact/index.tsx

@@ -20,7 +20,6 @@ import PopupSheets from "@/components/popup/popup-sheets";
 import { EComponentType } from "@/consts/enum";
 import { useComponentStore } from "@/store/componentStore";
 import { useAgentStore } from "@/store/agentStore";
-import EmptyData from "@/components/EmptyData";
 
 export default function Index() {
   const { saveComponent } = useComponentStore();
@@ -36,7 +35,7 @@ export default function Index() {
   const [show, setShow] = useState(false);
 
   const [showPopupSheets, setShowPopupSheets] = useState(false);
-  
+
 
 
 
@@ -47,9 +46,18 @@ export default function Index() {
     if (loading) {
       return;
     }
+    // 过虑掉 email, mobile, qrCodeUrl
+    const newPicked = picked.map(item=> {
+      return {
+        ...item,
+        email: undefined,
+        mobile: undefined,
+        qrCodeUrl: undefined,
+      }
+    })
     const c = {
       data: {
-        values: picked,
+        values: newPicked,
         layout: currentComponent.data.layout ?? 'mini',
         id: currentComponent.data.id,
         index: currentComponent.data.index,
@@ -61,7 +69,7 @@ export default function Index() {
     await saveComponent(c);
     Taro.navigateBack();
   };
-  
+
   const handleClickMore = (item: TAgent|TContactItem) => {
     setCurrent(item)
     setShowPopupSheets(true)
@@ -79,7 +87,7 @@ export default function Index() {
     if(!current){
       return;
     }
-    
+
     setShowPopupSheets(false)
     Taro.navigateTo({
       url: "/pages/profile/index?agentId=" + current?.agentId,
@@ -91,7 +99,7 @@ export default function Index() {
     if(!current){
       return;
     }
-    
+
     setShowPopupSheets(false)
     const restAgent = picked.filter(item => item.agentId !== current.agentId);
     setPicked(restAgent)
@@ -99,14 +107,14 @@ export default function Index() {
     setCurrent(null)
   }
 
-  
-  
+
+
 
   const renderContactList = () => {
     if (!picked.length) {
       return (
         <></>
-      );  
+      );
     }
     return (
       <View className="flex flex-col gap-8 w-full">
@@ -130,7 +138,7 @@ export default function Index() {
     );
   };
 
-  
+
   const colleagues = {
     key: "3",
     label: "企业同事",
@@ -161,12 +169,12 @@ export default function Index() {
       ),
     },
   ]
-  
+
   const tabList = agent?.isEnt ? [...tabsBaseList, colleagues] : tabsBaseList;
 
-  
 
-  
+
+
 
   return (
     <PageCustom>
@@ -200,11 +208,11 @@ export default function Index() {
         </BottomBar>
       </Popup>
 
-      <PopupSheets 
-          setShow={setShowPopupSheets} 
+      <PopupSheets
+          setShow={setShowPopupSheets}
           show={showPopupSheets}
           content={[
-            {item: '访问TA的主页', type: 'primary', onClick: visitorCurrent}, 
+            {item: '访问TA的主页', type: 'primary', onClick: visitorCurrent},
             {item:'删除', type: 'warn', onClick: removePicked},
           ]}
         >

+ 1 - 1
src/pages/editor-pages/editor-link/index.tsx

@@ -7,7 +7,7 @@ import WemetaTextarea from "@/components/wemeta-textarea/index";
 import WemetaInput from "@/components/wemeta-input/index";
 import WemetaButton from "@/components/buttons/WemetaButton";
 import FormitemSingleImage from '@/components/Form/FormItemSingleImage'
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 
 import style from "./index.module.less";
 

+ 0 - 5
src/pages/editor-pages/editor-name/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-name/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 40
src/pages/editor-pages/editor-name/index.tsx

@@ -1,40 +0,0 @@
-import { useState } from "react";
-import { View } from "@tarojs/components";
-
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import WemetaButton from "@/components/buttons/WemetaButton";
-import BottomBar from "@/components/BottomBar";
-
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import { useAgentStore } from "@/store/agentStore";
-import useEditContactCard from "@/hooks/useEditContactCard";
-export default function Index() {
-  const agentContactCard = useAgentStore((state)=> state.agentContactCard)
-  const {value, onChange, handleSubmit} = useEditContactCard('name', agentContactCard?.name)
-
-
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="姓名"></NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View
-          className="w-full p-16"
-        >
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写姓名"
-            autoFocus
-            maxlength={20}
-          />
-        </View>
-        <BottomBar>
-          <WemetaButton className="flex-1" disabled={!value.length} onClick={handleSubmit}>保存</WemetaButton>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 0 - 5
src/pages/editor-pages/editor-phone/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-phone/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 42
src/pages/editor-pages/editor-phone/index.tsx

@@ -1,42 +0,0 @@
-import { View } from "@tarojs/components";
-import BottomBar from "@/components/BottomBar";
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import editorStyle from "../editor.module.less";
-
-import { useAgentStore } from "@/store/agentStore";
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import useEditContactCard from "@/hooks/useEditContactCard";
-export default function Index() {
-  const agentCard = useAgentStore((state) => state.agentContactCard);
-  const { value, onChange, handleSubmit } = useEditContactCard(
-    "mobile",
-    agentCard?.mobile
-  );
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="手机号码"></NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View className="w-full p-16">
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写手机号码"
-            autoFocus
-          />
-        </View>
-
-        <BottomBar>
-          <View
-            className="button-rounded button-primary flex-1"
-            onClick={handleSubmit}
-          >
-            保存
-          </View>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 0 - 5
src/pages/editor-pages/editor-position/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 2
src/pages/editor-pages/editor-position/index.module.less

@@ -1,2 +0,0 @@
-
-

+ 0 - 40
src/pages/editor-pages/editor-position/index.tsx

@@ -1,40 +0,0 @@
-import { useState } from "react";
-import { View } from "@tarojs/components";
-
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import WemetaButton from "@/components/buttons/WemetaButton";
-import BottomBar from "@/components/BottomBar";
-
-import WemetaTextarea from "@/components/wemeta-textarea/index";
-import { useAgentStore } from "@/store/agentStore";
-import useEditContactCard from "@/hooks/useEditContactCard";
-export default function Index() {
-  const agentContactCard = useAgentStore((state)=> state.agentContactCard)
-  const {value, onChange, handleSubmit} = useEditContactCard('position', agentContactCard?.position)
-
-
-
-  return (
-    <PageCustom>
-      <NavBarNormal>职位</NavBarNormal>
-      <View className="flex flex-col items-center w-full">
-        <View
-          className="w-full p-16"
-        >
-          <WemetaTextarea
-            value={value}
-            onBlur={(value: string) => onChange(value)}
-            onInput={(value: string) => onChange(value)}
-            placeholder="填写职位名称"
-            autoFocus
-            maxlength={40}
-          />
-        </View>
-        <BottomBar>
-          <WemetaButton className="flex-1" disabled={!value.length} onClick={handleSubmit}>保存</WemetaButton>
-        </BottomBar>
-      </View>
-    </PageCustom>
-  );
-}

+ 0 - 5
src/pages/editor-pages/editor-qrcode/index.config.ts

@@ -1,5 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: '章节标题',
-  "usingComponents": {},
-  navigationStyle: 'custom'
-})

+ 0 - 13
src/pages/editor-pages/editor-qrcode/index.module.less

@@ -1,13 +0,0 @@
-
-.card{
-  margin-bottom: 16px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 343px;
-  height: 452px;
-  border-radius: 16px;
-  background-color: white;
-}
-
-

+ 0 - 70
src/pages/editor-pages/editor-qrcode/index.tsx

@@ -1,70 +0,0 @@
-import { useState } from "react";
-import { View, Image } from "@tarojs/components";
-
-import PageCustom from "@/components/page-custom/index";
-import NavBarNormal from "@/components/NavBarNormal/index";
-import style from "./index.module.less";
-
-import QrcodeUploadTips from "@/components/qrcode-upload-tips";
-import useEditContactCard from "@/hooks/useEditContactCard";
-import { useAgentStore } from "@/store/agentStore";
-import { pickAndUploadImageWithCrop } from "@/utils/upload";
-import Taro from "@tarojs/taro";
-
-export default function Index() {
-  const agentContactCard = useAgentStore((state) => state.agentContactCard);
-  const { value, setValue, handleSubmit } = useEditContactCard(
-    "qrCodeUrl",
-    agentContactCard?.qrCodeUrl
-  );
-  const handleClick = async () => {
-    Taro.showLoading();
-    try{
-      const result = await pickAndUploadImageWithCrop(["album"]);
-      
-      Taro.hideLoading();
-      if (!result?.url) {
-        return;
-      }
-      setValue(result.url);
-    }catch(e:any){
-      Taro.hideLoading();
-    }
-  };
-
-  const handleClear = () => {
-    setValue("");
-  };
-
-  const renderQrcode = ()=> {
-    if(value.length){
-      return <Image showMenuByLongpress style={{maxWidth: '344px'}} src={value} mode="widthFix"></Image>
-    }
-    return <View>
-      <QrcodeUploadTips />
-    </View>      
-  }
-
-  return (
-    <PageCustom>
-      <NavBarNormal backText="我的二维码"></NavBarNormal>
-      <View className="px-16 pt-4">
-        <View className={style.card} onClick={handleClick}>
-          {renderQrcode()}
-        </View>
-        <View className="flex flex-col gap-12">
-          <View className="button-rounded-big" onClick={handleSubmit}>
-            保存
-            {/* {!!value.length ? "更新" : "保存"} */}
-          </View>
-          {!!value.length && <View
-            className="button-rounded-big button-plain button-warn"
-            onClick={handleClear}
-          >
-            清除
-          </View>}
-        </View>
-      </View>
-    </PageCustom>
-  );
-}

+ 1 - 1
src/pages/message-editor/index.tsx

@@ -13,7 +13,7 @@ import IconA from "@/components/icon/IconA";
 
 import IconPlusColor14 from "@/components/icon/IconPlusColor14";
 import IconALink from "@/components/icon/IconALink";
-import IconDeleteGray16 from "@/components/icon/IconDeleteGray16";
+import IconDeleteGray16 from "@/components/icon/IconDelete";
 import { useEffect, useRef, useState } from "react";
 import IconAImage from "@/components/icon/IconAImage";
 import WemetaTextarea from "@/components/wemeta-textarea";

+ 0 - 36
src/service/agent.ts

@@ -98,39 +98,3 @@ export const getEntAgentPartners = (params: {
     params
   })
 }
-
-
-
-
-
-// ============ deprecated ===========
-
-// 编辑智能体--设置形象ID
-// deprecated
-// export const editAgentAvatar = (agentId: string, avatarId: string|number, enabledChatBg:boolean) => {
-//   return request.put(`${bluebookAiAgent}api/v1/my/agent/${agentId}/avatar`, {
-//     avatarId,
-//     enabledChatBg,
-//   })
-// }
-
-
-// 编辑智能体--名片部份内容
-// address (string, optional): 地址,长度最多250 ,
-// email (string, optional): 邮箱,长度最多50 ,
-// entName (string, optional): 企业名称,长度最多100,如果是个人版允许编辑、企业版可以原值传入即可 ,
-// mobile (string, optional): 手机号 ,
-// name (string, optional): 智能体名称--名片的姓名;长度最多20 ,
-// position (string, optional): 职位,长度最多30 ,
-// qrCodeUrl (string, optional): 二维码地址,长度最多250
-
-// deprecated
-export const editAgentCard = (agentId: string, data: TAgentContactCard) => {
-  return request.put<any, any>(`${bluebookAiAgent}api/v1/my/agent/${agentId}/card`, data)
-}
-
-// 编辑智能体--声音、人设、开场白、问题引导、知识库
-// deprecated
-export const editAgentCharacter = (agentId: string, data: TEditAgentCharacter) => {
-  return request.put(`${bluebookAiAgent}api/v1/my/agent/${agentId}/character`, data)
-}

+ 2 - 33
src/store/agentStore.ts

@@ -5,8 +5,6 @@ import {
   getAgent as _getAgent,
   setDefaultAgent as _setDefaultAgent,
   deleteAgent as _deleteAgent,
-  editAgentCard as _editAgentCard,
-  editAgentCharacter as _editAgentCharacter,
   editAgentWebsite as _editAgentWebsite,
   createNewAgent,
   editAgent as _editAgent,
@@ -47,11 +45,6 @@ export interface AgentStoreState {
     ) => Promise<TAgentDetail | null>;
     clearProfileAgent: () => void;
     setDefaultAgent: (agentId: string) => Promise<Partial<TAgentDetail> | null>;
-    editAgentCharacter: (
-      agentId: string,
-      data: TEditAgentCharacter
-    ) => Promise<boolean>;
-    editAgentCard: (agentId: string, data: TAgentContactCard) => Promise<boolean>;
     editAgentWebsite: (
       agentId: string,
       data: TComponentItem[]
@@ -68,9 +61,11 @@ export interface AgentStoreState {
 
 export const useAgentStore = create<AgentStoreState>((set, get) => ({
   agents: [],
+  // 存储自己当前的 agent 信息
   agent: null,
   // agentEdit 编辑时临时存储的智能体信息, 如果直接用 agent 存储,则切页面时会有空白数据的瞬间
   agentEdit: null,
+  // 访问其它人页面时的 agent 信息
   agentProfile: null,
   agentContactCard: null,
   defaultAgent: null,
@@ -254,32 +249,6 @@ export const useAgentStore = create<AgentStoreState>((set, get) => ({
         },
       }));
     },
-    // 编辑声音,人设,开场白,问题引导,知识库
-    // deprecated
-    editAgentCharacter: async (agentId: string, data: TEditAgentCharacter) => {
-      const response = await _editAgentCharacter(agentId, data);
-      console.log(response.data);
-      const result = isSuccess(response.status);
-      //@ts-ignore
-      set((state) => {
-        return {
-          agent: {
-            ...state.agent,
-            voiceId: data.voiceId,
-          },
-        };
-      });
-      return result;
-    },
-    // deprecated
-    editAgentCard: async (agentId: string, data: TAgentContactCard) => {
-      console.log(agentId, data);
-      const response = await _editAgentCard(agentId, data);
-      console.log(response);
-      const result = isSuccess(response.status);
-
-      return result;
-    },
     editAgentWebsite: async (agentId: string, data: TComponentItem[]) => {
       console.log(agentId, data);
       const response = await _editAgentWebsite(agentId, { components: data });

+ 3 - 1
src/store/modalStore.ts

@@ -2,7 +2,7 @@
 // 全局唯一弹出层 confirm 确认框,View dom 嵌入在 page-wrapper 组件内
 // 暂时不支持多个弹出层同时弹出
 import { create } from 'zustand';
-
+import Taro from '@tarojs/taro';
 
 type ModalConfig ={
   content: React.ReactNode;
@@ -32,9 +32,11 @@ export const useModalStore = create<ModalStore>((set, get) => ({
     hideModal: () => set({ isVisible: false }),
     onConfirm: () => {
       get().config?.onConfirm?.()
+      Taro.showTabBar().catch(()=> {});
       get().actions.hideModal();
     },
     onCancel: () => {
+      Taro.showTabBar().catch(()=> {});
       get().config?.onCancel?.()
       get().actions.hideModal();
     },