Quellcode durchsuchen

feat: 更新tab icon

王晓东 vor 3 Wochen
Ursprung
Commit
90145c7f43
35 geänderte Dateien mit 88 neuen und 58 gelöschten Zeilen
  1. 6 3
      src/components/AgentPage/components/SummaryBar/index.tsx
  2. 1 1
      src/components/KnowledgeList/index.tsx
  3. 1 1
      src/components/LoginPopup/index.tsx
  4. 4 4
      src/components/WemetaRadio/index.module.less
  5. 0 0
      src/components/WemetaRadio/index.tsx
  6. 3 2
      src/components/popup/popup-sheets/index.tsx
  7. 3 2
      src/components/popup/popup/index.tsx
  8. 1 1
      src/components/wemeta-radio-block-item/index.tsx
  9. 1 1
      src/components/wemeta-radio-card-item/index.tsx
  10. BIN
      src/images/tabbar/agent-actived.png
  11. BIN
      src/images/tabbar/agent.png
  12. BIN
      src/images/tabbar/contacts-actived.png
  13. BIN
      src/images/tabbar/contacts.png
  14. BIN
      src/images/tabbar/data-actived.png
  15. BIN
      src/images/tabbar/data.png
  16. BIN
      src/images/tabbar/knowledge-actived.png
  17. BIN
      src/images/tabbar/knowledge.png
  18. BIN
      src/images/tabbar/personal-actived.png
  19. BIN
      src/images/tabbar/personal.png
  20. 1 1
      src/pages/agent-gen/components/step/StepConfirm.tsx
  21. 17 0
      src/pages/agent/components/AgentSetting/components/AgentCard/index.module.less
  22. 18 8
      src/pages/agent/components/AgentSetting/components/AgentCard/index.tsx
  23. 1 1
      src/pages/chat/components/chat-welcome/index.module.less
  24. 2 2
      src/pages/chat/index.tsx
  25. 1 1
      src/pages/contact/index.tsx
  26. 8 8
      src/pages/dashboard/components/VisitorList/index.tsx
  27. 1 1
      src/pages/editor-pages/editor-link-contact/components/MyAgentsScrollList/index.tsx
  28. 1 1
      src/pages/editor-pages/editor-link-contact/components/MyContactsScrollList/index.tsx
  29. 1 1
      src/pages/editor-pages/editor-link-contact/components/MyEntAgentsScrollList/index.tsx
  30. 14 12
      src/pages/index/index.tsx
  31. 1 1
      src/pages/knowledge/index.tsx
  32. 0 2
      src/pages/personal/index.tsx
  33. 0 2
      src/pages/profile/index.tsx
  34. 1 1
      src/pages/voice/components/MyVoiceList/index.tsx
  35. 1 1
      src/pages/voice/components/VoiceList/index.tsx

+ 6 - 3
src/components/AgentPage/components/SummaryBar/index.tsx

