浏览代码

fix: 二维码提示调整

王晓东 1 月之前
父节点
当前提交
b0599ad957

+ 1 - 2
src/components/NavBarNormal/index.module.less

@@ -83,10 +83,9 @@
   top: 0;
   z-index: 10;
   display: flex;
-  min-width: 40px;
+  min-width: 96px;
   min-height: 20;
   height: 100%;
-  // background-color: red;
 }
 .backText{
   color: #000;

+ 35 - 5
src/components/WeComQRcode/index.module.less

@@ -3,6 +3,8 @@
   border: 2px solid #DBDEEC;
   border-radius: 10px;
   padding: 10px;
+  width: 180px;
+  height: 180px;
 }
 .block{
   position: absolute;
@@ -14,26 +16,54 @@
   left: -2px;
   top: 20px;
   height: 140px;
-  width: 10px; 
+  width: 10px;
 }
 .rightBlock{
   .block();
   right: -2px;
   top: 20px;
   height: 140px;
-  width: 10px; 
+  width: 10px;
 }
 .topBlock{
   .block();
   left: 20px;
   top: -2px;
   height: 10px;
-  width: 140px; 
+  width: 140px;
 }
 .bottomBlock{
   .block();
   left: 20px;
   bottom: -2px;
   height: 10px;
-  width: 140px; 
-}
+  width: 140px;
+}
+.longPressTipsContainer{
+  position: relative;
+  width: 144px;
+  justify-content: center;
+  display: flex;
+}
+.longPressTipsText{
+  position: relative;
+  padding-bottom: 3px;
+  z-index: 2;
+  font-family: PingFangSC-Medium;
+  font-weight: 500;
+  font-size: 16px;
+  color: #000000;
+  letter-spacing: 0;
+  text-align: center;
+  line-height: 16px;
+}
+.longPressTipsBar{
+  position: absolute;
+  z-index: 1;
+  bottom: 0;
+  left: 0;
+  width: 144px;
+  height: 10px;
+  opacity: 0.3;
+  background: #327BF9;
+}

+ 8 - 4
src/components/WeComQRcode/index.tsx

@@ -1,8 +1,8 @@
 import { Image, View } from "@tarojs/components";
 import style from './index.module.less'
