Jelajahi Sumber

feat: 智能体创建新 ui

王晓东 1 bulan lalu
induk
melakukan
0357222b0b
76 mengubah file dengan 737 tambahan dan 456 penghapusan
  1. 3 17
      project.private.config.json
  2. 12 5
      src/app.less
  3. 1 1
      src/components/AgentCard/index.tsx
  4. 11 11
      src/components/AgentPage/components/AgentActionBar/index.tsx
  5. 4 4
      src/components/AgentPage/components/AgentQRcode/index.tsx
  6. 2 2
      src/components/AgentPage/components/AgentSwap/index.tsx
  7. 1 1
      src/components/DigitalCard/DigitalCardBasic.tsx
  8. 2 2
      src/components/EmptyData/index.tsx
  9. 2 2
      src/components/KnowledgeList/index.tsx
  10. 3 3
      src/components/KnowledgePicker/index.tsx
  11. 4 4
      src/components/LoginPopup/index.tsx
  12. 26 16
      src/components/TextPolish/index.tsx
  13. 56 0
      src/components/WemetaTextareaAI/index.module.less
  14. 133 0
      src/components/WemetaTextareaAI/index.tsx
  15. 2 2
      src/components/chat-message-content/index.tsx
  16. 1 1
      src/components/component-list/components/card-channels/index.tsx
  17. 3 3
      src/components/form/FormItemSingleImage/index.tsx
  18. 14 0
      src/components/icon/IconStarColor/index.tsx
  19. 0 7
      src/components/icon/icon-conversation-color/index.tsx
  20. 0 7
      src/components/icon/icon-people-color/index.tsx
  21. 0 7
      src/components/icon/icon-star-color/index.tsx
  22. 4 3
      src/components/list/card-list/index.tsx
  23. 2 2
      src/components/qrcode-upload-tips/index.tsx
  24. 7 7
      src/components/voice-player-bar/index.tsx
  25. 4 4
      src/components/wemeta-tabs/index.module.less
  26. 2 2
      src/components/wemeta-textarea/index.tsx
  27. 0 4
      src/images/svgs/icon-people-color.svg
  28. 4 0
      src/images/svgs/icon-star-blue.svg
  29. 2 2
      src/pages/account/index.tsx
  30. 1 1
      src/pages/agent-avatars/index.tsx
  31. 13 13
      src/pages/agent-gen/components/step/StepPick.tsx
  32. 4 4
      src/pages/agent-gen/components/step/StepStart.tsx
  33. 12 9
      src/pages/agent/components/AgentSetting/components/AgentCard/index.module.less
  34. 16 8
      src/pages/agent/components/AgentSetting/components/AgentCard/index.tsx
  35. 20 33
      src/pages/agent/components/AgentSetting/components/AgentContactCard/index.module.less
  36. 62 29
      src/pages/agent/components/AgentSetting/components/AgentContactCard/index.tsx
  37. 3 3
      src/pages/agent/components/AgentSetting/components/AgentKnowledgeLib/index.tsx
  38. 68 53
      src/pages/agent/components/AgentSetting/components/AgentSettingList/index.tsx
  39. 9 2
      src/pages/agent/components/AgentSetting/index.tsx
  40. 4 6
      src/pages/agent/index.tsx
  41. 1 1
      src/pages/chat-messages/components/VisitorSummary/index.tsx
  42. 1 1
      src/pages/chat-session-messages/components/VisitorSummary/index.tsx
  43. 4 4
      src/pages/contact-us/index.tsx
  44. 3 3
      src/pages/contact/index.tsx
  45. 1 1
      src/pages/dashboard/components/AgentList/components/AgentCard/index.tsx
  46. 2 2
      src/pages/dashboard/components/VisitorCard/index.tsx
  47. 11 11
      src/pages/dashboard/index.tsx
  48. 8 8
      src/pages/dislike-messages/components/ShareToEntPopup/index.tsx
  49. 2 2
      src/pages/dislike-messages/index.tsx
  50. 12 12
      src/pages/editor-contact/index.tsx
  51. 5 5
      src/pages/editor-pages/editor-channels/index.tsx
  52. 1 1
      src/pages/editor-pages/editor-link-social/index.tsx
  53. 10 10
      src/pages/editor-pages/editor-mini-program/index.tsx
  54. 4 4
      src/pages/knowledge-item/components/ShareToEntPopup/index.tsx
  55. 8 8
      src/pages/knowledge-item/index.tsx
  56. 1 1
      src/pages/knowledge/components/CompanyList/index.tsx
  57. 4 4
      src/pages/knowledge/components/CompanyTab/components/ScrollList.tsx
  58. 2 2
      src/pages/knowledge/components/CompanyTab/components/ScrollListChat.tsx
  59. 6 6
      src/pages/knowledge/components/CompanyTab/index.tsx
  60. 7 7
      src/pages/knowledge/components/CorrectionTab/components/CorrectionListChat.tsx
  61. 1 1
      src/pages/knowledge/components/CorrectionTab/index.tsx
  62. 1 1
      src/pages/knowledge/components/PersonalTab/components/ScrollList.tsx
  63. 11 11
      src/pages/knowledge/components/PersonalTab/components/ScrollListChat.tsx
  64. 1 1
      src/pages/knowledge/components/PersonalTab/index.tsx
  65. 4 4
      src/pages/knowledge/components/StyleFilter/index.tsx
  66. 9 9
      src/pages/message-editor/index.tsx
  67. 3 3
      src/pages/privacy/index.tsx
  68. 12 29
      src/pages/test/index.tsx
  69. 2 2
      src/pages/visiteor-detail/components/AgentCard/index.tsx
  70. 2 2
      src/pages/visiteor-detail/index.tsx
  71. 2 2
      src/pages/voice/components/MyVoiceList/index.tsx
  72. 2 2
      src/pages/voice/components/VoiceList/index.tsx
  73. 18 2
      src/store/agentStore.ts
  74. 30 0
      src/types/agent.ts
  75. 1 1
      src/xiaolanbenlib/module/axios.js
  76. 28 13
      tailwind.config.js

+ 3 - 17
project.private.config.json

@@ -9,25 +9,11 @@
     "miniprogram": {
       "list": [
         {
-          "name": "pages/profile/index",
-          "pathName": "pages/profile/index",
-          "query": "agentId=p_2e73c9d7efaYfDo2-agent_298&shareKey=2%241%24AAAAWrseqFxny9HPTkPIibQEBdl4yz7OICMFf156uBBMw1aTD0vFow7%2FrxLVsqOGTEHIaxZnBn5w9vDFW7T6ySb%2FfQFxSlsjHgPbzmyK%2Bv5LpT3D",
+          "name": "pages/agent/index",
+          "pathName": "pages/agent/index",
+          "query": "agentId=p_2e73c9d7efaYfDo2-agent_2685",
           "scene": null,
           "launchMode": "default"
-        },
-        {
-          "name": "pages/profile/index",
-          "pathName": "pages/profile/index",
-          "query": "agentId=p_2e73c9d7efaYfDo2-agent_298&shareKey=2%241%24AAAAWrseqFxny9HPTkPIibQEBdl4yz7OICMFf156uBBMw1aTD0vFow7%2FrxLVsqOGTEHIaxZnBn5w9vDFW7T6ySb%2FfQFxSlsjHgPbzmyK%2Bv5LpT3D",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "pages/contact/index",
-          "pathName": "pages/contact/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
         }
       ]
     }

+ 12 - 5
src/app.less