@@ -173,15 +173,18 @@ export default ({agent, isVisitor}: IProps) => {
           content={[
             {item: <View className="text-12 font-normal text-gray-45">删除后所有数据将被清空,且无法恢复</View>}, 
             {item:'删除', type: 'warn', onClick: ()=> {
-              
+              setShowPopup(false);
+              setTimeout(()=> {
+                Taro.hideTabBar();
+              },300)
               showModal({
                 content: <>确认删除该智能体?</>,
                 onConfirm() {
-                  setShowPopup(false);
                   confirmDelete()
+                  Taro.showTabBar();
                 },
                 onCancel() {
-                  setShowPopup(false);
+                  Taro.showTabBar();
                 },
               })
               

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

@@ -3,7 +3,7 @@ import { ScrollView, View, Image } from "@tarojs/components";
 import FigureList from "@/components/list/FigureList";
 import FigureListItem from "@/components/list/FigureListItem";
 import { useEffect } from "react";
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 
 import IconFIleLink from "@/components/icon/IconFileLink"
 

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

@@ -3,7 +3,7 @@ import { View,Text, Image, Checkbox, Button } from "@tarojs/components";
 import PageCustom from "@/components/page-custom/index";
 import LogoImage from '@/images/logo.png'
 import { useLogin } from '@/xiaolanbenlib/hooks/data/useAuth'
-import WemetaRadio from "@/components/wemeta-radio";
+import WemetaRadio from "@/components/WemetaRadio";
 
 import { useEffect, useState } from "react";
 

+ 4 - 4
src/components/wemeta-radio/index.module.less → src/components/WemetaRadio/index.module.less

@@ -2,16 +2,16 @@
   display: flex;
   align-items: center;
   justify-content: center;
-  width: 20px;
-  height: 20px;
+  width: 16px;
+  height: 16px;
   border: 1px solid rgba(#000, .45);
   border-radius: 100%;
   transition: all .3s;
 }
 .inner{
   opacity: 1;
-  width: 8px;
-  height: 8px;
+  width: 6px;
+  height: 6px;
   border-radius: 100%;
   background: var(--color-bg-primary);
 }

+ 0 - 0
src/components/wemeta-radio/index.tsx → src/components/WemetaRadio/index.tsx


+ 3 - 2
src/components/popup/popup-sheets/index.tsx

@@ -18,16 +18,17 @@ export default ({ content, show, setShow }: Props) => {
     setSlideUp(false);
     setTimeout(() => {
       setShow(false);
+      Taro.showTabBar();
     }, 100);
-    Taro.showTabBar();
+    
   };
 
   useEffect(() => {
     if(show){
+      Taro.hideTabBar();
       setTimeout(() => {
         setSlideUp(show);
       }, 100);
-      Taro.hideTabBar();
     }else{
       Taro.showTabBar();
     }

+ 3 - 2
src/components/popup/popup/index.tsx

@@ -15,9 +15,10 @@ export default ({title = '', showCloseButton = true, show, setShow, children}: I
   const handleClose = (b: boolean) => {
     setSlideUp(false)
     setTimeout(()=> {
-      setShow(b)  
+      setShow(b)
+      Taro.showTabBar()
     }, 100)
-    Taro.showTabBar()
+    
   }
 
   useEffect(()=> {

+ 1 - 1
src/components/wemeta-radio-block-item/index.tsx

@@ -1,5 +1,5 @@
 import {View} from '@tarojs/components'
-import WemetaRadio from '@/components/wemeta-radio/index'
+import WemetaRadio from '@/components/WemetaRadio/index'
 import style from './index.module.less'
 
 

+ 1 - 1
src/components/wemeta-radio-card-item/index.tsx

@@ -1,5 +1,5 @@
 import {View} from '@tarojs/components'
-import WemetaRadio from '@/components/wemeta-radio/index'
+import WemetaRadio from '@/components/WemetaRadio/index'
 import style from './index.module.less'
 
 

BIN
src/images/tabbar/agent-actived.png


BIN
src/images/tabbar/agent.png


BIN
src/images/tabbar/contacts-actived.png


BIN
src/images/tabbar/contacts.png


BIN
src/images/tabbar/data-actived.png


BIN
src/images/tabbar/data.png


BIN
src/images/tabbar/knowledge-actived.png


BIN
src/images/tabbar/knowledge.png


BIN
src/images/tabbar/personal-actived.png


BIN
src/images/tabbar/personal.png


+ 1 - 1
src/pages/agent-gen/components/step/StepConfirm.tsx

@@ -1,7 +1,7 @@
 import { View, Image } from "@tarojs/components";
 import React, { useState } from "react";
 import style from "./index.module.less";
-import WemetaRadio from '@/components/wemeta-radio'
+import WemetaRadio from '@/components/WemetaRadio'
 import Taro from "@tarojs/taro";
 import { TAvatarItem } from "@/service/storage";
 import { editAgentAvatar } from "@/service/agent";

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

@@ -36,4 +36,21 @@
   line-height: 22px;
   color: rgba(#000, .45);
    
+}
+
+.changeButton{
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  z-index: 1;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 40px;
+  font-weight: 500;
+  font-size: 12px;
+  color: rgba(#000, .85); 
+  background-color: rgba(#FFF, .7);
+  backdrop-filter: blur(7px) brightness(0.94) contrast(146%) grayscale(3%) opacity(81%);
 }

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

@@ -3,11 +3,15 @@ import style from "./index.module.less";
 import IconPlusBig from "@/components/icon/icon-plus-big";
 import Taro from "@tarojs/taro";
 import { uploadAndNavToGenNewAvatar } from "@/utils/avatar";
+import WemetaRadio from '@/components/WemetaRadio'
 import { useAgentStore } from "@/store/agentStore";
 
 export default () => {
   const {agent} = useAgentStore()
-  const handleChange = () => {};
+
+  const handleChange = (checked: boolean)=> {
+
+  }
   const handleClick = () => {
     if (agent?.avatarUrl) {
       return;
@@ -29,7 +33,15 @@ export default () => {
     }
 
     return (
-      <Image src={agent.avatarUrl} mode="widthFix" className={style.card} />
+      <View className="relative">
+        <Image src={agent.avatarUrl} mode="widthFix" className={style.card} />
+        <View className={style.changeButton} onClick={()=> {
+          Taro.navigateTo({url: '/pages/agent-avatars/index'})
+        }}>
+          更换形象
+        </View>
+      </View>
+      
     );
   };
 
@@ -38,12 +50,10 @@ export default () => {
       <View className={style.card} onClick={handleClick}>
         {renderContent()}
       </View>
-      <View className="w-full flex-center pt-16" onClick={handleChange}>
-        <View className="flex-center w-80 h-28 rounded-20 bg-white text-12 text-gray-85 font-medium leading-20 text-center" onClick={()=> {
-          Taro.navigateTo({url: '/pages/agent-avatars/index'})
-        }}>
-          更换形象
-        </View>
+      <View className="w-full flex-center pt-24 gap-6" onClick={()=> handleChange(!!agent?.enabledChatBg)}>
+        {/* ={agent?.enabledChatBg} */}
+        <WemetaRadio checkbox checked></WemetaRadio>
+        <View className="font-medium text-14 text-black">启用聊天背景</View>
       </View>
     </View>
   );

+ 1 - 1
src/pages/chat/components/chat-welcome/index.module.less

@@ -3,6 +3,6 @@
   height: 448px;
   border-top-left-radius: 24px;
   border-top-right-radius: 24px;
-  background: rgba(#FFF, .45);
+  background: linear-gradient( rgba(#fff, .5) 1%, rgba(#fff, .1) 100%);
   backdrop-filter: blur(38px);
 }

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

@@ -242,7 +242,7 @@ export default function Index() {
             bottom: `${keyboardHeight}px`,
           }}
         >
-          <View
+          {/* <View
             onClick={switchDeepThink}
             className={
               deepThink === EAI_MODEL.DeepseekReasoner
@@ -251,7 +251,7 @@ export default function Index() {
             }
           >
             深度思考(R1)
-          </View>
+          </View> */}
           {agent && (
             <InputBar
               aiModel={deepThink}

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

@@ -100,7 +100,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal leftColumn={() => <Text className="text-16 font-medium">联系人</Text>}></NavBarNormal>
+      <NavBarNormal scrollFadeIn leftColumn={() => <Text className="text-16 font-medium">联系人</Text>}></NavBarNormal>
       <View className="flex flex-col w-full">
         <View className="px-16 pb-12">
           <SearchBar

+ 8 - 8
src/pages/dashboard/components/VisitorList/index.tsx

@@ -1,6 +1,6 @@
 import { View, Text } from "@tarojs/components";
 import Taro, { useReachBottom } from "@tarojs/taro";
-import VisitorCard from '../VisitorCard/index';
+import VisitorCard from "../VisitorCard/index";
 import { useEffect, useState } from "react";
 
 import { TVisitorAgent } from "@/types/visitor";
@@ -23,7 +23,7 @@ export default ({ agentId }: IProps) => {
     nextId?: string;
     totalCount?: number;
   }>({
-    url: "/blue-aiagent/api/v1/my/contacts",
+    url: `getVisitorList${agentId}`,
     fetcher,
     params: [agentId],
   });
@@ -38,13 +38,13 @@ export default ({ agentId }: IProps) => {
     }
   }, [data]);
 
-  useEffect(()=> {
-    setList([])
-    refetch()
-  }, [agentId])
+  useEffect(() => {
+    setList([]);
+    refetch();
+  }, [agentId]);
 
-  if(!list.length){
-    <View></View>
+  if (!list.length) {
+    <View></View>;
   }
 
   return (

+ 1 - 1
src/pages/editor-pages/editor-link-contact/components/MyAgentsScrollList/index.tsx

@@ -6,7 +6,7 @@ import { getContactList } from "@/service/contact";
 import { useLoadMore } from "@/utils/loadMore";
 import { TContactItem } from "@/types/contact";
 import ContactCard from "@/components/contact-card/index";
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 import { useAgentStore } from "@/store/agentStore";
 import { TAgent } from "@/types/agent";
 

+ 1 - 1
src/pages/editor-pages/editor-link-contact/components/MyContactsScrollList/index.tsx

@@ -6,7 +6,7 @@ import { getContactList } from "@/service/contact";
 import { useLoadMore } from "@/utils/loadMore";
 import { TContactItem } from "@/types/contact";
 import ContactCard from "@/components/contact-card/index";
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 
 export interface IProps {
   selected: any[]

+ 1 - 1
src/pages/editor-pages/editor-link-contact/components/MyEntAgentsScrollList/index.tsx

@@ -6,7 +6,7 @@ import { getContactList } from "@/service/contact";
 import { useLoadMore } from "@/utils/loadMore";
 import { TContactItem } from "@/types/contact";
 import ContactCard from "@/components/contact-card/index";
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 import { useAgentStore } from "@/store/agentStore";
 import { TAgent } from "@/types/agent";
 

+ 14 - 12
src/pages/index/index.tsx

@@ -1,25 +1,27 @@
-import DefaultAgent from '@/components/AgentPage'
-import InitView from './components/InitView'
+import DefaultAgent from "@/components/AgentPage";
+import InitView from "./components/InitView";
 import { useDidShow } from "@tarojs/taro";
 import { useAgentStore } from "@/store/agentStore";
 import { useIsLogin } from "@/xiaolanbenlib/hooks/data/useAuth";
 
 export default function Index() {
-  const isLogin = useIsLogin()
-  const { fetchAgents, defaultAgent } = useAgentStore()
+  const isLogin = useIsLogin();
+  
+  const { fetchAgents, defaultAgent } = useAgentStore();
 
-  useDidShow(()=> {
+  useDidShow(() => {
     // 如果没有登录过,则显示默认欢迎页
     // 如果有登录状态,主动获取智能体列表
-    if(isLogin){
-      fetchAgents()
+    if (isLogin) {
+      fetchAgents();
     }
-  })
-  if(!defaultAgent){
-    return <InitView></InitView>
+  });
+
+  if (!defaultAgent) {
+    return <InitView></InitView>;
   }
 
-  if(defaultAgent?.agentId){
-    return <DefaultAgent agentId={defaultAgent.agentId}></DefaultAgent>
+  if (defaultAgent?.agentId) {
+    return <DefaultAgent agentId={defaultAgent.agentId}></DefaultAgent>;
   }
 }

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

@@ -38,7 +38,7 @@ export default function Index() {
   ];
   return (
     <PageCustom>
-      <NavBarNormal leftColumn={() => <Text className="text-16 font-medium">知识库</Text>}></NavBarNormal>
+      <NavBarNormal scrollFadeIn leftColumn={() => <Text className="text-16 font-medium">知识库</Text>}></NavBarNormal>
       <View className="w-full">
         <View className={style.container}>
           <WemetaTabs current="1" list={tabList} className="px-16"></WemetaTabs>

+ 0 - 2
src/pages/personal/index.tsx

@@ -112,7 +112,6 @@ export default function Index() {
           
           <CardListItem
             className="pl-16"
-            underline
             arrow
             leftRenderer={() => (
               <Image src={IconAgreement} className="w-28 h-28" mode="widthFix" />
@@ -141,7 +140,6 @@ export default function Index() {
           </CardListItem>
           <CardListItem
             className="pl-16"
-            underline
             arrow
             leftRenderer={() => (
               <Image src={IconDesktop} className="w-28 h-28" mode="widthFix" />

+ 0 - 2
src/pages/profile/index.tsx

@@ -100,8 +100,6 @@ export default function Profile() {
     <PageCustom styleBg={bgImageStyle}>
       <View className="w-full">
         <NavBarNormal
-          scrollFadeIn
-          showBgColor
           leftColumn={renderNavBarLeft}
         ></NavBarNormal>
         <View className="blurBg">

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

@@ -1,7 +1,7 @@
 import EmptyData from "@/components/empty-data";
 import CardListItem from "@/components/list/card-list-item/index";
 
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 import IconWave from "@/images/icon-wave-20.png";
 
 import { Image, View } from "@tarojs/components";

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

@@ -1,4 +1,4 @@
-import WemetaRadio from "@/components/wemeta-radio/index";
+import WemetaRadio from "@/components/WemetaRadio/index";
 import { Image, View } from "@tarojs/components";
 import { useEffect, useState } from "react";
 import CardListItem from "@/components/list/card-list-item";