-const WeComQRcode = ({text = '长按二维码 上传文件给知识库助手'}: {text?: string}) => {
+const WeComQRcode = ({text = '开启智慧知识管理,让AI真正为你所用'}: {text?: string}) => {
   return (
-    <View className="flex flex-col items-center gap-12">
+    <View className="flex flex-col items-center gap-20">
       <View className={style.wrapper}>
         <View className={style.leftBlock}></View>
         <View className={style.topBlock}></View>
@@ -10,10 +10,14 @@ const WeComQRcode = ({text = '长按二维码 上传文件给知识库助手'}:
         <View className={style.bottomBlock}></View>
         <Image
           showMenuByLongpress
-          src="https://cdn.wehome.cn/cmn/jpg/141/META-H8UKWHWU-5YMWRSCR77VBOBA6AANE3-UFEPQICM-26.jpg"
-          style={{ width: "180px", height: "180px" }}
+          src="https://cdn.wehome.cn/cmn/png/60/META-H8UKXHWU-X0WXBKY1C0G0QA1DIH762-ECRHIKGM-4H1.png"
+          style={{ width: "162px", height: "162px" }}
         />
       </View>
+      <View className={style.longPressTipsContainer}>
+        <View className={style.longPressTipsText}>长按识别 立即添加</View>
+        <View className={style.longPressTipsBar}></View>
+      </View>
       <View className="text-12 text-[#777E95] leading-16">{text}</View>
     </View>
   );

+ 3 - 1
src/components/chat-message/MessageRobotRich.tsx

@@ -11,12 +11,14 @@ interface Props {
     fileLen?: number;
   };
   children?: JSX.Element | JSX.Element[];
+  wFull?: boolean
 }
 export default ({
   data,
   loading,
   content = '',
   analyzeStatus = "idle",
+  wFull = false,
   children,
 }: Props) => {
   return (
@@ -29,7 +31,7 @@ export default ({
           {data && data.name}
         </View>
         <View className="flex justify-start">
-          <View className={`${style.message}  ${style.messageRobotRich}`}>
+          <View className={`${style.message}  ${style.messageRobotRich} ${wFull ? style.wFull : ''}`}>
             <View className={style.messageContent}>
               {loading && <ThinkAnimation></ThinkAnimation>}
               {analyzeStatus !== "idle" && (

+ 6 - 2
src/components/chat-message/index.module.less

@@ -10,6 +10,10 @@
   border-bottom-right-radius: 16px;
   border-bottom-left-radius: 16px;
 }
+.wFull{
+  max-width: 100%;
+  width: 100%;
+}
 .avatarContainer{
   width: 24px;
   height: 24px;
@@ -37,7 +41,7 @@
   background: var(--color-primary);
 }
 .messageMeRich{
-  .messageMe(); 
+  .messageMe();
   width: 100%;
   background-color: white;
 }
@@ -57,4 +61,4 @@
   padding-left: 12px;
   border-left: 2px solid #eee;
   background-color: #f8f8f8;
-}
+}

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

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

+ 1 - 1
src/components/list/card-list-item/index.tsx

@@ -49,7 +49,7 @@ export default ({
           </View>
         )} */}
         {arrow && (
-          <View className='flex-center pr-8'>
+          <View className='flex-center pr-8 pl-4'>
             <IconArrowRight16 />
           </View>
         )}

+ 1 - 0
src/images/svgs/IconArrowRight16.svg

@@ -1,3 +1,4 @@
 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="design-iconfont">
   <path d="M5.59074398,7.99468071 L10.7765482,3.15706761 C11.0310714,2.92351699 11.0628812,2.4898047 10.8401827,2.22289641 C10.6174842,1.95600375 10.2038821,1.92263044 9.94937384,2.15618106 L4.2227134,7.49423744 C4.06363453,7.62768377 4,7.7945034 4,7.99468071 C4,8.19485802 4.06363453,8.36167766 4.2227134,8.49512399 L9.94937384,13.8331804 C10.076628,13.933269 10.2357069,14 10.362961,14 C10.5538497,14 10.7129286,13.933269 10.8401827,13.766465 C11.0628812,13.4995567 11.0628812,13.0658444 10.7765482,12.8322938 L5.59074398,7.99468071 Z" transform="matrix(-1 0 0 1 16 0)" fill="#111" fill-rule="nonzero" fill-opacity=".45"/>
 </svg>
+

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

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="design-iconfont">
+  <path d="M5.57741912,4.22516395 L5.62992957,4.27268565 L12.1173554,10.6674121 L18.3660975,4.50841209 C18.7286869,4.14755518 19.3163763,4.13539234 19.6940145,4.48092946 C20.0716526,4.82646658 20.1029729,5.40502055 19.7647846,5.78820429 L19.7170478,5.8399606 L13.467351,11.9980196 L19.7165704,18.1570197 C20.0830707,18.5142313 20.0957438,19.0936811 19.7452019,19.4661279 C19.39466,19.8385746 18.8074704,19.8695419 18.4186079,19.5360899 L18.3660975,19.4880977 L12.1173554,13.3290977 L5.62992957,19.7242947 C5.26690054,20.0822014 4.68168733,20.0930068 4.30531291,19.7487526 C3.92893849,19.4044984 3.8962143,18.8284909 4.23124246,18.444973 L4.27945659,18.3932166 L10.7673598,11.9980196 L4.27993395,5.60376366 C3.91944255,5.24558888 3.90967342,4.67093277 4.25778796,4.30105524 C4.60590251,3.9311777 5.18802364,3.89770023 5.57741912,4.22516395 L5.57741912,4.22516395 Z" transform="translate(-4 -4)" fill="#111" fill-rule="nonzero"/>
+</svg>

+ 0 - 50
src/pages/agent-gen/components/step/index.module.less

@@ -167,53 +167,3 @@
   min-height: 373px;
   overflow: hidden;
 }
-.confirmChatAvatarBgCover{
-  position: absolute;
-  display: flex;
-  flex-direction: column;
-  justify-content: flex-end;
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  z-index: 1;
-  width: 240px;
-  min-height: 373px;
-  box-sizing: border-box;
-  padding: 0 24px 54px;
-  border-radius: 24px;
-  gap: 8px;
-  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50.12%, #D6D6D6 100%);
-}
-.block{
-  background-color: white;
-  border-radius: 8px;
-  height: 30px;
-}
-.block1{
-  .block();
-  width: 135px;
-}
-.block2{
-  .block();
-  align-self: flex-end;
-  width: 123px;
-  background-color: rgba(#317CFA, .5);
-}
-.block3{
-  .block();
-  width: 192px;
-}
-
-.aiTips{
-  position: absolute;
-  z-index: 1;
-  right: 12px;
-  bottom: 12px;
-  font-family: PingFangSC-Medium;
-  font-weight: 500;
-  font-size: 12px;
-  color: rgba(#fff, .5);
-  line-height: 12px;
-  text-shadow: 1px 1px 0 rgba(#000, .3);
-}

+ 13 - 7
src/pages/agent-gen/index.tsx

@@ -6,6 +6,8 @@ import StepStart from './components/step/StepStart'
 import StepPick from "./components/step/StepPick";
 import StepConfirm from "./components/step/StepConfirm";
 import { TAvatarItem } from "@/service/storage";
+import IconCloseBlack16 from '@/components/icon/IconCloseBlack16'
+import Taro from "@tarojs/taro";
 
 type TStep = 'start'|'pick'|'confirm'
 
@@ -18,7 +20,7 @@ export default function Index() {
   const [pickedAvatar, setPickedAvatar] = useState<TAvatarItem>()
   const [avatars, setAvatars] = useState<TAvatarItem[]>([]);
   const [videos, setVideos] = useState<TAvatarItem[]>([]);
-  
+
   const getClassName = useCallback((_state: TStep) => {
     return state === _state ? 'block': 'hidden'
   }, [state]);
@@ -31,9 +33,13 @@ export default function Index() {
     setTaskId(undefined)
     setState('start')
   }
+
+  const renderNavLeft = ()=> {
+    return <View className="flex items-center" onClick={()=> Taro.navigateBack()}><IconCloseBlack16 /></View>
+  }
   return (
     <PageCustom>
-      <NavBarNormal backText="形象照"></NavBarNormal>
+      <NavBarNormal leftColumn={renderNavLeft}>形象照</NavBarNormal>
       <View className="px-16 w-full flex flex-col gap-20">
         {/* 第一步开始 */}
         <View className={getClassName('start')}>
@@ -41,22 +47,22 @@ export default function Index() {
         </View>
         {/* 第二步 生成多个形象提供用户选择 */}
         <View className={getClassName('pick')}>
-        {taskId &&  <StepPick 
+        {taskId &&  <StepPick
             taskId={taskId}
             setAvatars={setAvatars}
             avatars={avatars}
             videos={videos}
             setVideos={setVideos}
             setPickedAvatar={setPickedAvatar}
-            prev={()=> toStartStep()} 
-            next={()=> setState('confirm')} 
+            prev={()=> toStartStep()}
+            next={()=> setState('confirm')}
           />}
         </View>
         {/* 第三步 确认选择作为智能体的形象 */}
         <View className={getClassName('confirm')}>
-        {pickedAvatar && <StepConfirm 
+        {pickedAvatar && <StepConfirm
             pickedAvatar={pickedAvatar}
-            prev={()=> setState('pick')}  
+            prev={()=> setState('pick')}
           />}
         </View>
       </View>

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

@@ -84,7 +84,7 @@
   box-sizing: border-box;
   padding: 0 8px 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;

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

@@ -7,7 +7,6 @@ import CardListItem from "@/components/list/card-list-item";
 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";
 import { useVoiceStore } from "@/store/voiceStore";
 import { useAgentStore, useAgentStoreActions } from "@/store/agentStore";
@@ -58,14 +57,6 @@ export default forwardRef(function Index(props, ref) {
     updateEditAgent({ [field]: value });
   };
 
-  const IconArrowRight = () => {
-    return (
-      <View className="flex items-center">
-        <IconArrow />
-      </View>
-    );
-  };
-
   // 如果有智能体名字,且名字字符串大于 2
   const hasName = (agentEdit?.name && agentEdit.name.length >= 2)
   const defalutPolishPersonality = hasName ? `你是 ${agentEdit?.entName} 的 ${agentEdit?.position ? agentEdit?.position: ''} ${agentEdit?.name}`: ''
@@ -117,7 +108,7 @@ export default forwardRef(function Index(props, ref) {
       <CardList>
         <CardListItem
           className="pl-16 pr-8"
-          rightRenderer={IconArrowRight}
+          arrow
           leftRenderer={IconIdeaColor}
           onClick={() => {
             Taro.navigateTo({ url: '/pages/editor-pages/editor-greeting-questions/index' })
@@ -134,7 +125,7 @@ export default forwardRef(function Index(props, ref) {
       <CardList>
         <CardListItem
           className="pl-16 pr-8"
-          rightRenderer={IconArrowRight}
+          arrow
           leftRenderer={IconVoiceColor}
           onClick={handleEditVoice}
         >

+ 3 - 0
src/pages/chat/components/PersonalCard/index.module.less

@@ -1,3 +1,6 @@
+.container{
+  max-width: 200px;
+}
 .bubbleWrapper {
   top: calc(100% + 12px);
   left: -64px;

+ 2 - 2
src/pages/chat/components/PersonalCard/index.tsx

@@ -56,12 +56,12 @@ export default ({haveBg, agent, onClear}:IProps) => {
   }
   const renderContent = () => {
     return <>
-      <View className='flex items-center' onClick={handleClick}>
+      <View className={`flex items-center`} onClick={handleClick}>
         <View className='flex-1 flex items-center mr-16'>
           <View className="rounded-full overflow-hidden w-36 h-36 shrink-0 mr-8">
             <AvatarMedia source={agent?.avatarLogo || ''} className='w-36 h-36'></AvatarMedia>
           </View>
-          <View className="flex flex-col flex-1 gap-6">
+          <View className="flex flex-col flex-1 gap-6 max-w-[158px]">
             <View className="flex items-center gap-4">
               <View className={`text-14 font-medium leading-14 ${nameStyle}`}>{agent?.name}</View>
               {agent?.isEnt && <View className="text-12 leading-12"><IconCertificateColor/></View>}

+ 2 - 2
src/pages/knowledge/components/AsistantMessage/index.tsx

@@ -2,11 +2,11 @@ import { View, Text } from "@tarojs/components";
 import WeComQRcode from "@/components/WeComQRcode";
 export const WelcomeCard = () => {
   return (
-    <View>
+    <View className="mb-12 w-full">
       <View className="font-medium text-black leading-28 mb-4 text-14">
         Hi~我是你的 AI 小助手!
       </View>
-      <View className="font-normal text-[#414A64] leading-24 text-12 whitespace-normal pb-12">请将资料发送到我的企业微信,我会自动为你解析内容,并同步到这里。</View>
+      <View className="font-normal text-[#414A64] leading-24 text-12 whitespace-normal pb-12">加我为好友,微信直接发我 文档/图片/链接/视频,我会自动解析内容并存入知识库,让你的智能体变得更“懂你”,回答更精准、更专业</View>
       <WeComQRcode />
     </View>
   );

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

@@ -150,7 +150,7 @@ const Index = ({assistantOnly, setTotalCount}: IProps) => {
     >
       <View className="flex flex-col gap-20 pb-32 px-16">
         {/* 欢迎语 */}
-        {(showAsistantGreeting) && <MessageRobotRich data={DEFAULT_AGENT}><WelcomeCard /></MessageRobotRich>}
+        {(showAsistantGreeting) && <MessageRobotRich wFull data={DEFAULT_AGENT}><WelcomeCard /></MessageRobotRich>}
 
         {reversedList.map((group) => {
           // 渲染自己发送的消息

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

@@ -41,9 +41,9 @@ const Index = () => {
       </View>
 
       <Popup title="添加AI小助理的企业微信" setShow={setShowAiAsistant} show={showAiAsistant}>
-        <View className="p-4">
-          <View className="text-12 leading-24 text-[#414A64]">请将资料发送到我的企业微信,我会自动为你解析内容,并同步到这里。</View>
-          <WeComQRcode text="长按二维码添加" />
+        <View className="p-0">
+          <View className="text-14 leading-24 text-[#414A64] mb-24">加我为好友,微信直接发我 文档/图片/链接/视频,我会自动解析内容并存入知识库,让你的智能体变得更“懂你”,回答更精准、更专业</View>
+          <WeComQRcode  />
         </View>
       </Popup>
     </>