@@ -8,13 +8,20 @@
 /* 为 RootPortal 容器单独定义变量 */
 :root, .taro-portal-container, page  {
   font-family: PingFangSC-Regular;
-  --color-primary: #317CFA;
+  --color-primary: #327BF9;
   --color-primary-rgb: 49, 124, 250;
   --color-primary-light: rgba(49, 124, 250, 0.1);
   --color-primary-dark: #1E6FF8;
   --color-text-primary: #262626;
   --color-bg-primary: #F4F9FF;
   --color-bg-gray: #F4F9FF;
+  --color-gray-1: rgba(17, 17, 17, 0.03); // 未选中按钮背景
+  --color-gray-2: rgba(17, 17, 17, 0.05); // 骨架图卡片模块
+  --color-gray-3: rgba(17, 17, 17, 0.25); // 分割线,未编辑边框,禁用文本
+  --color-gray-4: rgba(17, 17, 17, 0.45); // 辅助文本,输入文本,仅展示,暗文本
+  --color-gray-5: rgba(17, 17, 17, 0.65); // 副标题,描述文本
+  --color-gray-6: rgba(17, 17, 17, 0.85); // 正文
+  --color-gray-7: rgba(17, 17, 17, 1); // 特殊标题,主标题,正文
 }
 .taro-portal-container-ztop{
   z-index: 10000;
@@ -110,7 +117,7 @@
 
 .wemeta-button{
   .button-rounded-big();
-  border-radius: 12px;  
+  border-radius: 12px;
 }
 
 
@@ -168,12 +175,12 @@
 // /* 竖屏且宽度<390px */
 // @media (orientation: portrait) and (max-width: 390px) {
 //   .button-rounded.button-primary {
-    
+
 //   }
 // }
 
 
-// 社交媒体icon 
+// 社交媒体icon
 .social-media-icon{
   width: 24px;
   height: 24px;
@@ -382,7 +389,7 @@
   border-radius: 16px;
   overflow: hidden;
   background-color: rgba(240, 240, 240, 1);
-  
+
   .component-card-content{
     display: flex;
     flex-direction: column;

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

@@ -54,7 +54,7 @@ const Index = ({
         {(hasPosition || hasEntName) && (
           <View className={`flex flex-col w-full gap-8 truncate`}>
             <View
-              className={`flex items-center flex-1 text-12 leading-20 text-gray-45 truncate`}
+              className={`flex items-center flex-1 text-12 leading-20 text-gray-4 truncate`}
             >
               {renderEntNameAndPosition()}
               {data.isEnt && (

+ 11 - 11
src/components/AgentPage/components/AgentActionBar/index.tsx

@@ -27,14 +27,14 @@ interface IProps {
   isVisitor: boolean, // 是否是访问他人智能体
 }
 export default ({agent, isVisitor}: IProps) => {
-  
+
   const [showAgentSwap, setShowAgentSwap] = useState(false);
   const [showAgentQRcode, setShowAgentQRcode] = useState(false);
   const [showPopup, setShowPopup] = useState(false);
   const [showShare, setShowShare] = useState(false);
   const [showLogin, setShowLogin] = useState(false);
   const { deleteAgent } = useAgentStore()
-  
+
 
   const {showModal,} = useModalStore()
   const isLogin = useIsLogin();
@@ -43,7 +43,7 @@ export default ({agent, isVisitor}: IProps) => {
     if(!isLogin){
       return setShowLogin(true);
     }
-    
+
     // 如果是已经下线的智能体,显示提示信息
     if(agent.status === 'deleted'){
       showModal({
@@ -58,7 +58,7 @@ export default ({agent, isVisitor}: IProps) => {
       })
       return
     }
-    
+
     Taro.navigateTo({
       url: `/pages/chat/index?agentId=${agent.agentId}&isVisitor=${isVisitor}`,
     });
@@ -128,7 +128,7 @@ export default ({agent, isVisitor}: IProps) => {
               >
                 <IconQRCodeBlack />
               </View>}
-              
+
               {/* 智能体分享 */}
               <View
                 className={style.boxButton}
@@ -157,7 +157,7 @@ export default ({agent, isVisitor}: IProps) => {
               </View>}
             </View>
           </View>
-          
+
           {/* 联系方式 */}
           <View className="rounded-12 bg-white p-20">
             <View className="flex flex-col gap-20 text-12 leading-20">
@@ -193,11 +193,11 @@ export default ({agent, isVisitor}: IProps) => {
       ></SharePopup>}
 
       {/* 删除弹层 */}
-      <PopupSheets 
-          setShow={setShowPopup} 
+      <PopupSheets
+          setShow={setShowPopup}
           show={showPopup}
           content={[
-            {item: <View className="text-12 font-normal text-gray-45">删除后所有数据将被清空,且无法恢复</View>}, 
+            {item: <View className="text-12 font-normal text-gray-4">删除后所有数据将被清空,且无法恢复</View>},
             {item:'删除', type: 'warn', onClick: ()=> {
               setShowPopup(false);
               setTimeout(()=> {
@@ -213,12 +213,12 @@ export default ({agent, isVisitor}: IProps) => {
                   Taro.showTabBar().catch(()=> {});
                 },
               })
-              
+
             }},
           ]}
         >
         </PopupSheets>
-        
+
         {/* 登录弹窗 */}
         <LoginPopup showPopup={showLogin} setShowPopup={setShowLogin}></LoginPopup>
     </View>

+ 4 - 4
src/components/AgentPage/components/AgentQRcode/index.tsx

@@ -17,7 +17,7 @@ interface IProps {
   agent: TAgentDetail
 }
 export default ({ show, setShow, agent, isVisitor }: IProps) => {
-  const isMine = (!isVisitor) 
+  const isMine = (!isVisitor)
   const { setValue, submit } = useEditContactCard(
     "qrCodeUrl",
     agent?.qrCodeUrl
@@ -33,7 +33,7 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
       setValue(result.url);
 
       submit(result.url);
-      
+
     }catch(e:any){
       Taro.hideLoading()
     }
@@ -49,7 +49,7 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
     if (agent?.qrCodeUrl) {
       return <Image src={agent?.qrCodeUrl} showMenuByLongpress mode="widthFix"></Image>;
     }
-    
+
     if(isMine){
       return (
         <View onClick={handleClick}>
@@ -70,7 +70,7 @@ export default ({ show, setShow, agent, isVisitor }: IProps) => {
 
           {isMine && <View className={style.bottomButtons}>
             <View className="pr-16" onClick={handleClick}>替换</View>
-            <View className="text-gray-25">|</View>
+            <View className="text-gray-3">|</View>
             <View className="pl-16" onClick={handleClear}>清空</View>
           </View>}
         </View>

+ 2 - 2
src/components/AgentPage/components/AgentSwap/index.tsx

@@ -22,7 +22,7 @@ export default ({ show, setShow }: IProps) => {
   const entAgents = agents.filter((item) => item.isEnt);
 
 
-  
+
 
   const handleClick = async (item: TAgent) => {
     if (loading) {
@@ -73,7 +73,7 @@ export default ({ show, setShow }: IProps) => {
           className="flex items-start mb-24"
         >
           <View className="flex flex-col flex-1 truncate">
-            <View className="flex items-end gap-8 text-gray-65 truncate">
+            <View className="flex items-end gap-8 text-gray-5 truncate">
               <View className="text-20 font-medium leading-28 text-black truncate">
                 {item.name}
               </View>

+ 1 - 1
src/components/DigitalCard/DigitalCardBasic.tsx

@@ -26,7 +26,7 @@ const DigitalCardBasic = ({
       <View className="flex flex-col flex-1 justify-center min-h-40">
         <View className="text-16 font-medium leading-24 font-pingfangSCMedium">{name}</View>
         {/* inline-flex flex-nowrap break-normal items-center */}
-        {(hasPosition || hasEntName) && <View className="text-12 leading-20 text-gray-45 gap-4">
+        {(hasPosition || hasEntName) && <View className="text-12 leading-20 text-gray-4 gap-4">
           {entName || ''}{renderPosition()}{!!certificated && <>&nbsp;<View className="certification-container transform translate-y-2"><IconCertificateColor /></View></>}
         </View>}
       </View>

+ 2 - 2
src/components/EmptyData/index.tsx

@@ -5,7 +5,7 @@ export const EmptyDataTitle = ({children}) => {
   return <View className='text-16 text-black font-medium text-center leading-24 mt-20 font-pingfangSCMedium'>{children}</View>
 }
 export const EmptyDataSubInfo= ({children}) => {
-  return <View className='leading-28 text-gray-45 text-14 text-center'>{children}</View>
+  return <View className='leading-28 text-gray-4 text-14 text-center'>{children}</View>
 }
 
 interface IProps {
@@ -18,7 +18,7 @@ interface IProps {
 export default ({type = 'plane', className='', text = '暂无数据', children}: IProps)=> {
   return (
     <View className={`flex flex-col items-center mt-44 ${className}`}>
-      <View className={`data-empty data-empty-${type}`}></View>      
+      <View className={`data-empty data-empty-${type}`}></View>
       {children ? children : <EmptyDataTitle>{text}</EmptyDataTitle>}
     </View>
   )

+ 2 - 2
src/components/KnowledgeList/index.tsx

@@ -88,7 +88,7 @@ const Index = ({ types, multi, entId, placeholder, onChange }: IProps) => {
       return <>{placeholder()}</>
     }
     return <View className="flex flex-col gap-8 items-center pt-45"> <EmptyData type={'search'}>
-      <View className="text-gray-45 flex flex-col items-center">
+      <View className="text-gray-4 flex flex-col items-center">
         <View>暂无数据</View>
         <View>可在电脑端管理知识库</View>
       </View>
@@ -141,7 +141,7 @@ const Index = ({ types, multi, entId, placeholder, onChange }: IProps) => {
                   <View className="text-14 leading-22 truncate">
                     {item.title}
                   </View>
-                  <View className="text-12 leading-20 text-gray-45">
+                  <View className="text-12 leading-20 text-gray-4">
                     {item.createTime} | {item.fileSizeStr}
                   </View>
                 </View>

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

@@ -17,7 +17,7 @@ import EmptyData, { EmptyDataSubInfo, EmptyDataTitle } from "../EmptyData";
 export interface IProps {
   show: boolean;
   multi?: boolean; // 是否多选
-  title?: string; //弹层 title 
+  title?: string; //弹层 title
   types?: EKnowlegeTypes[]; // 列表类型
   setShow: (show: boolean) => void;
   onPicked: (picked?: TKnowledgeItem[]) => void
@@ -63,7 +63,7 @@ export default function Index({title = '知识库',  show, setShow, multi, types
   }, [entList])
 
   const renderEntContent = () => {
-    
+
     if (!entList.length) {
       return (
         <View className="bg-gray-3 rounded-12 pt-44 h-full">
@@ -92,7 +92,7 @@ export default function Index({title = '知识库',  show, setShow, multi, types
           className="flex items-center gap-2 bg-gray-3 rounded-12 p-12 mb-16"
           onClick={() => setShowPicker(true)}
         >
-          <View className="flex-1 text-14 leading-22 text-gray-45">
+          <View className="flex-1 text-14 leading-22 text-gray-4">
             {selected}
           </View>
           <View className="flex-center">

+ 4 - 4
src/components/LoginPopup/index.tsx

@@ -43,13 +43,13 @@ export default function Index({showPopup, setShowPopup, onEnd}:IProps) {
     fetchPageData()
   }, [])
 
-  
-  
+
+
 
   return (
     <Popup setShow={setShowPopup} show={showPopup}>
       <View className="text-24 text-center font-medium leading-36 text-black mb-12 -mt-22">欢迎来到小蓝本智能体</View>
-      <View className="text-gray-45 text-center text-14 leading-24 mb-40 font-normal">
+      <View className="text-gray-4 text-center text-14 leading-24 mb-40 font-normal">
         <View>激活您的AI商务分身,开启智能商务</View>
         <View>7x24h随时应答·智能管理知识库·主动拓展人脉</View>
       </View>
@@ -68,7 +68,7 @@ export default function Index({showPopup, setShowPopup, onEnd}:IProps) {
         手机号快速登录
       </Button>
       <View className="flex items-center justify-center text-12 mb-66 text-center">
-        <View className="flex-center text-gray-45 gap-8" onClick={handleChecked}><WemetaRadio checkbox checked={checked}></WemetaRadio>同意</View>
+        <View className="flex-center text-gray-4 gap-8" onClick={handleChecked}><WemetaRadio checkbox checked={checked}></WemetaRadio>同意</View>
         {agreements.map(item=> <Text onClick={()=> navToWebView(item.link)} className="primary-color">《{item.name}》</Text>)}
       </View>
     </Popup>

+ 26 - 16
src/components/TextPolish/index.tsx

@@ -1,39 +1,49 @@
 import { View } from "@tarojs/components";
-import IconStarColor from "@/components/icon/icon-star-color";
+import IconStarColor from "@/components/icon/IconStarColor";
 import { textPolishing } from '@/service/agent'
 import { isSuccess } from "@/utils";
-import Taro from "@tarojs/taro";
+import { useState } from "react";
 
 interface Props {
-  text: string; 
+  text: string;
   type: "personality" | "greeting"
   onPolished: (text:string|null) => void
+  onStateChange: (loading: boolean) => void
 }
 const Index = ({
   text,
   type,
-  onPolished
+  onPolished,
+  onStateChange,
 }: Props) => {
-  
+  const [isLoading, setIsLoading] = useState(false)
 
   const handleClick = async () => {
     // console.log('请求服务端润色')
-    
-    Taro.showLoading()
-    const response = await textPolishing({
-      content: text,
-      type: type
-    })
-    Taro.hideLoading()
-    if(isSuccess(response.status)){
-      onPolished(response.data?.content)
+    if(isLoading){
+      return
+    }
+    setIsLoading(true)
+    onStateChange(true)
+    try{
+      const response = await textPolishing({
+        content: text,
+        type: type
+      })
+      setIsLoading(false)
+      onStateChange(false)
+      if(isSuccess(response.status)){
+        onPolished(response.data?.content)
+      }
+    }catch(e){
+      setIsLoading(false)
+      onStateChange(false)
     }
   }
 
   return (
     <View className="flex items-center gap-4" onClick={handleClick}>
-      <IconStarColor></IconStarColor>{" "}
-      <View className="gradient-text">润色</View>
+      {!isLoading ? <View className="text-primary flex flex-center"><IconStarColor color="blue"></IconStarColor><View>润色</View></View> : <View className="flex flex-center"><IconStarColor color="colorful"></IconStarColor><View className="gradient-text">润色中...</View></View>}
     </View>
   );
 };

+ 56 - 0
src/components/WemetaTextareaAI/index.module.less

@@ -0,0 +1,56 @@
+.inputContainer{
+  display: flex;
+  flex-direction: column;
+  padding: 10px;
+  border-radius: 12px;
+  background-color: white;
+  border: 2px solid transparent;
+}
+.textInput{
+  display: block;
+  font-family: PingFangSC-Regular;
+  font-size: 15px;
+  font-style: normal;
+  font-weight: 400;
+  line-height: 22px;
+  width: 100%;
+  min-height: 132px;
+  max-height: 200px;
+  text-align: justify;
+  color: var(--color-gray-7);
+  caret-color: var(--color-primary);
+  &::placeholder{
+    color: rgba(#000, .45);
+    line-height: 24px;
+  }
+}
+.inputContainerFocused{
+  .inputContainer();
+  border: 2px solid var(--color-primary);
+}
+.label{
+  flex: 1;
+  font-size: 15px;
+  font-weight: 500;
+  font-family: PingFangSC-Medium;
+  line-height: 22px;
+  color: var(--color-gray-7);
+}
+.textareaContainer{
+  flex: 1;
+}
+.textarea{
+  .textInput();
+  width: 100%;
+  height: 236px;
+}
+.textareaButtons{
+  display: flex;
+  align-items: center;
+}
+.textareaButtonLeft{
+  display: flex;
+  flex: 1;
+  align-items: center;
+  gap: 8px;
+}

+ 133 - 0
src/components/WemetaTextareaAI/index.tsx

@@ -0,0 +1,133 @@
+import { View, Textarea, InputProps } from "@tarojs/components";
+import IconStarColor from "@/components/icon/IconStarColor";
+import TextPolish from '@/components/TextPolish'
+import style from "./index.module.less";
+import { useState, useRef, useEffect } from "react";
+import { countCharacters, getStrByMaxLength } from "@/utils/index";
+interface Props {
+  aiType: "personality" | "greeting"
+  placeholder?: string;
+  value: string;
+  cursorSpacing?: number;
+  maxlength?: number;
+  autoHeight?: boolean;
+  disabled?: boolean;
+  confirmType?: keyof InputProps.ConfirmType;
+  extra?: () => JSX.Element | JSX.Element[] | undefined;
+  prefix?: () => JSX.Element | JSX.Element[] | undefined;
+  extraStyle?: Record<string, string>;
+  onInput?: (value: string) => void;
+  onBlur?: (value: string) => void;
+  bgColor?: string;
+  autoFocus?: boolean;
+  extraClass?: string;
+  onConfirm?: (value: string) => void;
+}
+let isInbox = false;
+const index = ({
+  value,
+  aiType,
+  bgColor,
+  extraClass,
+  extraStyle,
+  disabled,
+  confirmType,
+  prefix,
+  autoHeight,
+  autoFocus = false,
+  placeholder = "请输入...",
+  onInput,
+  onBlur,
+  cursorSpacing,
+  maxlength,
+  extra,
+  onConfirm,
+}: Props) => {
+  const [focus, setFocus] = useState(false);
+  const [isLoading, setIsLoading] = useState(false);
+  const inputRef = useRef<HTMLInputElement>(null); // 创建一个 ref
+
+  const handleFocus = () => {
+    isInbox = false;
+    setFocus(true);
+  };
+  const handleBlur = () => {
+    // console.log("textarea blur");
+    if (!isInbox) {
+      setFocus(false);
+      if (onBlur && inputRef.current) {
+        onBlur(inputRef.current.value);
+      }
+    }
+  };
+  const handleInput = (value: string) => {
+    const len = countCharacters(value);
+    if (maxlength && len > maxlength) {
+      const r = getStrByMaxLength(value, maxlength);
+      onInput && onInput(r);
+      return;
+    }
+    onInput && onInput(value);
+  };
+
+  const onPolished = (text:string|null)=> {
+  if(text){
+    onInput && onInput(text);
+  }
+
+
+
+}
+
+  return (
+    <View
+      className={`${
+        focus ? style.inputContainerFocused : style.inputContainer
+      }  p-12`}
+      style={bgColor ? { backgroundColor: bgColor } : {}}
+    >
+      <View className="flex w-full pb-12">
+        <View className={style.label}>
+          {prefix && prefix()}
+        </View>
+      <View className="flex items-center gap-4 text-14 font-pingfangSCMedium">
+        <TextPolish text={value} type={aiType} onPolished={onPolished} onStateChange={setIsLoading} />
+      </View>
+      </View>
+
+      <View className={style.textareaContainer}>
+        {isLoading ? 'loading': 'noonon'}
+        <Textarea
+          ref={inputRef}
+          value={value}
+          disabled={disabled}
+          confirmType={confirmType}
+          style={extraStyle}
+          onInput={(e: any) => handleInput(e.target.value)}
+          placeholder={placeholder}
+          placeholderStyle="rgba(17,17,17,.25)"
+          className={`${style.textInput} ${extraClass}`}
+          onFocus={handleFocus}
+          onBlur={handleBlur}
+          autoHeight={autoHeight}
+          autoFocus={autoFocus}
+          cursorSpacing={cursorSpacing}
+          maxlength={10000}
+          onConfirm={(e: any) => {
+            onConfirm && onConfirm(e.detail.value);
+          }}
+        />
+        <View className={`${style.textareaButtons} justify-end gap-8`}>
+          {extra && extra()}
+          {/* <View className={`button-rounded-mini ${!value.length ? 'disabled' :''}`} onClick={handleClear}>清除</View> */}
+          {maxlength && (
+            <View className="text-gray-4">
+              {maxlength}/{countCharacters(value)}
+            </View>
+          )}
+        </View>
+      </View>
+    </View>
+  );
+};
+export default index;

+ 2 - 2
src/components/chat-message-content/index.tsx

@@ -6,8 +6,8 @@ export const FileItem = () => {
     //   <IconFIleTxt />
     //   <View className="flex flex-col flex-1 gap-2">
     //     <View className="text-14 leading-22">文件名称</View>
-    //     <View className="text-12 leading-20 text-gray-45">03-24 12:20 | 822.KB</View>
+    //     <View className="text-12 leading-20 text-gray-4">03-24 12:20 | 822.KB</View>
     //   </View>
     // </View>
   )
-}
+}

+ 1 - 1
src/components/component-list/components/card-channels/index.tsx

@@ -18,7 +18,7 @@ interface Props {
 
 const redirectTips = () => {
   return (
-    <View className="text-white text-10 leading-18 bg-gray-45 rounded-30 right-8 bottom-8 inline-block absolute px-6">
+    <View className="text-white text-10 leading-18 bg-gray-4 rounded-30 right-8 bottom-8 inline-block absolute px-6">
       跳转视频号查看
     </View>
   );

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

@@ -31,7 +31,7 @@ export default function Index({url, setUrl}:IProps) {
   const onDelete = () => {
     setUrl('')
   }
-  
+
 
   // 渲染封面
   const renderPoster = (src?: string) => {
@@ -56,7 +56,7 @@ export default function Index({url, setUrl}:IProps) {
             className={style.iconAdd}
           ></Image>
         </View>
-        <View className="text-gray-45 text-12 leading-20 text-center">
+        <View className="text-gray-4 text-12 leading-20 text-center">
           上传展示图
         </View>
       </>
@@ -64,7 +64,7 @@ export default function Index({url, setUrl}:IProps) {
   };
 
 
-  
+
 
   return ( <View className="flex flex-col gap-6 w-full">
     <View className="flex w-full items-center">

+ 14 - 0
src/components/icon/IconStarColor/index.tsx

@@ -0,0 +1,14 @@
+import { Image } from '@tarojs/components'
+import Icon from '@/images/svgs/icon-star-color.svg'
+import IconWhite from '@/images/svgs/icon-star.svg'
+import IconBlue from '@/images/svgs/icon-star-blue.svg'
+interface IProps {
+  color?: 'blue' | 'white' | 'colorful'
+}
+export default (props: IProps) => {
+  if(props.color === 'blue') return <Image src={IconBlue} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
+  if(props.color === 'white') return <Image src={IconWhite} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
+  return (
+    <Image src={Icon} mode="widthFix" style={{width: '16px', height: '16px'}}></Image>
+  )
+}

+ 0 - 7
src/components/icon/icon-conversation-color/index.tsx

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

+ 0 - 7
src/components/icon/icon-people-color/index.tsx

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

+ 0 - 7
src/components/icon/icon-star-color/index.tsx

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

+ 4 - 3
src/components/list/card-list/index.tsx

@@ -2,13 +2,14 @@ import { View } from "@tarojs/components"
 
 // todo: 改了好几版,需要根据新 ui 重新规划组件
 interface Props {
+  className?: string
   children?: JSX.Element[]|JSX.Element
 }
 
-export default ({children}:Props) => {
+export default ({className='', children}:Props) => {
   return (
-    <View className="bg-white rounded-16 overflow-hidden">
+    <View className={`bg-white rounded-16 overflow-hidden ${className}`}>
       {children}
     </View>
   )
-}
+}

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

@@ -8,8 +8,8 @@ export default ()=> {
           <IconPlusBig/>
         </View>
         <View className="text-14 leading-22 font-medium mb-4">上传你的二维码</View>
-        <View className="text-12 leading-20 text-gray-45">方便客户快速沟通,扫码即可联系你</View>
+        <View className="text-12 leading-20 text-gray-4">方便客户快速沟通,扫码即可联系你</View>
       </View>
     </View>
   )
-}
+}

+ 7 - 7
src/components/voice-player-bar/index.tsx

@@ -20,14 +20,14 @@ export interface IVoicePlayerBar {
   stop: () => void;
 }
 const audioInstance = Taro.createInnerAudioContext();
-  
+
 export default forwardRef<IVoicePlayerBar, Props>(({voiceItem}:Props, ref)=> {
   const [playing, setPlaying] = useState(false);
   audioInstance.onEnded(()=> {
     setPlaying(false)
   })
-  
-  
+
+
   const stopAudio = ()=> {
     audioInstance.stop()
     setPlaying(false)
@@ -55,10 +55,10 @@ export default forwardRef<IVoicePlayerBar, Props>(({voiceItem}:Props, ref)=> {
       stop: stopAudio,
     };
   });
-  
+
   useUnload(()=> {
     stopAudio();
-    
+
   })
   const renderPlayerBar = () => {
     if (voiceItem) {
@@ -72,7 +72,7 @@ export default forwardRef<IVoicePlayerBar, Props>(({voiceItem}:Props, ref)=> {
             ></Image>
           </View>
           <View className='text-14 leading-22 font-medium truncate'>
-            {voiceItem?.voiceName} 
+            {voiceItem?.voiceName}
             {/* {voiceItem?.gender === 'male' ? "男" : "女"} */}
           </View>
         </>
@@ -88,7 +88,7 @@ export default forwardRef<IVoicePlayerBar, Props>(({voiceItem}:Props, ref)=> {
             className={style.icon}
           ></Image>
         </View>
-        <View className='text-14 leading-22 font-medium text-gray-45'>
+        <View className='text-14 leading-22 font-medium text-gray-4'>
           请选择声音
         </View>
       </>

+ 4 - 4
src/components/wemeta-tabs/index.module.less

@@ -12,7 +12,7 @@
   font-family: PingFangSC-Medium;
   line-height: 22px;
   font-weight: 400;
-  color: rgba(#000, .65);
+  color: rgba(#000, 1);
   flex: 1;
   flex-shrink: 0;
   display: flex;
@@ -51,7 +51,7 @@
 
 // 外框型 outline
 .outlineTabButtons{
-  display: flex; 
+  display: flex;
   padding: 16px 20px 0;
   width: 100%;
   color: rgba(#000, .65);
@@ -64,7 +64,7 @@
 .outlineTabButton{
   position: relative;
   flex: 1;
-  display: flex; 
+  display: flex;
   align-items: center;
   padding-bottom: 14px;
   &::after{
@@ -84,4 +84,4 @@
   &::after{
     display: block;
   }
-}
+}

+ 2 - 2
src/components/wemeta-textarea/index.tsx

@@ -41,7 +41,7 @@ const index = ({
 }: Props) => {
   const [focus, setFocus] = useState(false);
   const inputRef = useRef<HTMLInputElement>(null); // 创建一个 ref
-  
+
   const handleFocus = () => {
     isInbox = false;
     setFocus(true);
@@ -98,7 +98,7 @@ const index = ({
           {extra && extra()}
           {/* <View className={`button-rounded-mini ${!value.length ? 'disabled' :''}`} onClick={handleClear}>清除</View> */}
           {maxlength && (
-            <View className="text-gray-45">
+            <View className="text-gray-4">
               {maxlength}/{countCharacters(value)}
             </View>
           )}

+ 0 - 4
src/images/svgs/icon-people-color.svg

@@ -1,4 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 8C0 3.58172 3.58172 0 8 0H20C24.4183 0 28 3.58172 28 8V20C28 24.4183 24.4183 28 20 28H8C3.58172 28 0 24.4183 0 20V8Z" fill="#C831FA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5293 10.8609C17.5293 12.8189 15.9594 14.3889 14 14.3889C12.0412 14.3889 10.4707 12.8189 10.4707 10.8609C10.4707 8.90285 12.0412 7.3335 14 7.3335C15.9594 7.3335 17.5293 8.90285 17.5293 10.8609ZM14 20.6668C11.1082 20.6668 8.66666 20.1968 8.66666 18.3835C8.66666 16.5695 11.1236 16.1161 14 16.1161C16.8924 16.1161 19.3333 16.5861 19.3333 18.3995C19.3333 20.2135 16.8764 20.6668 14 20.6668Z" fill="white"/>
-</svg>

+ 4 - 0
src/images/svgs/icon-star-blue.svg

@@ -0,0 +1,4 @@
+<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7501 7.67708C11.8434 6.92775 9.57205 4.65641 8.82272 1.74975L8.50005 0.498413L8.17738 1.74975C7.42805 4.65641 5.15672 6.92775 2.25005 7.67708L0.998718 7.99975L2.25005 8.32308C5.15672 9.07241 7.42805 11.3437 8.17738 14.2497L8.50005 15.5017L8.82272 14.2497C9.57205 11.3437 11.8434 9.07241 14.7501 8.32308L16.0014 7.99975L14.7501 7.67708Z" fill="#327BF9"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.0007 5.16469C13.0007 4.39002 13.8501 3.49869 14.6667 3.49869C13.8807 3.49869 13.0007 2.59802 13.0007 1.83335C13.0007 2.59802 12.1287 3.49869 11.3354 3.49869C12.0987 3.49869 13.0007 4.38535 13.0007 5.16469Z" fill="#327BF9"/>
+</svg>

+ 2 - 2
src/pages/account/index.tsx

@@ -16,10 +16,10 @@ export default function Index() {
       <NavBarNormal backText="账号管理"></NavBarNormal>
       <View className="w-full px-16 py-24 flex flex-col gap-16">
         <ListWrapper>
-          <ListRow underline rightRenderer={()=> <View className="flex-center text-gray-65">{whoami?.mobile}</View>}>
+          <ListRow underline rightRenderer={()=> <View className="flex-center text-gray-5">{whoami?.mobile}</View>}>
             绑定手机
           </ListRow>
-          <ListRow rightRenderer={()=> <View className="flex-center text-gray-65">{whoami?.userId}</View>}>
+          <ListRow rightRenderer={()=> <View className="flex-center text-gray-5">{whoami?.userId}</View>}>
           用户ID
           </ListRow>
         </ListWrapper>

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

@@ -157,7 +157,7 @@ export default function Index() {
                 <View className={style.icon}>
                   <IconPlusBig></IconPlusBig>
                 </View>
-                <View className="pt-8 text-12 leading-20 text-gray-45">
+                <View className="pt-8 text-12 leading-20 text-gray-4">
                   创建新形象
                 </View>
               </View>

+ 13 - 13
src/pages/agent-gen/components/step/StepPick.tsx

@@ -2,7 +2,7 @@ import { View, Swiper, SwiperItem, Image } from "@tarojs/components";
 import React, { useEffect, useState } from "react";
 import { AvatarMedia } from "@/components/AvatarMedia";
 import style from "./index.module.less";
-import IconStarColor from "@/components/icon/icon-star-color";
+import IconStarColor from "@/components/icon/IconStarColor";
 import { getUploadedAvatarStatus, genAvatarVideo, type TAvatarItem } from '@/service/storage'
 import useSWR from 'swr';
 import Taro from "@tarojs/taro";
@@ -25,7 +25,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
   const [currentTaskId, setCurrentTaskId] = useState<string|number>(taskId);
 
   const avatarsList = (videoGenerating) ? videos : avatars
-  
+
   const goNext = () => {
     const pickedAvatar = avatarsList[currentSwiperIndex]
     if(!pickedAvatar){
@@ -50,7 +50,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
       prev()
     }
   }
-  
+
   Taro.hideLoading()
 
   // 隔 3 秒轮询生成微视频任务
@@ -87,7 +87,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
       setShouldPoll(false);
     }
     return ()=> {
-      
+
     }
   }, [data])
 
@@ -99,12 +99,12 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
   const genVideo = async () => {
     const a  = avatars[currentSwiperIndex]
     if(!a.avatarUrl){
-      return 
+      return
     }
     const avatarUrl = a.avatarUrl
     setVideoGenerating(true)
     // 清空 useSWR 缓存
-    mutate(undefined, false); 
+    mutate(undefined, false);
     // 清空上一次可能生成的 videos
     setVideos([])
     setCurrentSwiperIndex(0)
@@ -114,13 +114,13 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
       setShouldPoll(true)
     }
   }
-  
+
 
   const onSwiperChange = (e: any) => {
     const i = e.detail.current;
     console.log(i)
     setCurrentSwiperIndex(i);
-  };  
+  };
 
   const renderSwipers = () => {
     const renderIndicator = (currentIndex: number) => {
@@ -168,7 +168,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
                   <View>原图</View>
                 </View> }
                 {!avatar.isOriginal && <View className={style.aiTips}>图片由AI生成</View> }
-                
+
               </View>
             </SwiperItem>
           })}
@@ -179,8 +179,8 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
     );
   };
 
-  
-  
+
+
   const renderProcessingStatus = () => {
     const targetText = !videoGenerating ? 'AI' : '视频'
     if(data?.data.status === 'process_fail'){
@@ -194,7 +194,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
 
   const renderContent = ()=> {
     if((avatars.length && !videoGenerating) || (videos.length)){
-      
+
       return renderSwipers()
     }
 
@@ -206,7 +206,7 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
     </View>
   }
 
-  
+
 
   return (
     <View>

+ 4 - 4
src/pages/agent-gen/components/step/StepStart.tsx

@@ -10,11 +10,11 @@ import { isSuccess } from "@/utils";
 import { getNewAvatarPic } from "@/utils/avatar";
 interface IProps {
   next: () =>void
-  setTaskId: (value:any)=> void 
+  setTaskId: (value:any)=> void
 }
 
 export default React.memo(function StepStart({ next, setTaskId }: IProps) {
-  
+
   const router = useRouter();
   const { avatarUrl } = router.params
   const uploadedAvatarUrl = decodeURIComponent(avatarUrl ?? '')
@@ -40,7 +40,7 @@ export default React.memo(function StepStart({ next, setTaskId }: IProps) {
     if(!currentAvatarUrl.length){
       return
     }
-    
+
     Taro.showLoading();
     console.log({
       aiGenerated: true,
@@ -70,7 +70,7 @@ export default React.memo(function StepStart({ next, setTaskId }: IProps) {
         </View>
       </View>
       {/* <View className="mb-24">
-        <View className="text-14 font-medium text-black mb-10">创意描述<Text className="text-12 text-gray-45">(非必填)</Text></View>
+        <View className="text-14 font-medium text-black mb-10">创意描述<Text className="text-12 text-gray-4">(非必填)</Text></View>
         <WemetaTextarea
           value={value}
           onInput={handleInput}

+ 12 - 9
src/pages/agent/components/AgentSetting/components/AgentCard/index.module.less

@@ -1,15 +1,17 @@
 .container{
-  padding: 24px 72px 32px;
+  padding: 20px 100px 20px;
 }
 .card{
   display: flex;
   align-items: center;
   justify-content: center;
-  width: 200px;
-  height: 356px;
+  width: 140px;
+  height: 256px;
   overflow: hidden;
   border-radius: 16px;
   background-color: white;
+  background-image: url(https://cdn.wehome.cn/cmn/png/117/META-H8UKXHWU-X0WXBKY1C0G0QA1DIH762-HABOZOFM-A41.png);
+  background-size: cover;
 }
 .tips{
   display: flex;
@@ -31,11 +33,12 @@
   background-color: var(--color-primary);
 }
 .tipsText{
-  font-weight: 400;
+  font-weight: 500;
   font-size: 14px;
   line-height: 22px;
-  color: rgba(#000, .45);
-   
+  font-family: PingFangSC-Medium;
+  color: var(--color-primary);
+
 }
 
 .changeButton{
@@ -50,7 +53,7 @@
   height: 40px;
   font-weight: 500;
   font-size: 12px;
-  color: rgba(#000, .85); 
+  color: rgba(#000, .85);
   background-color: rgba(#FFF, .7);
   backdrop-filter: blur(7px) brightness(0.94) contrast(146%) grayscale(3%) opacity(81%);
 }
@@ -70,7 +73,7 @@
   box-sizing: border-box;
   padding: 0 24px 54px;
   gap: 8px;
-  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50.12%, #D6D6D6 100%); 
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50.12%, #D6D6D6 100%);
 }
 .block{
   background-color: white;
@@ -90,4 +93,4 @@
 .block3{
   .block();
   width: 160px;
-}
+}

+ 16 - 8
src/pages/agent/components/AgentSetting/components/AgentCard/index.tsx

@@ -46,6 +46,7 @@ export default () => {
   };
 
   const renderContent = () => {
+
     if (!agent?.avatarUrl) {
       return (
         <View className={style.tips}>
@@ -72,19 +73,26 @@ export default () => {
     );
   };
 
-  return (
-    <View className={style.container}>
-      <View className={style.card} onClick={handleClick}>
-        {renderContent()}
-      </View>
-      <View
-        className="w-full flex-center pt-24 gap-6"
+  const renderFooter = ()=> {
+    if(agent?.avatarUrl){
+      return <View
+        className="w-full flex-center pt-16 gap-6"
         onClick={() => handleChange(!!!agent?.enabledChatBg)}
       >
-        {/* ={agent?.enabledChatBg} */}
         <WemetaRadio checkbox checked={agent?.enabledChatBg}></WemetaRadio>
         <View className="font-medium text-14 text-black">启用聊天背景</View>
       </View>
+    }
+    return <View className="pt-16 font-medium text-14 text-gray-3 text-center">用于头像或聊天背景</View>
+  }
+
+  return (
+    <View className={style.container}>
+      <View className={style.card} onClick={handleClick}>
+        {renderContent()}
+      </View>
+
+      {renderFooter()}
     </View>
   );
 };

+ 20 - 33
src/pages/agent/components/AgentSetting/components/AgentContactCard/index.module.less

@@ -1,50 +1,37 @@
-.container{
-  padding: 24px 16px 0;
+.card{
+  padding: 0 16px 16px;
   border-radius: 12px;
   background-color: white;
 }
-.header{
-  display: flex;
-  align-items: center;
-  color: black;
-  font-family: PingFang SC;
-  font-weight: 500;
-  font-size: 20px;
-  line-height: 28px;
-}
-.items{
- color: rgba(#000, .65);
- font-family: PingFang SC;
-  font-weight: 400;
-  font-size: 12px;
-  line-height: 20px;
-  min-height: 26px;
-}
-.item{
-  margin-bottom: 2px;
+.list{
+ display: flex;
+ flex-direction: column;
 }
 
-.name{
-  flex: 1;
-}
-.icons{
+.listItem{
+  padding: 0;
   display: flex;
   align-items: center;
-  gap: 8px;
+  border-bottom: 1px solid var(--color-gray-2);
+  &:last-child{
+    border-bottom: none;
+  }
 }
-.icon{
+.label{
   display: flex;
   align-items: center;
-  justify-content: center;
-  width: 24px;
-  height: 24px;
-  border-radius: 100%;
-  background-color: rgba(#000, .05);
+  gap: 4px;
+  font-size: 15px;
+  line-height: 22px;
+  font-family: PingFangSC-Medium;
+  color: #000;
+  width: 62px;
 }
+
+
 .editButton{
   display: block;
   padding: 14px 0;
-  border-top: 1px solid rgba(#000, .05);
 }
 .editButtonText{
   font-family: PingFang SC;

+ 62 - 29
src/pages/agent/components/AgentSetting/components/AgentContactCard/index.tsx

@@ -1,42 +1,75 @@
-import { View } from "@tarojs/components"
+import { View, Text, Input} from "@tarojs/components"
 import style from './index.module.less'
-import IconEditGray from "@/components/icon/icon-edit-gray"
-import Taro from "@tarojs/taro";
+import IconPlusBlue from "@/components/icon/icon-plus-blue"
 import { useAgentStore } from "@/store/agentStore";
-import ContactIcon from '@/components/ContactIcon'
-
+// import ContactIcon from '@/components/ContactIcon'
 export default () => {
-  const agent = useAgentStore((state)=> state.agent)
+  const agentTemp = useAgentStore((state)=> state.agentTemp)
+  const updateAgentTemp = useAgentStore((state)=> state.updateAgentTemp)
+
+  // 处理表单字段更新
+  const handleFieldChange = (field: string, value: string) => {
+    console.log(field, value)
+    updateAgentTemp({ [field]: value });
+  };
+
   const handleEdit = ()=> {
-    Taro.navigateTo({
-      url: `/pages/editor-contact/index?agentId=${agent?.agentId}`,
-    })
+    // Taro.navigateTo({
+    //   url: `/pages/editor-contact/index?agentId=${agent?.agentId}`,
+    // })
   }
+
   return(
-    <View className={style.container}>
-      <View className={style.header}>
-        <View className={`${style.name} truncate`}>{agent?.name}</View>
-        <View className={style.icons}>
-          <ContactIcon type="phone" actived={!!agent?.mobile}></ContactIcon>
-          <ContactIcon type="mail" actived={!!agent?.email}></ContactIcon>
-          <ContactIcon type="location" actived={!!agent?.address}></ContactIcon>
-          <ContactIcon type="qrcode" actived={!!agent?.qrCodeUrl}></ContactIcon>
+    <View className={style.card}>
+      <View className={style.list}>
+        <View className={style.listItem}>
+          <View className={style.label}>姓名 <Text className="text-red leading-22 text-14">*</Text> </View>
+          <View className={style.value}>
+            <Input
+              className="py-16"
+              value={agentTemp?.name || ''}
+              onBlur={(e: any) => handleFieldChange('name', e.detail.value)}
+              onInput={(e: any) => handleFieldChange('name', e.detail.value)}
+              placeholderStyle="color: rgba(17,17,17,.25)"
+              placeholder="输入姓名"
+              maxlength={40}
+            />
+          </View>
         </View>
-      </View>
-      <View className={style.items}>
-        <View className={style.item}>
-        {agent?.entName}
+        <View className={style.listItem}>
+          <View className={style.label}>企业</View>
+          <View className={style.value}>
+            <Input
+              className="py-16"
+              value={agentTemp?.entName || ''}
+              onBlur={(e: any) => handleFieldChange('entName', e.detail.value)}
+              onInput={(e: any) => handleFieldChange('entName', e.detail.value)}
+              placeholderStyle="color: rgba(17,17,17,.25)"
+              placeholder="输入企业名称"
+            />
+          </View>
         </View>
-        <View className={style.item}>
-        {agent?.position}
+        <View className={style.listItem}>
+          <View className={style.label}>手机</View>
+          <View className={style.value}>
+            <Input
+              className="py-16"
+              value={agentTemp?.mobile || ''}
+              onBlur={(e: any) => handleFieldChange('mobile', e.detail.value)}
+              onInput={(e: any) => handleFieldChange('mobile', e.detail.value)}
+              placeholderStyle="color: rgba(17,17,17,.25)"
+              placeholder="输入手机号"
+            />
+          </View>
         </View>
-      </View>
-      <View className={style.editButton} onClick={handleEdit}>
-        <View className="flex-center gap-4">
-          <IconEditGray/>
-          <View className={style.editButtonText}>编辑</View>
+        <View className={style.listItem}>
+          <View className="flex flex-center gap-8 pt-16 w-full" onClick={handleEdit}>
+            <IconPlusBlue/>
+            <View className="font-pingfangSCMedium text-14 leading-22 text-primary">更多名片信息</View>
+          </View>
+
         </View>
       </View>
     </View>
   )
-}
+}

+ 3 - 3
src/pages/agent/components/AgentSetting/components/AgentKnowledgeLib/index.tsx

@@ -24,7 +24,7 @@ export default function Index() {
     fetchAgent(agent.agentId);
   };
 
-  
+
 
   if (!agent || !agent.isEnt) {
     return <></>;
@@ -45,7 +45,7 @@ export default function Index() {
               <View className="text-14 font-medium leading-22 text-black pb-2">
                 个人知识
               </View>
-              <View className="text-12 leading-20 text-gray-45">
+              <View className="text-12 leading-20 text-gray-4">
                 使用你上传的内容(如文档、链接等)作为智能体回答的知识基础。
               </View>
             </View>
@@ -63,7 +63,7 @@ export default function Index() {
                     <View className="text-14 font-medium leading-22 text-black pb-2">
                       杭州茗视光眼科医院
                     </View>
-                    <View className="text-12 leading-20 text-gray-45">
+                    <View className="text-12 leading-20 text-gray-4">
                       引用企业统一配置的知识库内容,如用于支持专业、统一的客户沟通。
                     </View>
                   </View>

+ 68 - 53
src/pages/agent/components/AgentSetting/components/AgentSettingList/index.tsx

@@ -4,9 +4,9 @@ import { View } from "@tarojs/components";
 import IconVoiceColor from "@/components/icon/icon-voice-color";
 import CardList from "@/components/list/card-list";
 import CardListItem from "@/components/list/card-list-item";
-import IconPeopleColor from "@/components/icon/icon-people-color";
-import IconConversationColor from "@/components/icon/icon-conversation-color";
+
 import IconIdeaColor from "@/components/icon/icon-idea-color";
+import WemetaTextareaAI from '@/components/WemetaTextareaAI'
 
 import IconArrow from "@/components/icon/icon-arrow";
 import Taro from "@tarojs/taro";
@@ -14,15 +14,23 @@ import { useVoiceStore } from "@/store/voiceStore";
 import { useAgentStore } from "@/store/agentStore";
 
 export default function Index() {
-  
-  const agent = useAgentStore((state)=>  state.agent)
-  const {setEntId} = useVoiceStore()
-  const handleEditVoice = ()=> {
+
+  const agent = useAgentStore((state) => state.agent)
+  const { setEntId } = useVoiceStore()
+  const handleEditVoice = () => {
     // 提前设置当前智能体 entId
     setEntId(agent?.entId ?? 0);
-    Taro.navigateTo({url: '/pages/voice/index'})
+    Taro.navigateTo({ url: '/pages/voice/index' })
   }
-  
+  const agentTemp = useAgentStore((state)=> state.agentTemp)
+  const updateAgentTemp = useAgentStore((state)=> state.updateAgentTemp)
+
+  // 处理表单字段更新
+  const handleFieldChange = (field: string, value: string) => {
+    console.log(field, value)
+    updateAgentTemp({ [field]: value });
+  };
+
   const IconArrowRight = () => {
     return (
       <View className="flex items-center">
@@ -32,50 +40,57 @@ export default function Index() {
   };
 
   return (
-    <CardList>
-          <CardListItem
-            className="pl-16 pr-8"
-            underline
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconVoiceColor}
-            onClick={handleEditVoice}
-          >
-            <View className="text-14 py-18 font-medium leading-22">声音</View>
-          </CardListItem>
-          <CardListItem
-            className="pl-16 pr-8"
-            underline
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconPeopleColor}
-            onClick={()=> {
-              Taro.navigateTo({url: '/pages/editor-pages/editor-personality/index'})
-            }}
-          >
-            <View className="text-14 py-18 font-medium leading-22">人设</View>
-          </CardListItem>
-          <CardListItem
-            className="pl-16 pr-8"
-            underline
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconConversationColor}
-            onClick={()=> {
-              Taro.navigateTo({url: '/pages/editor-pages/editor-greeting/index'})
-            }}
-          >
-            <View className="text-14 py-18 font-medium leading-22">开场白</View>
-          </CardListItem>
-          <CardListItem
-            className="pl-16 pr-8"
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconIdeaColor}
-            onClick={()=> {
-              Taro.navigateTo({url: '/pages/editor-pages/editor-greeting-questions/index'})
-            }}
-          >
-            <View className="text-14 py-18 font-medium leading-22">
-              开场提问引导
-            </View>
-          </CardListItem>
-        </CardList>
+    <View className="flex flex-col gap-12">
+      <WemetaTextareaAI
+        aiType="personality"
+        prefix={() => <View>人设</View>}
+        placeholder="示例:你是一名汽车销售人员,拥有专业的汽车相关知识,善于耐心的解答客户提出的每一个问题,并会主动邀请客户上门试驾。"
+        value={agentTemp?.personality ?? ''}
+        autoHeight
+        onInput={(value) => {
+          handleFieldChange('personality', value)
+        }}
+      />
+
+      <WemetaTextareaAI
+        aiType="greeting"
+        prefix={() => <View>开场白</View>}
+        placeholder="开场白是你的智能体和用户说的第一句话,简单做个自我介绍吧"
+        value={agentTemp?.greeting ?? ''}
+        autoHeight
+        onInput={(value) => {
+          handleFieldChange('greeting', value)
+        }}
+      />
+      <CardList>
+        <CardListItem
+          className="pl-16 pr-8"
+          rightRenderer={IconArrowRight}
+          leftRenderer={IconIdeaColor}
+          onClick={() => {
+            Taro.navigateTo({ url: '/pages/editor-pages/editor-greeting-questions/index' })
+          }}
+        >
+          <View className="text-14 py-18 font-medium leading-22 flex items-center">
+            <View className="flex-1">开场提问引导</View>
+            <View className="text-gray-4">去编辑</View>
+          </View>
+        </CardListItem>
+      </CardList>
+      <CardList>
+        <CardListItem
+          className="pl-16 pr-8"
+          underline
+          rightRenderer={IconArrowRight}
+          leftRenderer={IconVoiceColor}
+          onClick={handleEditVoice}
+        >
+          <View className="text-14 py-18 font-medium leading-22 flex items-center">
+            <View className="flex-1">声音</View>
+            <View className="text-gray-4">设置专属声音</View>
+          </View>
+        </CardListItem>
+      </CardList>
+    </View>
   );
 }

+ 9 - 2
src/pages/agent/components/AgentSetting/index.tsx

@@ -3,21 +3,23 @@ import AgentSettingList from './components/AgentSettingList'
 import AgentKnowledgeLib from './components/AgentKnowledgeLib'
 import AgentCard from './components/AgentCard'
 import AgentContactCard from './components/AgentContactCard'
+import BottomBar from "@/components/BottomBar";
 
 import React, { useEffect, useState } from "react";
 import { useAgentStore } from "@/store/agentStore";
+import ButtonMain from "@/components/buttons/ButtonMain";
 
 
 export default React.memo(function Index() {
   console.log('agent setting')
-  const {fetchAgents} = useAgentStore()  
+  const {fetchAgents} = useAgentStore()
 
   useEffect(()=> {
     fetchAgents()
   }, [])
 
   return (
-    <View>
+    <View className="pb-64">
       <AgentCard></AgentCard>
       <View className="mb-20">
         <AgentContactCard></AgentContactCard>
@@ -26,6 +28,11 @@ export default React.memo(function Index() {
       <View className="py-20">
         <AgentKnowledgeLib></AgentKnowledgeLib>
       </View>
+      <BottomBar>
+        <ButtonMain className="flex-1" onClick={()=>{
+          console.log('create')
+        }}>创建</ButtonMain>
+      </BottomBar>
     </View>
   );
 })

+ 4 - 6
src/pages/agent/index.tsx

@@ -56,7 +56,7 @@ export default function Index() {
     <PageCustom>
       <NavBarNormal>编辑智能体</NavBarNormal>
       <View className="px-16 w-full flex flex-col gap-20">
-        <View className={style.tabContainer} 
+        <View className={style.tabContainer}
         style={{
           paddingTop: headerHeight,
         }}
@@ -71,17 +71,15 @@ export default function Index() {
         </View>
         <View className="pt-52">
           <View className={`${tabIndex === "1" ? "block" : "hidden"}`}>
-            <View className="pt-12">
             <AgentSetting></AgentSetting>
-            </View>
           </View>
           <View className={`${tabIndex === "2" ? "block" : "hidden"}`}>
             <View className="pt-36 pb-80">
-              <AgentWebsite></AgentWebsite>  
-            </View>          
+              <AgentWebsite></AgentWebsite>
+            </View>
           </View>
         </View>
-        
+
       </View>
     </PageCustom>
   );

+ 1 - 1
src/pages/chat-messages/components/VisitorSummary/index.tsx

@@ -38,7 +38,7 @@ const VisitorSummary = ({ data }: IndexProps) => {
             <View className="flex-1">
               <Text className="text-primary">{data.chatRound}</Text> 轮对话
             </View>
-            <View className="text-gray-45 leading-20">{data.lastChatTime}</View>
+            <View className="text-gray-4 leading-20">{data.lastChatTime}</View>
           </View>
         </View>
       </View>

+ 1 - 1
src/pages/chat-session-messages/components/VisitorSummary/index.tsx

@@ -17,7 +17,7 @@ const VisitorSummary = ({ data }: IndexProps) => {
                 <View className="text-20 font-semibold font-pingfangSCSemibold leading-30">{data.name}</View>
               </View>
               <View className="text-12 leading-20">
-                <Text className="text-gray-45 leading-20">{data.lastChatTime}</Text>
+                <Text className="text-gray-4 leading-20">{data.lastChatTime}</Text>
                 和 「<Text className="text-primary">{data.myAgentName}</Text>」
                 <Text className="text-[#414A64]">进行</Text><Text className="text-primary">{data.chatRound}</Text> <Text>轮对话</Text>
               </View>

+ 4 - 4
src/pages/contact-us/index.tsx

@@ -18,7 +18,7 @@ import ButtonMain from "@/components/buttons/ButtonMain";
 
 export default function Index() {
 
-  
+
   // 当前选中的值
   const options = ['销售人员', '客服与售后支持', '市场与商务合作人员', '新员工 / 培训岗位', '管理者 / 内容运营者']
   // 是否显示选择器
@@ -59,7 +59,7 @@ export default function Index() {
   };
 
   const isDisable = useMemo(()=> !value.name || !value.mobileOrWechat || !value.entName || !selected, [value, selected])
-  
+
 
   return (
     <PageCustom>
@@ -92,7 +92,7 @@ export default function Index() {
         <FormItem labelText="您的岗位" required>
           <PickerSingleColumn headerTitle="您的岗位" options={options} selected={selected} onChange={handleChange} showPicker={showPicker} setShowPicker={setShowPicker}>
             <View className="flex items-center gap-2 bg-white rounded-12 p-12 mb-16" onClick={() => setShowPicker(true)}>
-              <View className="flex-1 text-14 leading-22 text-gray-45">{selected}</View>
+              <View className="flex-1 text-14 leading-22 text-gray-4">{selected}</View>
               <View className="flex-center">
                 <IconArrowDownRounded/>
               </View>
@@ -110,7 +110,7 @@ export default function Index() {
       </View>
       <BottomBar>
         <ButtonMain className="flex-1" disabled={isDisable} onClick={handleSubmit}>提 交</ButtonMain>
-        
+
       </BottomBar>
     </PageCustom>
   );

+ 3 - 3
src/pages/contact/index.tsx

@@ -150,7 +150,7 @@ export default function Index() {
     ];
   };
 
-  
+
 
   const renderContent = () => {
     if (list?.length) {
@@ -196,7 +196,7 @@ export default function Index() {
           )}
         </View>
         <BlurContainer className="flex flex-col overflow-hidden">
-          <View className="px-16 text-gray-45 text-12 leading-20 mb-20 pt-16">
+          <View className="px-16 text-gray-4 text-12 leading-20 mb-20 pt-16">
             共 {totalCount} 个联系人
           </View>
           <View className="flex-1 h-full overflow-hidden">
@@ -211,7 +211,7 @@ export default function Index() {
             <View className="flex flex-col px-16 gap-8 pb-16">{renderContent()}</View>
           </ScrollView>
           </View>
-          
+
         </BlurContainer>
       </View>
       <CheckLoginPopup onEnd={onLoginEnd}></CheckLoginPopup>

+ 1 - 1
src/pages/dashboard/components/AgentList/components/AgentCard/index.tsx

@@ -55,7 +55,7 @@ const Index = ({
         {(hasPosition || hasEntName) && (
           <View className={`flex flex-col w-full gap-8 truncate`}>
             <View
-              className={`flex items-center flex-1 text-12 leading-20 text-gray-45 truncate`}
+              className={`flex items-center flex-1 text-12 leading-20 text-gray-4 truncate`}
             >
               {renderEntNameAndPosition()}
               {data.isEnt && (

+ 2 - 2
src/pages/dashboard/components/VisitorCard/index.tsx

@@ -38,9 +38,9 @@ const Index = ({ data }: IndexProps) => {
           <View className="flex-center text-12 leading-20 pt-8">
             <View className="flex-1">
               <Text className="text-primary text-12 font-medium leading-20">{data.chatRound}</Text> 轮对话
-              {data.dislikeCnt > 0 ? <><Text className="text-[#FF4747] font-medium"><Text className="text-gray-45 px-8">|</Text>{data.dislikeCnt}</Text><Text>差评</Text></> : <></>}
+              {data.dislikeCnt > 0 ? <><Text className="text-[#FF4747] font-medium"><Text className="text-gray-4 px-8">|</Text>{data.dislikeCnt}</Text><Text>差评</Text></> : <></>}
             </View>
-            <View className="text-gray-45 leading-20">{dayjs(data.lastChatTime).fromNow()}</View>
+            <View className="text-gray-4 leading-20">{dayjs(data.lastChatTime).fromNow()}</View>
           </View>
         </View>
       </View>

+ 11 - 11
src/pages/dashboard/index.tsx

@@ -20,11 +20,11 @@ import CheckLoginPopup from '@/components/CheckLoginPopup'
 import BlurContainer from '@/components/BlurContainer'
 
 export default () => {
-  
+
   const {agents, fetchAgents} = useAgentStore()
-  
+
   const [show, setShow] = useState(false);
-  
+
   // 是否显示选择器
   const [currentAgent, setCurrentAgent] = useState<TAgent|null>(null)
   const [summary, setSummary] = useState<TVisitorSummary>()
@@ -39,7 +39,7 @@ export default () => {
       revalidateOnMount: false
     });
 
-  
+
   // 统计数据
   const fetchSummary = async () => {
     const response = await getVisitorSummary(currentAgent?.agentId)
@@ -72,9 +72,9 @@ export default () => {
     fetchSummary()
     mutate()
   }
-  
 
-  
+
+
   useReachBottom(() => {
     loadMore()
   })
@@ -92,13 +92,13 @@ export default () => {
       <View className="w-full pt-8 px-16 pb-16">
         <View className="flex items-center gap-8 mb-16">
           <View className="bg-white rounded-12 py-12 px-16" onClick={()=> setCurrentAgent(null)}>
-            <View className={`${currentAgent?.agentId ? 'text-black' : 'text-gray-45' }`}>全部</View>
+            <View className={`${currentAgent?.agentId ? 'text-black' : 'text-gray-4' }`}>全部</View>
           </View>
           <View className="flex flex-1 items-center gap-2 bg-white rounded-12 p-12 truncate" onClick={()=> setShow(true)}>
               <View className="flex-1 text-14 leading-22 truncate">
-                {currentAgent ? <View className="text-black truncate">{currentAgent?.name}</View> : <View className="text-gray-45">请选择智能体</View> }
+                {currentAgent ? <View className="text-black truncate">{currentAgent?.name}</View> : <View className="text-gray-4">请选择智能体</View> }
               </View>
-              
+
               <View className="flex-center">
                 <IconArrowDownRounded/>
               </View>
@@ -119,10 +119,10 @@ export default () => {
             Taro.navigateTo({
               url: `/pages/dislike-messages/index?${query}`
             })
-            
+
           }} text="待处理差评" unitText="条" value={unprocessedDislikeCnt} arrow />
         </View>
-        
+
         <AgentList show={show} setShow={setShow} currentAgent={currentAgent} setCurrentAgent={setCurrentAgent}></AgentList>
 
         <CheckLoginPopup onEnd={onLoginEnd}></CheckLoginPopup>

+ 8 - 8
src/pages/dislike-messages/components/ShareToEntPopup/index.tsx

@@ -28,8 +28,8 @@ export default function Index({knowledgeId, showPopup, setShowPopup }:IProps) {
 
   const {entList, fetchMyEntList} = useUserStore()
   const [shareEntList, setShareEntList] = useState(entList ?? []);
-  
-  
+
+
   const handleSwitchChange = async (ent: TEntItem, checked: boolean)=> {
     if(!knowledgeId){
       return false;
@@ -56,10 +56,10 @@ export default function Index({knowledgeId, showPopup, setShowPopup }:IProps) {
   const renderContent = ()=> {
     if(!entList.length){
       return <View className="rounded-8 bg-gray-3 py-20 text-center">
-        <View className="leading-24 text-gray-45 font-medium text-14 mb-4">
+        <View className="leading-24 text-gray-4 font-medium text-14 mb-4">
           暂未加入任何企业
         </View>
-        
+
         <View
           className="text-primary"
           onClick={() => {
@@ -86,14 +86,14 @@ export default function Index({knowledgeId, showPopup, setShowPopup }:IProps) {
     </View>
 
   }
-  
+
 
   return (
     <Popup setShow={setShowPopup} show={showPopup} title="共享至">
-      <View className="text-gray-45 leading-20 mb-16 text-12">开启后,该组织下的所有成员都可引用,可随时取消共享。</View>
-      
+      <View className="text-gray-4 leading-20 mb-16 text-12">开启后,该组织下的所有成员都可引用,可随时取消共享。</View>
+
       {renderContent()}
-      
+
     </Popup>
   );
 }

+ 2 - 2
src/pages/dislike-messages/index.tsx

@@ -219,7 +219,7 @@ export default function Index() {
                       <View className="flex-center  h-28">
                         <IconA />
                       </View>
-                      <View className="flex-1 text-12 leading-20 text-gray-45 truncate">
+                      <View className="flex-1 text-12 leading-20 text-gray-4 truncate">
                         <View className="truncate">
                           {renderContent(item.assistant)}
                         </View>
@@ -273,7 +273,7 @@ export default function Index() {
                       <View className="flex-center  h-28">
                         <IconA />
                       </View>
-                      <View className="flex-1 text-12 leading-20 text-gray-45 truncate">
+                      <View className="flex-1 text-12 leading-20 text-gray-4 truncate">
                         <View className="truncate">
                           {item.correctionAnswer}
                         </View>

+ 12 - 12
src/pages/editor-contact/index.tsx

@@ -31,7 +31,7 @@ const RenderEntCard = (
   //   submit(value, false)
   // }
 
-  
+
   if (!agent?.isEnt) {
     return <View className="px-16 w-full pt-12">
         <ListWrapper>
@@ -42,7 +42,7 @@ const RenderEntCard = (
             >
               <View className="flex items-center font-normal">
                 <View className="flex-1 font-normal">企业</View>
-                <View className="text-gray-65 truncate max-w-[188px]">
+                <View className="text-gray-5 truncate max-w-[188px]">
                   {agent?.entName}
                 </View>
               </View>
@@ -53,10 +53,10 @@ const RenderEntCard = (
             >
               <View className="flex items-center font-normal">
                   <View className="flex-1 font-normal">职位</View>
-                  <View className="text-gray-65 mr-8">{agent?.position}</View>
+                  <View className="text-gray-5 mr-8">{agent?.position}</View>
                 </View>
               {/* <PickerSingleColumn headerTitle="您的岗位" options={options} selected={selected} onPicked={handlePicked} showPicker={showPicker} setShowPicker={setShowPicker}>
-                
+
               </PickerSingleColumn> */}
             </ListRow>
         </ListWrapper>
@@ -70,7 +70,7 @@ const RenderEntCard = (
           >
             <View className="flex items-center font-normal">
               <View className="flex-1 font-normal">企业</View>
-              <View className="text-gray-65 truncate max-w-[188px]">
+              <View className="text-gray-5 truncate max-w-[188px]">
                 {agent?.entName}
               </View>
             </View>
@@ -87,12 +87,12 @@ const RenderEntCard = (
           >
             <View className="flex items-center font-normal">
               <View className="flex-1 font-normal">职位</View>
-              <View className="text-gray-65 mr-8">{agent?.position}</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-65 mr-8">{agent?.position}</View>
+                <View className="text-gray-5 mr-8">{agent?.position}</View>
               </View>
             </PickerSingleColumn> */}
           </ListRow>
@@ -119,7 +119,7 @@ export default function Index() {
             underline
             arrow
             rightRenderer={() => (
-              <View className="text-gray-65 truncate max-w-160">
+              <View className="text-gray-5 truncate max-w-160">
                 {agent?.name}
               </View>
             )}
@@ -133,7 +133,7 @@ export default function Index() {
           </ListRow>
           <ListRow
             rightRenderer={() => (
-              <View className="text-gray-65 truncate max-w-160">
+              <View className="text-gray-5 truncate max-w-160">
                 {agent?.mobile}
               </View>
             )}
@@ -149,7 +149,7 @@ export default function Index() {
           </ListRow>
           <ListRow
             rightRenderer={() => (
-              <View className="text-gray-65 truncate max-w-160">
+              <View className="text-gray-5 truncate max-w-160">
                 {agent?.email}
               </View>
             )}
@@ -165,7 +165,7 @@ export default function Index() {
           </ListRow>
           <ListRow
             rightRenderer={() => (
-              <View className="text-gray-65 truncate max-w-160">
+              <View className="text-gray-5 truncate max-w-160">
                 {agent?.address}
               </View>
             )}
@@ -182,7 +182,7 @@ export default function Index() {
           <ListRow
             rightRenderer={() => {
               return !!agent?.qrCodeUrl?.length ? (
-                <View className="text-gray-65 text-primary font-normal">已上传</View>
+                <View className="text-gray-5 text-primary font-normal">已上传</View>
               ) : (
                 <></>
               );

+ 5 - 5
src/pages/editor-pages/editor-channels/index.tsx

@@ -13,12 +13,12 @@ import ButtonMain from "@/components/buttons/ButtonMain";
 import FormitemSingleImage from '@/components/Form/FormItemSingleImage';
 
 export default function Index() {
-  
+
   let currentComponent = useComponentStore((state) => state.currentComponent);
   if(!currentComponent){
     return <></>
   }
-  
+
   const { saveComponent } = useComponentStore();
   const loading = useComponentStore((state) => state.loading);
   const data = currentComponent?.data;
@@ -54,7 +54,7 @@ export default function Index() {
     Taro.navigateBack()
   };
 
-  
+
 
   const setValueByKey = (key: string, v: string) => {
     shipingValue[key] = v;
@@ -152,7 +152,7 @@ export default function Index() {
               />
             </View>
             <FormitemSingleImage url={shipingValue.poster} setUrl={setLinkPoster} ></FormitemSingleImage>
-            
+
           </View>
         </View>
       </View>
@@ -168,7 +168,7 @@ export default function Index() {
       >
         <View className="flex flex-col gap-16 mb-88">
           <View
-            className={`flex flex-col p-12 gap-10 text-14 rounded-20 leading-22 text-gray-65 bg-gray-f8 overflow-hidden`}
+            className={`flex flex-col p-12 gap-10 text-14 rounded-20 leading-22 text-gray-5 bg-gray-f8 overflow-hidden`}
           >
             {renderTips(tipsType)}
           </View>

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

@@ -112,7 +112,7 @@ export default function Index() {
       </BottomBar>
       <Popup title={"获取视频号ID"} show={show} setShow={setShow}>
         <View className="flex flex-col gap-10 rounded-20 p-12 bg-white">
-          <View className="text-gray-65">
+          <View className="text-gray-5">
             🌟 <Text className="font-medium">小蓝本提示:</Text>
             <Text>
               获取视频号ID的需要登录视频号助手,在首页可以查看自己的视频号ID

+ 10 - 10
src/pages/editor-pages/editor-mini-program/index.tsx

@@ -13,12 +13,12 @@ import FormitemSingleImage from '@/components/Form/FormItemSingleImage';
 import { EComponentType } from "@/consts/enum";
 import ButtonMain from "@/components/buttons/ButtonMain";
 export default function Index() {
-  
+
   let currentComponent = useComponentStore((state)=>  state.currentComponent);
   if(!currentComponent){
     return <></>
   }
-  
+
   const { saveComponent } = useComponentStore();
   const loading = useComponentStore((state)=> state.loading);
   const data = currentComponent.data;
@@ -28,7 +28,7 @@ export default function Index() {
     poster: string;
   }>(data.value);
   const [show, setShow] = useState(false);
-  
+
   const setValueByKey = (key: string, v: string) => {
     setLinkValue((prev)=> {
       prev[key] = v;
@@ -36,8 +36,8 @@ export default function Index() {
     });
   };
 
-  const handleSubmit = async () => {    
-    
+  const handleSubmit = async () => {
+
     if(!data?.id){
       return
     }
@@ -54,7 +54,7 @@ export default function Index() {
       enabled: currentComponent?.enabled ?? true,
       type: EComponentType.miniProgram,
     };
-    
+
     const result = await saveComponent(c)
     if(result){
       Taro.navigateBack()
@@ -65,8 +65,8 @@ export default function Index() {
   const setLinkPoster = (value: string)=> {
     setValueByKey('poster', value)
   }
-  
-  
+
+
 
   const renderTips = () => {
     return (
@@ -115,7 +115,7 @@ export default function Index() {
               />
             </View>
             <FormitemSingleImage url={linkValue.poster} setUrl={setLinkPoster} ></FormitemSingleImage>
-            
+
           </View>
         </View>
       </View>
@@ -131,7 +131,7 @@ export default function Index() {
       >
         <View className="flex flex-col gap-16 mb-88">
           <View
-            className={`flex flex-col p-12 gap-10 text-14 rounded-20 leading-22 text-gray-65 bg-gray-f8 overflow-hidden`}
+            className={`flex flex-col p-12 gap-10 text-14 rounded-20 leading-22 text-gray-5 bg-gray-f8 overflow-hidden`}
           >
             {renderTips()}
           </View>

+ 4 - 4
src/pages/knowledge-item/components/ShareToEntPopup/index.tsx

@@ -60,7 +60,7 @@ export default function Index({
     console.log(currentEnts, '当前企业')
     const ents = currentEnts.map((item)=> item.entId).filter(item => item !== undefined)
     if(!ents.length){
-      return 
+      return
     }
     const response = await shareToEnts(knowledgeId, ents);
     if (isSuccess(response.status)) {
@@ -73,7 +73,7 @@ export default function Index({
         // todo 分开处理展示结果
         Taro.showToast({ title: "分享失败" });
       }
-      
+
     }
   };
 
@@ -141,10 +141,10 @@ export default function Index({
 
   return (
     <Popup setShow={setShowPopup} show={showPopup} title="共享至">
-      <View className="text-gray-45 leading-20 mb-16 text-12">
+      <View className="text-gray-4 leading-20 mb-16 text-12">
         开启后,该组织下的所有成员都可引用。
       </View>
-      
+
       {renderContent()}
 
       {(!!parsedEntList.length) ? <BottomBar>

+ 8 - 8
src/pages/knowledge-item/index.tsx

@@ -38,18 +38,18 @@ export default function Index() {
   const isEnt = (entId !== undefined)
   const { showModal } = useModalStore();
   const [showPopup, setShowPopup] = useState(false);
-  
+
 
   const handleEdit = (qaId: number | string) => {
     Taro.navigateTo({
       url: `/pages/editor-knowledge-item/index?knowledgeId=${knowledgeId}&qaId=${qaId}&knowledgeTitle=${detail?.title}`,
     });
   };
-  
+
   const handleShare = async () => {
     setShowPopup(true)
   };
-  
+
   // 删除问答项
   const handleDeleteItem = async (qaId: number | string) => {
     if (!detail) {
@@ -140,7 +140,7 @@ export default function Index() {
               <View className="text-14 leading-22 truncate">
                 {detail?.title}
               </View>
-              <View className="text-12 leading-20 text-gray-45">
+              <View className="text-12 leading-20 text-gray-4">
                 {detail?.createTime} | {detail?.fileSizeStr}
               </View>
             </FigureListItem>
@@ -150,7 +150,7 @@ export default function Index() {
               <View className="text-14 font-medium leading-22 text-black pb-2">
                 精准QA模式
               </View>
-              <View className="text-12 leading-20 text-gray-45">
+              <View className="text-12 leading-20 text-gray-4">
                 知识转问答,助力AI更高效作答
               </View>
             </View>
@@ -191,7 +191,7 @@ export default function Index() {
                       <View className="flex-center  h-28">
                         <IconA />
                       </View>
-                      <View className={`flex-1 text-12 leading-20 text-gray-45 pt-4 ${!isEnt ? 'truncate': ''}`}>
+                      <View className={`flex-1 text-12 leading-20 text-gray-4 pt-4 ${!isEnt ? 'truncate': ''}`}>
                         <View className={`${!isEnt ? 'truncate': ''}`}>{item.answer}</View>
 
                         {!!item.links.length && (
@@ -239,10 +239,10 @@ export default function Index() {
             共享到企业知识
           </View>
         </BottomBar>}
-        
+
 
         {(knowledgeId!== undefined) && !isEnt && <ShareToEntPopup knowledgeId={knowledgeId} setShowPopup={setShowPopup} showPopup={showPopup}/>}
-        
+
       </View>
     </PageCustom>
   );

+ 1 - 1
src/pages/knowledge/components/CompanyList/index.tsx

@@ -89,7 +89,7 @@ const Index = ({ currentEnt, setCurrentEnt, extraEnt = [] }: IProps) => {
         className="flex items-center gap-2 bg-gray-3 rounded-12 p-12 mb-16"
         onClick={() => setShowPicker(true)}
       >
-        <View className="flex-1 text-14 leading-22 text-gray-45">
+        <View className="flex-1 text-14 leading-22 text-gray-4">
           {selected}
         </View>
         <View className="flex-center">

+ 4 - 4
src/pages/knowledge/components/CompanyTab/components/ScrollList.tsx

@@ -47,7 +47,7 @@ const Index = ({ entId, setTotalCount }: Iprops) => {
     }
   }, [data, pageIndex]);
 
-  
+
 
 
   const handleEdit = (item: TKnowledgeItem) => {
@@ -96,13 +96,13 @@ const Index = ({ entId, setTotalCount }: Iprops) => {
     >
       {list.length <= 0 ? (
         <EmptyData type={"search"}>
-          <View className="text-center text-14 leading-28 text-gray-45 mb-44 w-full">
+          <View className="text-center text-14 leading-28 text-gray-4 mb-44 w-full">
             <EmptyDataTitle>暂无数据</EmptyDataTitle>
             <EmptyDataSubInfo>
               <View>可登录电报端管理企业知识库</View>
               <View>也可以开启个人知识库同步到企业知识库</View>
             </EmptyDataSubInfo>
-          </View> 
+          </View>
         </EmptyData>
       ) : (
         <></>
@@ -118,7 +118,7 @@ const Index = ({ entId, setTotalCount }: Iprops) => {
             >
               <View className="flex flex-col flex-1 gap-2 w-full truncate">
                 <View className="text-14 leading-22 truncate">{item.title}</View>
-                <View className="text-12 leading-20 text-gray-45">
+                <View className="text-12 leading-20 text-gray-4">
                   {item.createTime} | {item.fileSizeStr}
                 </View>
               </View>

+ 2 - 2
src/pages/knowledge/components/CompanyTab/components/ScrollListChat.tsx

@@ -112,7 +112,7 @@ const Index = ({ entId, assistantOnly, setTotalCount }: IProps) => {
                         <View className="text-14 leading-22 truncate">
                           {item.title}
                         </View>
-                        <View className="text-12 leading-20 text-gray-45">
+                        <View className="text-12 leading-20 text-gray-4">
                           {item.createTime} | {item.fileSizeStr}
                         </View>
                       </View>
@@ -147,7 +147,7 @@ const Index = ({ entId, assistantOnly, setTotalCount }: IProps) => {
                           <View className="text-14 leading-22 truncate">
                             {item.title}
                           </View>
-                          <View className="text-12 leading-20 text-gray-45">
+                          <View className="text-12 leading-20 text-gray-4">
                             {item.createTime} | {item.fileSizeStr}
                           </View>
                         </View>

+ 6 - 6
src/pages/knowledge/components/CompanyTab/index.tsx

@@ -16,7 +16,7 @@ const Index = () => {
   const [listStyle, setListStyle] = useState<TListStyle>("chat");
   const [ent, setEnt] = useState<TEntItem|null>(null)
   const [assistantOnly, setAssistantOnly] = useState(false);
-  const [totalCount, setTotalCount] = useState<number>(0);  
+  const [totalCount, setTotalCount] = useState<number>(0);
   const {entList } = useUserStore();
 
 
@@ -47,17 +47,17 @@ const Index = () => {
           <CompanyList setCurrentEnt={setEnt} currentEnt={ent}></CompanyList>
         </View>
         {(entList.length > 0 && !ent?.isExpired) && <StyleFilter checked={assistantOnly} setChecked={setAssistantOnly} listStyle={listStyle} setListStyle={setListStyle}>
-          <View className="flex-1 text-12 leading-20 text-gray-45">
+          <View className="flex-1 text-12 leading-20 text-gray-4">
             共 {totalCount ?? 0} 个文件
           </View>
         </StyleFilter>}
-        
+
       </View>
-      
+
       {/* 知识库内容 */}
       {renderScrollList()}
-        
-      
+
+
     </View>
   );
 };

+ 7 - 7
src/pages/knowledge/components/CorrectionTab/components/CorrectionListChat.tsx

@@ -20,7 +20,7 @@ export interface Iprops {
   setTotalCount: (count: number) => void;
 }
 const Index = ({entId, setTotalCount}: Iprops) => {
-  
+
   const { showModal } = useModalStore();
 
   const fetcher = async ([_url, {nextId, pageSize}, [_entId]]) => {
@@ -28,16 +28,16 @@ const Index = ({entId, setTotalCount}: Iprops) => {
     return res.data;
   };
 
-  
+
   const {data, list, loadMore, pageIndex, mutate } = useLoadMoreInfinite<TCorrectionItem[]>(
     createKey(`api/v1/my/correction/list${entId}`, 20, [entId]),
-    fetcher);  
+    fetcher);
 
   const onScrollToUpper = async () => {
     console.log('toUpper')
     loadMore()
   }
-  
+
 
 
   // useDidShow(()=> {
@@ -60,10 +60,10 @@ const Index = ({entId, setTotalCount}: Iprops) => {
       url: `/pages/editor-correction-item/index?correctionId=${id}`,
     });
   };
-  
+
   // 删除问答项
   const handleDeleteItem = async (id: number|string) => {
-    
+
     showModal({
       content: "确定删除吗?",
       onConfirm: async () => {
@@ -115,7 +115,7 @@ const Index = ({entId, setTotalCount}: Iprops) => {
                 <View className="flex-center  h-28">
                   <IconA />
                 </View>
-                <View className="flex-1 text-12 leading-20 text-gray-45 truncate">
+                <View className="flex-1 text-12 leading-20 text-gray-4 truncate">
                   <View className="truncate">{item.answer}</View>
 
                   {!!item.links.length && (

+ 1 - 1
src/pages/knowledge/components/CorrectionTab/index.tsx

@@ -73,7 +73,7 @@ const Index = () => {
           ></CompanyList>
         </View>
         <StyleFilter listStyle={listStyle} setListStyle={setListStyle}>
-          <View className="flex-1 text-12 leading-20 text-gray-45">
+          <View className="flex-1 text-12 leading-20 text-gray-4">
             共纠正 {totalCount ?? 0} 条问答
           </View>
         </StyleFilter>

+ 1 - 1
src/pages/knowledge/components/PersonalTab/components/ScrollList.tsx

@@ -167,7 +167,7 @@ const Index = ({ types, setTotalCount }: IProps) => {
                     <View className="text-14 leading-22 truncate">
                       {item.title}
                     </View>
-                    <View className="text-12 leading-20 text-gray-45 flex items-center">
+                    <View className="text-12 leading-20 text-gray-4 flex items-center">
                       {renderSummary(item)}
                     </View>
                   </View>

+ 11 - 11
src/pages/knowledge/components/PersonalTab/components/ScrollListChat.tsx

@@ -39,14 +39,14 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
 
   const { isMutate, setLoginShow } = useContext(LoginMutationContext)
   const [showAsistantGreeting, setShowAsistantGreeting] = useState(false)
-  
+
 
   const fetcher = async ([_url, {nextId, pageSize}]) => {
       const res = await getMyKnowledgeStream({startId: nextId, pageSize });
       return res.data;
   };
 
-  
+
   const { list, loadMore, pageIndex, mutate ,data, error  } = useLoadMoreInfinite<TKnowledgeStreamResponseData[]>(
     createKey('getMyKnowledgeStream', 10),
     fetcher,
@@ -60,12 +60,12 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
   };
 
   const reversedList = getFilterList(list).reverse();
-  
 
-  
+
+
   const {whoami} = useUserStore();
-  
-  
+
+
   const onScrollToUpper = async () => {
     console.log("toUpper");
     loadMore();
@@ -103,7 +103,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
       setTimeout(()=> {
         setScrollTop( prev => prev + 1); // 重置滚动位置
       }, 300)
-      
+
     }
   }, [pageIndex])
 
@@ -118,7 +118,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
     if(error?.code === 401){
       setLoginShow(true)
     }
-    
+
   }, [error])
 
   useEffect(() => {
@@ -126,7 +126,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
       setTotalCount(data?.[0].totalCount || 0)
     }
   }, [data, pageIndex]);
-  
+
   let timer:any = undefined
   useEffect(()=> {
     timer = setTimeout(()=> {
@@ -166,7 +166,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
                     <View className="w-36 h-36 overflow-hidden pt-4"><KnowledgeIcon data={item} /></View>
                     <View className="flex flex-col flex-1 gap-2 truncate">
                       <View className="text-14 leading-22 truncate">{item.title}</View>
-                      <View className="text-12 leading-20 text-gray-45">
+                      <View className="text-12 leading-20 text-gray-4">
                         {item.createTime} | {item.fileSizeStr}
                       </View>
                     </View>
@@ -196,7 +196,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
                     >
                       <View className="flex flex-col flex-1 gap-2 truncate">
                         <View className="text-14 leading-22 max-w-full min-w-0 inline-block truncate">{item.title}</View>
-                        <View className="flex items-center text-12 leading-20 text-gray-45">
+                        <View className="flex items-center text-12 leading-20 text-gray-4">
                           <View className="flex items-center gap-8">
                             <View>{item.createTime}</View> <View>|</View> { item.parseStatus === 'parsed' ? <View><Text className="text-primary">{`${item.answerCnt}`}</Text> 条问答</View> :  item.fileSizeStr}
                           </View>

+ 1 - 1
src/pages/knowledge/components/PersonalTab/index.tsx

@@ -25,7 +25,7 @@ const Index = () => {
     <>
       <View className="pt-20 pb-20">
         <StyleFilter onlyAssistantButton checked={assistantOnly} setChecked={setAssistantOnly} listStyle={listStyle} setListStyle={setListStyle}>
-          <View className="flex-1 text-12 leading-20 text-gray-45">
+          <View className="flex-1 text-12 leading-20 text-gray-4">
               共 {totalCount} 个文件
             </View>
         </StyleFilter>

+ 4 - 4
src/pages/knowledge/components/StyleFilter/index.tsx

@@ -18,7 +18,7 @@ interface IProps {
 }
 
 const Index = ({listStyle = "chat", setListStyle, checked, setChecked,  onlyAssistantButton = false,children}: IProps) => {
-  
+
   const [showPopup, setShowPopup] = useState(false);
 
 
@@ -31,7 +31,7 @@ const Index = ({listStyle = "chat", setListStyle, checked, setChecked,  onlyAssi
     <>
       <View className="px-16">
         <View className="flex items-center">
-          <View className="flex-1 text-12 leading-20 text-gray-45">
+          <View className="flex-1 text-12 leading-20 text-gray-4">
             {children}
           </View>
           <View className="flex items-center">
@@ -76,7 +76,7 @@ const Index = ({listStyle = "chat", setListStyle, checked, setChecked,  onlyAssi
             <View className="mb-8 text-14 font-medium leading-22">
               对话信息流
             </View>
-            <View className="mb-12 text-12 leading-20 text-gray-45">
+            <View className="mb-12 text-12 leading-20 text-gray-4">
               以对话形式展示,模拟自然的对话流程。
             </View>
           </View>
@@ -99,7 +99,7 @@ const Index = ({listStyle = "chat", setListStyle, checked, setChecked,  onlyAssi
           }}
         >
           <View className="mb-8 text-14 font-medium leading-22">列表形式</View>
-          <View className="mb-12 text-12 leading-20 text-gray-45">
+          <View className="mb-12 text-12 leading-20 text-gray-4">
             将知识点以简洁列表呈现,清晰快速地提供信息。
           </View>
         </View>

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

@@ -40,8 +40,8 @@ export default function Index() {
   const router = useRouter()
   const { msgId, visitorId, agentId } = router.params as {msgId: string, visitorId: string, agentId: string}
 
-  
-  
+
+
   const [visitorQ, setQVisitor] = useState<TVisitorChat|null>(null)
   const [visitor, setVisitor] = useState<TVisitorChat|null>(null)
   const [isDislike, setIsDislike] = useState(false)
@@ -119,7 +119,7 @@ export default function Index() {
       pics: formData.mediaList.map( item => item.url),
     }
     console.log(dataToSubmit)
-    
+
     const {status} = await editVisitorDislikeAnswer(dataToSubmit)
     if(isSuccess(status)){
       Taro.showToast({title: '保存成功', icon: 'success'})
@@ -134,7 +134,7 @@ export default function Index() {
       visitorId,
       size: 2,
     })
-    
+
     if(isSuccess(status), data[0]){
       const _visitor = data[0]
       setVisitor(_visitor)
@@ -143,7 +143,7 @@ export default function Index() {
       }
 
       setIsDislike(_visitor.isDislike)
-      
+
       let content = _visitor.content
       let links = _visitor.correctionLinks ?? []
       let pics = _visitor.correctionPics ?? []
@@ -192,17 +192,17 @@ export default function Index() {
     if(visitorId && msgId){
         getDetail()
     }
-    
+
   }, [visitorId, msgId])
 
-  
+
 
   return (
     <PageCustom>
       <NavBarNormal scrollFadeIn backText={isDislike ? '纠错记录' : '编辑问答'}></NavBarNormal>
       <View className="w-full pb-120">
         <View className="p-16">
-          {isDislike && <View className="text-gray-45 text-12 text-center py-8">修改后的问答将存入知识库,持续训练提升您的智能体</View>}
+          {isDislike && <View className="text-gray-4 text-12 text-center py-8">修改后的问答将存入知识库,持续训练提升您的智能体</View>}
           <View className="flex flex-col gap-16">
             <View className="flex flex-col">
               <View className="flex items-start gap-8 mb-6">
@@ -288,7 +288,7 @@ export default function Index() {
               </View>
               <UploaderGrid onNewUpload={handleChooseMedia}  list = {formData.mediaList} onChange={()=> {}} onDelete={handleDeleteMedia} />
             </View>
-            
+
           </View>
         </View>
 

+ 3 - 3
src/pages/privacy/index.tsx

@@ -52,7 +52,7 @@ export default function Index() {
                   ></WemetaSwitch>
                 </View>
               </View>
-              <View className="text-gray-45 text-12 leading-20">
+              <View className="text-gray-4 text-12 leading-20">
                 开启后,本人直接将智能体发送给好友,该好友可查看你的联系方式(手机、邮箱、微信二维码)
               </View>
             </View>
@@ -77,7 +77,7 @@ export default function Index() {
                   ></WemetaSwitch>
                 </View>
               </View>
-              <View className="text-gray-45 text-12 leading-20">
+              <View className="text-gray-4 text-12 leading-20">
               开启后,好友将你的智能体转发给他人时,他人可查看你的联系方式(手机、邮箱、微信二维码)
               </View>
             </View>
@@ -102,7 +102,7 @@ export default function Index() {
                   ></WemetaSwitch>
                 </View>
               </View>
-              <View className="text-gray-45 text-12 leading-20">
+              <View className="text-gray-4 text-12 leading-20">
               开启后,在本人联系人列表中的人(本人访问过的智能体所属人)可查看到你的联系方式(手机、邮箱、微信二维码)
               </View>
             </View>

+ 12 - 29
src/pages/test/index.tsx

@@ -8,8 +8,6 @@ import TabBarButtons from "@/components/wemeta-tabs/TabBarButtons";
 import WemetaTabs from "@/components/wemeta-tabs/index";
 import CardList from "@/components/list/card-list";
 import CardListItem from "@/components/list/card-list-item";
-import IconPeopleColor from "@/components/icon/icon-people-color";
-import IconConversationColor from "@/components/icon/icon-conversation-color";
 import IconIdeaColor from "@/components/icon/icon-idea-color";
 import IconPageColor from "@/components/icon/icon-page-color";
 
@@ -97,22 +95,7 @@ export default function Index() {
           >
             <View className="text-14 py-18 font-medium leading-22">声音</View>
           </CardListItem>
-          <CardListItem
-            className="pl-16 pr-8"
-            underline
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconPeopleColor}
-          >
-            <View className="text-14 py-18 font-medium leading-22">人设</View>
-          </CardListItem>
-          <CardListItem
-            className="pl-16 pr-8"
-            underline
-            rightRenderer={IconArrowRight}
-            leftRenderer={IconConversationColor}
-          >
-            <View className="text-14 py-18 font-medium leading-22">开场白</View>
-          </CardListItem>
+
           <CardListItem
             className="pl-16 pr-8"
             rightRenderer={IconArrowRight}
@@ -141,7 +124,7 @@ export default function Index() {
                     <View className="text-14 font-medium leading-22 text-black pb-2">
                       个人知识
                     </View>
-                    <View className="text-12 leading-20 text-gray-45">
+                    <View className="text-12 leading-20 text-gray-4">
                       使用你上传的内容(如文档、链接等)作为智能体回答的知识基础。
                     </View>
                   </View>
@@ -159,7 +142,7 @@ export default function Index() {
                     <View className="text-14 font-medium leading-22 text-black pb-2">
                       杭州茗视光眼科医院
                     </View>
-                    <View className="text-12 leading-20 text-gray-45">
+                    <View className="text-12 leading-20 text-gray-4">
                       引用企业统一配置的知识库内容,如用于支持专业、统一的客户沟通。
                     </View>
                   </View>
@@ -182,25 +165,25 @@ export default function Index() {
               <CardListItem underline arrow>
                 <View className="flex items-center font-normal pb-16">
                   <View className="flex-1 font-normal">姓名</View>
-                  <View className="text-gray-65 mr-8">张三</View>
+                  <View className="text-gray-5 mr-8">张三</View>
                 </View>
               </CardListItem>
               <CardListItem underline arrow>
                 <View className="flex items-center font-normal pb-16">
                   <View className="flex-1 font-normal">手机号码</View>
-                  <View className="text-gray-65 mr-8">137 1234 1234</View>
+                  <View className="text-gray-5 mr-8">137 1234 1234</View>
                 </View>
               </CardListItem>
               <CardListItem underline arrow>
                 <View className="flex items-center font-normal pb-16">
                   <View className="flex-1 font-normal">联系邮箱</View>
-                  <View className="text-gray-65 mr-8 truncate max-w-[188px]">zhangsan@eyeclear.com</View>
+                  <View className="text-gray-5 mr-8 truncate max-w-[188px]">zhangsan@eyeclear.com</View>
                 </View>
               </CardListItem>
               <CardListItem underline arrow>
                 <View className="flex items-center font-normal pb-16">
                   <View className="flex-1 font-normal">联系地址</View>
-                  <View className="text-gray-65 mr-8 truncate max-w-[188px]">浙江省杭州市上城区钱江国际时代广场2幢</View>
+                  <View className="text-gray-5 mr-8 truncate max-w-[188px]">浙江省杭州市上城区钱江国际时代广场2幢</View>
                 </View>
               </CardListItem>
             </View>
@@ -216,18 +199,18 @@ export default function Index() {
           </WemetaTabs>
         </Popup> */}
 
-        <PopupSheets 
-          setShow={setShowPopup} 
+        <PopupSheets
+          setShow={setShowPopup}
           show={showPopup}
           content={[
-            {item: <View className="text-12 font-normal text-gray-45">推荐知识库导入,可自动解析内容并提取知识</View>}, 
-            {item: '从知识库导入', type: 'primary', onClick: ()=> {console.log(111)}}, 
+            {item: <View className="text-12 font-normal text-gray-4">推荐知识库导入,可自动解析内容并提取知识</View>},
+            {item: '从知识库导入', type: 'primary', onClick: ()=> {console.log(111)}},
             {item:'手动添加', onClick: ()=> {console.log(22)}},
             {item:'删除', type: 'warn', onClick: ()=> {console.log(333)}},
           ]}
         >
         </PopupSheets>
-        
+
       </View>
     </PageCustom>
   );

+ 2 - 2
src/pages/visiteor-detail/components/AgentCard/index.tsx

@@ -25,7 +25,7 @@ const Index = ({onClick, data, className, renderRight}: Props)=> {
       </View>
       <View className={`flex flex-col m-h-50`}>
         <View className="text-20 font-semibold font-pingfangSCSemibold leading-30">{data.name}</View>
-        {(hasPosition || hasEntName) && <View className="text-12 leading-20 text-gray-45 gap-4">
+        {(hasPosition || hasEntName) && <View className="text-12 leading-20 text-gray-4 gap-4">
           {data.entName || ''}{renderPosition()}{!!data.isEnt && <View className="certification-container  transform translate-y-2"><IconCertificateColor /></View>}
         </View>}
       </View>
@@ -34,4 +34,4 @@ const Index = ({onClick, data, className, renderRight}: Props)=> {
   )
 }
 
-export default Index
+export default Index

+ 2 - 2
src/pages/visiteor-detail/index.tsx

@@ -122,10 +122,10 @@ export default () => {
                             </Text>{" "}
                             次访问你的智能体
                           </View>
-                          <View className="text-12 text-gray-45">
+                          <View className="text-12 text-gray-4">
                             访问时长: {item.chatSecondsDesc}
                           </View>
-                          <View className="text-12 text-gray-45">
+                          <View className="text-12 text-gray-4">
                             共进行了 {item.chatRoundCnt} 轮对话{" "}
                           </View>
                           <ChatRecordItem

+ 2 - 2
src/pages/voice/components/MyVoiceList/index.tsx

@@ -286,7 +286,7 @@ export default ({ onPlay, onSelect, agent }: Props) => {
             <View className="flex items-center leading-22">
               {item.voiceName}
             </View>
-            <View className="text-12 text-gray-45 leading-20">
+            <View className="text-12 text-gray-4 leading-20">
               {item.createTime.slice(0, 7)} 创建
             </View>
           </View>
@@ -332,7 +332,7 @@ export default ({ onPlay, onSelect, agent }: Props) => {
       >
         添加克隆声音
       </View>
-      
+
 
       <Popup show={show} setShow={setShow}>
         <PopupRecorder

+ 2 - 2
src/pages/voice/components/VoiceList/index.tsx

@@ -17,7 +17,7 @@ export default function Index({
   list: TVoiceItem[];
   agent: TAgentDetail | null;
 }) {
-  
+
 
   const handleSelect = async (voiceItem: TVoiceItem) => {
     onSelect(voiceItem);
@@ -75,7 +75,7 @@ export default function Index({
                       <View className="text-14 leading-22 font-medium text-black">
                         {item.voiceName}
                       </View>
-                      <View className="flex-1 text-12 leading-20 font-medium text-gray-45 truncate">
+                      <View className="flex-1 text-12 leading-20 font-medium text-gray-4 truncate">
                         {renderGender(item)}
                       </View>
                     </View>

+ 18 - 2
src/store/agentStore.ts

@@ -16,6 +16,7 @@ import {
   TAgentContactCard,
   TEditAgentCharacter,
   TComponentItem,
+  TAgentTemp,
 } from "@/types/agent";
 import { isSuccess } from "@/utils";
 import Taro from "@tarojs/taro";
@@ -24,10 +25,11 @@ export interface AgentStoreState {
   agents: TAgent[];
   agent: TAgentDetail | null;
   defaultAgent: TAgentDetail | TAgent | null;
+  agentTemp: TAgentTemp; // 未创建智能体临时存储
   // 无需登录查看 agent 信息
   agentProfile: TAgentDetail | null;
-  agentContactCard: TAgentContactCard | null;
-  agentCharacter: TEditAgentCharacter | null;
+  agentContactCard: TAgentContactCard | null;// deprecated
+  agentCharacter: TEditAgentCharacter | null;// deprecated
   ents: { entName: string; entId: string | number }[];
   fetchAgents: () => Promise<TAgent[]>;
   // 请求智能体数据登录状态
@@ -50,6 +52,8 @@ export interface AgentStoreState {
     data: TComponentItem[]
   ) => Promise<boolean>;
   deleteAgent: (agentId: string) => Promise<void>;
+  updateAgentTemp: (updates: Partial<TAgentTemp>) => void;
+  clearAgentTemp: () => void;
   resetData: () => void;
 }
 
@@ -60,6 +64,7 @@ export const useAgentStore = create<AgentStoreState>((set, get) => ({
   agentContactCard: null,
   defaultAgent: null,
   agentCharacter: null,
+  agentTemp: {},
   ents: [],
   resetData: () => {
     set({
@@ -179,6 +184,17 @@ export const useAgentStore = create<AgentStoreState>((set, get) => ({
     }
     return null;
   },
+  updateAgentTemp: (updates: Partial<TAgentTemp>) => {
+    set((state) => ({
+      agentTemp: {
+        ...state.agentTemp,
+        ...updates,
+      },
+    }));
+  },
+  clearAgentTemp: () => {
+    set({ agentTemp: {} });
+  },
   // 编辑声音,人设,开场白,问题引导,知识库
   editAgentCharacter: async (agentId: string, data: TEditAgentCharacter) => {
     const response = await _editAgentCharacter(agentId, data);

+ 30 - 0
src/types/agent.ts

@@ -72,3 +72,33 @@ export type TAgentDetail = {
 export type TAgentContactCard = Pick<TAgentDetail, 'address'|'email'|'entName'|'mobile'|'name' | 'position' | 'qrCodeUrl'>
 
 export type TEditAgentCharacter = Pick<TAgentDetail, 'enabledChatBg' | 'greeting' | 'personality' | 'questionGuides'| 'voiceId' | 'enabledPersonalKb'>
+
+
+export type TAgentTemp = {
+  "address"?: string;
+  "agentId"?: string;
+  "avatarLogo"?: string;
+  "avatarUrl"?: string;
+  "components"?: Array<{
+    "data"?: {};
+    "enabled"?: boolean;
+    "type"?: string;
+  }>;
+  "email"?: string;
+  "enabledChatBg"?: boolean;
+  "enabledPersonalKb"?: boolean;
+  "entId"?: number;
+  "entName"?: string;
+  "greeting"?: string;
+  "isDefault"?: boolean;
+  "isEnt"?: boolean;
+  "isNewEnt"?: boolean;
+  "mobile"?: string;
+  "name"?: string;
+  "personality"?: string;
+  "position"?: string;
+  "qrCodeUrl"?: string;
+  "questionGuides"?: string[];
+  "voiceId"?: string;
+  "voiceName"?: string;
+};

+ 1 - 1
src/xiaolanbenlib/module/axios.js

@@ -44,7 +44,7 @@ export const getHeaders = async (config) => {
 };
 
 axiosIns.interceptors.request.use(async (config) => {
-  
+
   try {
     return getHeaders(config)
   } catch (e) {

+ 28 - 13
tailwind.config.js

@@ -27,9 +27,28 @@ module.exports = {
 
   theme: {
     colors: {
+      // 基础色板
+      'primary': '#327BF9', // 品牌色
+      'primary-light': '#EBF4FF',
+      'warn': '#FD7F2C',
+      'warn-light':  '#FFF2E9',
+      'success':  '#31BE59',
+      'success-light':  '#EAF8EE',
+      'error':  '#EE4949',
+      'error-light':  '#FDEDED',
+      'red': '#FF4747',
+      // 中性色板
+      'gray-1': 'rgba(17, 17, 17, 0.03)', // 未选中按钮背景
+      'gray-2': 'rgba(17, 17, 17, 0.05)', // 骨架图卡片模块
+      'gray-3': 'rgba(17, 17, 17, 0.25)', // 分割线,未编辑边框,禁用文本
+      'gray-4': 'rgba(17, 17, 17, 0.45)', // 辅助文本,输入文本,仅展示,暗文本
+      'gray-5': 'rgba(17, 17, 17, 0.65)', // 副标题,描述文本
+      'gray-6': 'rgba(17, 17, 17, 0.85)', // 正文
+      'gray-7': 'rgba(17, 17, 17, 1)', // 特殊标题,主标题,正文
+
+      // deprecated
       'white': '#FFFFFF',
       'white-70': 'rgba(255, 255, 255, 0.7)',
-      'primary': '#317CFA',
       'primary-10': 'rgba(49, 124, 250, 0.1)',
       'black': '#000000',
       'dark': '#111A34;',
@@ -41,27 +60,23 @@ module.exports = {
       'black-50': 'rgba(0, 0, 0, 0.5)',
       'black-60': 'rgba(0, 0, 0, 0.6)',
       'black-65': 'rgba(0, 0, 0, 0.65)',
-      'title': '#111A34',
+      'title': '#111111',
+      'text': 'rgba(17, 17, 17, 0.85)',
       'harsh': '#F94F17',
       'purple': '#7e5bef',
       'pink': '#ff49db',
       'orange': '#FD561F',
-      'red': '#EE4949',
+
       'green': '#31BE59',
       'yellow': '#EE9E49',
       'gray': '#f6f6f6',
       'gray-page': '#f6f6f6',
       'gray-dark': '#273444',
       'gray-f8': '#F8F8F8',
-      'gray-25': 'rgba(0, 0, 0, 0.25)',
-      'gray-45': 'rgba(0, 0, 0, 0.45)',
-      'gray-65': 'rgba(0, 0, 0, 0.65)',
-      'gray-85': 'rgba(0, 0, 0, 0.85)',
-      'gray-sub': 'rgba(0, 0, 0, 0.75)',
-      'gray-light': 'rgba(0, 0, 0, 0.08)',
-      'gray-2': 'rgba(0, 0, 0, 0.02)',
-      'gray-3': 'rgba(0, 0, 0, 0.03)',
-      'gray-4': 'rgba(0, 0, 0, 0.04)',
+
+
+      'gray-sub': 'rgba(17, 17, 17, 0.75)',
+      'gray-light': 'rgba(17, 17, 17, 0.08)',
       'gray-fafafa': '#fafafa',
     },
     fontSize: {
@@ -86,4 +101,4 @@ module.exports = {
       }
     }
   }
-}
+}