Преглед изворни кода

feat: 形象固定不滚动

王晓东 пре 4 недеља
родитељ
комит
a5644ac88f

+ 27 - 3
README.md

@@ -72,15 +72,39 @@ https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html
   /pages/profile/index?agentId=xxxx&shareKey=xxx
 
 
+# 需求文档
+
+https://bluebook.feishu.cn/docx/B1Y3dwlfuodpiNxK4ZEcuyEWnHg
+znt123456
+
+# 设计稿
+
+1、https://www.figma.com/design/OVKD6CEaeRzaF50RN1rg5r/%E5%B0%8F%E8%93%9D%E6%9C%AC?node-id=288-5582&t=qDBuZOlweCsd4l8v-0
+
+2、https://codesign.qq.com/app/design/569987133192940/board
+
+
 
 
 # 接口文档
 
-后台接口文档 https://bluebook.feishu.cn/docx/Ckh0dLOBzo0rjyxrUkrc0ffdn2c
+https://xiaolvye.xiaolanben.com/swagger-ui.html#!/bot3284222825/chatCompletionsUsingPOST
 
-开发进度在线文档 https://www.kdocs.cn/l/cgHRgaGkRuJu
+用户名:aiagent 
+密码:xlb4xiaolvye2025
+
+
+# 开发进度在线文档
+
+https://www.kdocs.cn/l/cgHRgaGkRuJu
 
 
 # bug 文档
 
-https://bluebook.feishu.cn/sheets/BW1dsW5NLhQKj7t3fnjc0xvsnpd
+https://bluebook.feishu.cn/sheets/BW1dsW5NLhQKj7t3fnjc0xvsnpd
+
+
+# 服务端接口文档  及 小程序 登录签名的脚手架 demo
+https://bluebook.feishu.cn/docx/Ckh0dLOBzo0rjyxrUkrc0ffdn2c   
+
+密码:1#329L42

+ 11 - 0
src/app.less

@@ -383,4 +383,15 @@
     text-align: center;
     color:rgba(#000, .25);
   }
+}
+
+
+.blurBg {
+  margin-top: 220px;
+  width: 100%;
+  box-sizing: border-box;
+  border-top-left-radius: 24px;
+  border-top-right-radius: 24px;
+  background: rgba(#FFF, .45);
+  backdrop-filter: blur(38px);
 }

+ 4 - 18
src/components/AgentPage/components/SummaryBar/index.module.less

@@ -1,27 +1,13 @@
-.topBg{
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  z-index: 1;
-  height: 652px;
-  width: 100%;
-  background-repeat: no-repeat;
-  background-position: center center;
-  background-size: 100%;
-}
 .topBarContainer{
-  padding-top: 276px;
+  width: 100%
 }
 .topBar{
   position: relative;
   z-index: 2;
   padding: 20px 16px 0;
-  height: 370px;
-  border-top-left-radius: 24px;
-  border-top-right-radius: 24px;
-  background: rgba(#FFF, .45);
-  backdrop-filter: blur(38px);
+  // min-height: 370px;
+  // background: rgba(#FFF, .45);
+  // backdrop-filter: blur(38px);
   
 }
 .boxButton{

+ 1 - 9
src/components/AgentPage/components/SummaryBar/index.tsx

@@ -57,18 +57,10 @@ export default ({agent, isVisitor}: IProps) => {
   const enableQrcode = !isVisitor || !!agent?.qrCodeUrl?.length
 
 
-  // 自定义背景样式
-  const bgImageStyle = {
-    marginTop: -headerHeight,
-    // background: `linear-gradient(rgba(242, 244, 245, 0) 0%, rgba(242, 244, 245, .8) 80% , rgba(242, 244, 245,1) 100%), url(${customBgImg})`,
-    // backgroundImage: `url(https://cdn.wehome.cn/cmn/png/53/META-H8UKWHWU-2JNUAG2BARJF55VHU9QS3-YBQGHDAM-IW.png)`,
-    backgroundImage: `url(${agent?.avatarUrl})`,
-  };
 
 
   return (
-    <View className="relative">
-      <View className={style.topBg} style={bgImageStyle}></View>
+    <View className="relative w-full">
       <View className={style.topBarContainer}>
         <View className={style.topBar}>
           <View className="px-8 mb-16">

+ 7 - 74
src/components/AgentPage/index.module.less

@@ -1,76 +1,9 @@
-.homeButtonContainer{
-  display: flex;
-  flex-direction: column;
+.blurBg {
+  margin-top: 220px;
   width: 100%;
   box-sizing: border-box;
-  padding: 36px 56px;
-  justify-content: center;
-  font-weight: 500;
-}
-.homeButton{
-  margin-bottom: 48px;
-  display: flex;
-  width: 100%;
-  padding: 6px 0;
-  gap: 16px;
-  justify-content: center;
-  align-items: center;
-  border-radius: 50px;
-  background-color: rgba(white, .45);
-}
-
-.backButton{
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-left: 4px;
-  width: 87px;
-  height: 32px;
-  flex-shrink: 0;
-  border-radius: 25px;
-  border: 1px solid rgba(151, 151, 151, 0.20);
-  background: rgba(255, 255, 255, 0.60);
-}
-.backButtonText{
-  color: #1A1A1A;
-  text-align: center;
-  font-size: 14px;
-  font-style: normal;
-  font-weight: 500;
-  line-height: 22px;
-}
-
-.mainButtonContainer{
-  padding: 0 82px;
-  display: flex;
-  width: 100%;
-  box-sizing: border-box;
-  justify-content: space-between;
-  align-items: center;
-}
-.decorateLine{
-  width: 20px;
-  height: 1px;
-  background-color: rgba(black, .1);
-}
-.logo{
-  width: 16px;
-  height: 16px;
-  border-radius: 4px;
-  background-color: white;
-}
-.homeButtonText{
-  font-size: 11px;
-  line-height: 20px;
-  color: rgba(black, .55);
-}
-.title{
-  position: absolute;
-  top: 50%;
-  left: 50%;
-  translate: -50% -50%;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  max-width: 180px;
-}
+  border-top-left-radius: 24px;
+  border-top-right-radius: 24px;
+  background: rgba(#FFF, .45);
+  backdrop-filter: blur(38px);
+}

+ 15 - 7
src/components/AgentPage/index.tsx

@@ -1,3 +1,4 @@
+import PageCustom from "@/components/page-custom/index";
 import NavBarNormal from "@/components/nav-bar-normal";
 
 import { View } from "@tarojs/components";
@@ -9,6 +10,8 @@ import { useComponentStore } from "@/store/componentStore";
 import ComponentList from "@/components/component-list";
 import { useUserStore } from "@/store/userStore";
 
+import style from './index.module.less'
+
 
 interface IProps {
   agentId: string;
@@ -37,14 +40,19 @@ export default function Index({ agentId }: IProps) {
     fetchMyEntList()
   }, [])
   
-
+  // 自定义背景样式
+  const bgImageStyle = {
+    backgroundImage: `url(${agent?.avatarUrl})`,
+  };
   return (
-    <View className="w-full">
-      <NavBarNormal scrollFadeIn showBgColor leftColumn={Logo}></NavBarNormal>
-      {agent && <SummaryBar isVisitor={false} agent={agent}></SummaryBar>}
-      <View className="flex flex-col w-full p-16 gap-12">
-        <ComponentList components={components}></ComponentList>
+    <PageCustom styleBg={bgImageStyle}>
+      <NavBarNormal leftColumn={Logo}></NavBarNormal>
+      <View className={style.blurBg}>
+        {(!!agent) ? <SummaryBar isVisitor={false} agent={agent}></SummaryBar> : <></>}
+        <View className={`flex flex-col gap-12 w-full p-16`}>
+          <ComponentList components={components}></ComponentList>
+        </View>
       </View>
-    </View>
+    </PageCustom>
   );
 }

+ 3 - 2
src/components/page-custom/index.tsx

@@ -8,18 +8,19 @@ interface Props {
   bgColor?: string;
   isflex?: boolean; // 有横向滚动的scroll-view 容器不能包裹在 flex comlumn 布局中
   style?: React.CSSProperties;
+  styleBg?: React.CSSProperties;
   paddingTop?: number;
   fullPage?: boolean;
 }
 
-const Index: React.FC<Props> = ({ children, isflex = true, fullPage = false,  paddingTop, style }) => {
+const Index: React.FC<Props> = ({ children, isflex = true, fullPage = false,  paddingTop, style, styleBg }) => {
   const headerHeight = useAppStore((state) => state.headerHeight);
   const bottomSafeHeight = useAppStore((state) => state.bottomSafeHeight);
   const flexStyle = isflex ? "flex flex-col items-center" : "";
   const offsetTop = paddingTop ?? headerHeight;
   const pageHeight = fullPage ? `calc(100vh - ${bottomSafeHeight}px)` : 'auto'
   return (
-    <PageWrapper style={style}>
+    <PageWrapper style={style} styleBg={styleBg}>
       <View
           className={`${flexStyle} h-full w-full`}
           style={{ paddingTop: offsetTop, height: pageHeight}}

+ 2 - 11
src/components/page-wrapper/index.module.less

@@ -1,6 +1,6 @@
 .bg{
   position: fixed;
-  z-index: -3;
+  z-index: -2;
   left: 0;
   top: 0;
   right: 0;
@@ -9,15 +9,6 @@
   background-repeat: no-repeat!important;
   background-color: #f6f6f6!important;
 }
-.fillBgRest{
-  position: fixed;
-  z-index: -3;
-  left: 0;
-  top: 100vh;
-  right: 0;
-  bottom: 0;
-  background-color: var(--color-bg-gray);
-}
 
 .bgVerticalGradient{
   position: absolute;
@@ -25,7 +16,7 @@
   top: 0;
   right: 0;
   bottom: 0;
-  z-index: -2;
+  z-index: -3;
   width: 100%;
   height: 652px;
 }

+ 4 - 4
src/components/page-wrapper/index.tsx

@@ -16,12 +16,12 @@ const Index: React.FC<Props> = ({ children, styleBg, style }) => {
   // const desktopPopupVisible = useAppStore((state)=> state.desktopPopupTips)
   //  盖在背景上面的是视口高度的 渐变色
   return (
-    <View className={`relative font-normal text-14 leading-22`}>
-      {/* bg 背景图 */}
-      <View className={pageStyle.bg}></View>
+    <View className={`relative font-normal text-14 leading-22 w-full`}>
       {/* cover 背景图覆盖从上至下渐变 */}
       <View className={`global-linear-gradient-bg ${pageStyle.bgVerticalGradient}`}></View>
-      <View className="relative z-0 h-full" style={style}>{children}</View>
+      {/* bg 背景图 */}
+      <View className={pageStyle.bg} style={styleBg}></View>
+      <View className="relative z-0 h-full w-full" style={style}>{children}</View>
       <GlobalModal></GlobalModal>
     </View>
   );

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

@@ -1,6 +1,7 @@
 import { View } from "@tarojs/components";
 import style from "./index.module.less";
 import { useEffect, useState } from "react";
+import Taro from "@tarojs/taro";
 
 type Ttype = "primary" | "warn"
 interface Props {
@@ -18,12 +19,17 @@ export default ({ content, show, setShow }: Props) => {
     setTimeout(() => {
       setShow(false);
     }, 100);
+    Taro.showTabBar();
   };
 
   useEffect(() => {
-    setTimeout(() => {
-      setSlideUp(show);
-    }, 100);
+    if(show){
+      setTimeout(() => {
+        setSlideUp(show);
+      }, 100);
+      Taro.hideTabBar();
+    }
+    
   }, [show]);
 
   const getTypeClassName = (type?: Ttype) => {

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

@@ -2,6 +2,7 @@ import { View, Image } from "@tarojs/components"
 import style from './index.module.less'
 import closeIcon from '@/images/icon-close-8.png';
 import { useEffect, useState } from "react";
+import Taro from "@tarojs/taro";
 interface Props {
   title?: string
   setShow: (show: boolean)=>void
@@ -16,6 +17,7 @@ export default ({title = '', showCloseButton = true, show, setShow, children}:Pr
     setTimeout(()=> {
       setShow(b)  
     }, 100)
+    Taro.showTabBar()
   }
 
   useEffect(()=> {
@@ -23,6 +25,7 @@ export default ({title = '', showCloseButton = true, show, setShow, children}:Pr
       setTimeout(()=> {
         setSlideUp(true)
       }, 100)  
+      Taro.hideTabBar();
     }
     
   }, [show])

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

@@ -199,7 +199,8 @@ export default function Index() {
   return (
     <PageCustom fullPage style={{ overflow: "hidden" }}>
       <NavBarNormal leftColumn={renderNavLeft}></NavBarNormal>
-      {(!!agent?.enabledChatBg) ? <View className={style.topBg} style={bgImageStyle}></View> : <></>}
+      {/* {(!!agent?.enabledChatBg) ? <View className={style.topBg} style={bgImageStyle}></View> : <></>} */}
+      {<View className={style.topBg} style={bgImageStyle}></View>}
       <View
         className="flex flex-col w-full h-screen relative z-10"
         style={{ marginTop: `${marginTopOffset}px` }}

+ 1 - 0
src/pages/dashboard-visited-detail/index.tsx

@@ -76,6 +76,7 @@ export default () => {
                       {message?.msgTime}
                     </View>
                     <ChatMessage
+                      message={message}
                       key={message.msgUk}
                       role={message.role}
                       text={message.content}

+ 1 - 1
src/pages/dashboard-visited-detail/visitedDetail.ts

@@ -13,7 +13,7 @@ export const useVisitorMessages = (visitorId: string|number) => {
     nextId?: string,
     totalCount?: number
   }>({
-    url: '/blue-aiagent/api/v1/my/contacts',
+    url: `api/v1/my/visitor/messages/${visitorId}`,
     fetcher,
   });
 

+ 153 - 0
src/pages/knowledge/components/CorrectionList/index.tsx

@@ -0,0 +1,153 @@
+import { View } from "@tarojs/components";
+import RoundedLabel from "../rounded-label";
+import IconFilterFeeds from "@/components/icon/IconFilterFeeds";
+import IconFilterBatch from "@/components/icon/IconFilterBatch";
+import IconFilterList from "@/components/icon/IconFilterList";
+
+
+
+import Popup from "@/components/popup/popup";
+import WemetaSwitch from "@/components/wemeta-switch";
+import { useState } from "react";
+
+import ViewStyleListCorrection from '../view-style/ViewStyleListCorrection'
+
+import  PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
+import IconArrowDownRounded from '@/components/icon/IconArrowDownRounded';
+import { useUserStore } from "@/store/userStore";
+import { TEntItem } from "@/types/user";
+
+type TListStyle = "card" | "list";
+
+const Index = () => {
+  const ents = useUserStore(state => state.entList)
+  const [checked, setChecked] = useState(false);
+  const [showPopup, setShowPopup] = useState(false);
+  const [listStyle, setListStyle] = useState<TListStyle>("card");
+  const [current, setCurrent] = useState<TEntItem|string>('')
+
+  const handleListStyleChange = (listStyle: TListStyle) => {
+    setListStyle(listStyle);
+  };
+
+  
+
+  // 当前选中的值
+  const options = ['个人知识库', ...ents.map( item => item.entName)]
+
+  // 如果没有当前企业,则默认第一个
+  if(!current){
+    setCurrent(options[0])
+  }
+  // 是否显示选择器
+  const [showPicker, setShowPicker] = useState(false)
+
+  // 当前选中的值
+  const [selected, setSelected] = useState(options[0])
+
+  const handleChange = (value: string) => {
+    setSelected(value)
+    const ent = ents.find(item=> item.entName === value)
+    if(ent){
+      setCurrent(ent)
+    }else{
+      setCurrent(value)
+    }
+  }
+
+  
+  const renderContent = () => {
+    const entId = typeof current === 'string' ? undefined : current.entId
+    if(listStyle === 'card'){ 
+      return <ViewStyleListCorrection entId={entId} viewStyle="card"/>
+    }
+    return <ViewStyleListCorrection entId={entId} viewStyle="list"/>
+  }
+
+
+  return (
+    <>
+      <View className="pt-12 h-full">
+        <View className="rounded-container-header"></View>
+        <View className="px-16 pb-20">
+          <View className="pb-8">
+            <PickerSingleColumn options={options} selected={selected} onChange={handleChange} showPicker={showPicker} setShowPicker={setShowPicker}>
+              <View 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">{selected}</View>
+                <View className="flex-center">
+                  <IconArrowDownRounded/>
+                </View>
+              </View>
+            </PickerSingleColumn>
+          </View>
+          <View className="flex items-center">
+            
+            <View className="flex-1 text-12 leading-20 text-gray-45">
+              {/* 共 {listStyle === 'chat' ? total : listTotalCount} 个文件 */}
+            </View>
+            <View className="flex items-center">
+              {listStyle === "card" ? (
+                <RoundedLabel
+                  onClick={() => setShowPopup(true)}
+                  text="信息流"
+                  icon={IconFilterFeeds}
+                ></RoundedLabel>
+              ) : (
+                <>
+                  <RoundedLabel
+                    text="列表"
+                    onClick={() => {
+                      setShowPopup(true)
+                    }}
+                    icon={IconFilterList}
+                  ></RoundedLabel>
+                </>
+              )}
+            </View>
+          </View>
+        </View>
+        <View className="px-16 h-full">
+          {renderContent()}
+        </View>
+      </View>
+      
+      <Popup setShow={setShowPopup} show={showPopup} title="展示样式">
+        <View
+          className={`rounded-card ${
+            listStyle === "card" ? "rounded-card-actived" : ""
+          }`}
+          onClick={() => {
+            handleListStyleChange("card");
+          }}
+        >
+          <View className="border-bottom1-gray mb-12">
+            <View className="mb-8 text-14 font-medium leading-22">
+              对话信息流
+            </View>
+          </View>
+          <View className="flex items-center">
+            <WemetaSwitch
+              checked={checked}
+              onChange={(checked) => setChecked(checked)}
+            ></WemetaSwitch>
+          </View>
+        </View>
+        <View
+          className={`rounded-card ${
+            listStyle === "list" ? "rounded-card-actived" : ""
+          }`}
+          onClick={() => {
+            handleListStyleChange("list");
+          }}
+        >
+          <View className="mb-8 text-14 font-medium leading-22">列表形式</View>
+          <View className="mb-12 text-12 leading-20 text-gray-45">
+            将知识点以简洁列表呈现,清晰快速地提供信息。
+          </View>
+        </View>
+      </Popup>
+    </>
+  );
+};
+
+export default Index;

+ 149 - 0
src/pages/knowledge/components/view-style/ViewStyleListCorrection.tsx

@@ -0,0 +1,149 @@
+import { ScrollView, View, Image, Text } from "@tarojs/components";
+
+import Taro, { useDidShow } from "@tarojs/taro";
+import { useEffect, useState } from "react";
+
+import { TCorrectionItem } from "@/types/correction";
+import { getCorrectionList } from "@/service/correction";
+import { useLoadMore } from "@/utils/loadMore";
+
+import IconA from "@/components/icon/IconA";
+import IconQ from "@/components/icon/IconQ";
+import CardEditable from "@/components/card/card-editable/index";
+
+import { useModalStore } from "@/store/modalStore";
+
+export interface Iprops {
+  viewStyle: 'list'|'card'
+  entId?: number|string
+}
+const Index = ({viewStyle, entId}:Iprops) => {
+  
+  const [list, setList] = useState<TCorrectionItem[]>([]);
+  const { showModal } = useModalStore();
+
+  const fetcher = async ([_url, nextId, page, pageSize, _entId]) => {
+    const res = await getCorrectionList({ startId: nextId, pageSize, entId: _entId});
+    return res.data;
+  };
+  
+  const { data, loadMore, refetch } = useLoadMore<TCorrectionItem[]>({
+    url: `api/v1/my/correction/list${entId}`,
+    fetcher,
+    params: [entId]
+  });  
+
+  const onScrollToUpper = async () => {
+    console.log('toUpper')
+    loadMore()
+  }
+  useDidShow(()=> {
+    // loadMore()
+    refetch()
+    console.log(333)
+  })
+  useEffect(() => {
+    if (data?.data) {
+      setList([...list, ...data.data]);
+    }
+  }, [data]);
+
+
+  const handleEdit = (qaId: number | string) => {
+    // Taro.navigateTo({
+    //   url: `/pages/knowledge-item-editor/index?knowledgeId=${knowledgeId}&qaId=${qaId}&knowledgeTitle=${detail?.title}`,
+    // });
+  };
+  
+  // 删除问答项
+  const handleDeleteItem = async (qaId: number | string) => {
+    
+    showModal({
+      content: "确定删除该问答项吗?",
+      onConfirm: async () => {
+        // const { status } = await deleteKnowledgeQa(detail.knowledgeId, qaId);
+        // if (isSuccess(status)) {
+        //   Taro.showToast({ title: "删除成功", icon: "success" });
+        //   getDetail(detail.knowledgeId);
+        // }
+      },
+    });
+  };
+
+
+  const createCardOptions = (item: TCorrectionItem) => {
+    return [
+      <View onClick={() => handleDeleteItem(item.id)}>
+        删除
+      </View>,
+      <View onClick={() => handleEdit(item.id)}>编辑</View>,
+    ]
+  }
+  return (
+    <ScrollView
+      scrollY
+      onScrollToUpper={onScrollToUpper}
+      style={{
+        flex: 1,
+        height: "100%", // 高度自适应
+      }}
+    >
+    {list.map((item) => {
+      return (
+        <View className="flex flex-col gap-16 px-16 mb-16">
+          <CardEditable
+            buttons={createCardOptions(item)}
+          >
+            <View className="flex items-start mb-8 gap-8">
+              <View className="flex-center h-28">
+                <IconQ />
+              </View>
+              <View className="flex-1 font-medium text-14 leading-28">
+                {item.questions[0]}
+              </View>
+            </View>
+
+            <View className="flex items-start gap-8">
+              <View className="flex-center  h-28">
+                <IconA />
+              </View>
+              <View className="flex-1 text-12 leading-20 text-gray-45 truncate">
+                <View className="truncate">{item.answer}</View>
+
+                {!!item.links.length && (
+                  <View className="pb-12">
+                    {item.links.map((link) => {
+                      return (
+                        <View>
+                          查看链接 <Text>{link}</Text>
+                        </View>
+                      );
+                    })}
+                  </View>
+                )}
+                {!!item.pics.length && (
+                  <View className="pb-12">
+                    {item.pics.map((pic) => {
+                      return (
+                        <View>
+                          <Image
+                            src={pic}
+                            mode="widthFix"
+                            className="w-full"
+                          ></Image>
+                        </View>
+                      );
+                    })}
+                  </View>
+                )}
+              </View>
+            </View>
+          </CardEditable>
+        </View>
+      );
+    })}
+    </ScrollView>
+  );
+};
+
+export default Index;

+ 10 - 0
src/pages/knowledge/index.tsx

@@ -9,6 +9,7 @@ import NavBarNormal from "@/components/nav-bar-normal/index";
 import WemetaTabs from "@/components/wemeta-tabs/index";
 import PersonalTab from './components/personal-tab'
 import CompanyTab from './components/CompanyTab'
+import CorrectionList from './components/CorrectionList'
 import style from "./index.module.less";
 import Taro, { useDidShow } from "@tarojs/taro";
 import { useAgentStore } from "@/store/agentStore";
@@ -19,6 +20,8 @@ export default function Index() {
 const agents = useAgentStore(state => state.agents)
 const entAgents = agents.filter((item)=> item.isEnt)
 
+
+
 const renderCompanyTab = ()=> {
   if(entAgents.length){
     return <CompanyTab/>
@@ -55,6 +58,13 @@ const renderCompanyTab = ()=> {
           {renderCompanyTab()}
       </View>,
     },
+    {
+      key: "3",
+      label: "纠错记录",
+      children: <View className={style.tabContent}>
+          <CorrectionList /> 
+      </View>,
+    },
   ];
   return (
     <PageCustom>

+ 20 - 12
src/pages/profile/index.tsx

@@ -90,25 +90,33 @@ export default function Profile() {
       </View>
     );
   };
-
+  // 自定义背景样式
+  const bgImageStyle = {
+    // background: `linear-gradient(rgba(242, 244, 245, 0) 0%, rgba(242, 244, 245, .8) 80% , rgba(242, 244, 245,1) 100%), url(${customBgImg})`,
+    // backgroundImage: `url(https://cdn.wehome.cn/cmn/png/53/META-H8UKWHWU-2JNUAG2BARJF55VHU9QS3-YBQGHDAM-IW.png)`,
+    backgroundImage: `url(${agentProfile?.avatarUrl})`,
+  };
   return (
-    <PageCustom>
+    <PageCustom styleBg={bgImageStyle}>
       <View className="w-full">
         <NavBarNormal
           scrollFadeIn
           showBgColor
           leftColumn={renderNavBarLeft}
         ></NavBarNormal>
-        {agentProfile && (
-          <>
-            <SummaryBar isVisitor agent={agentProfile}></SummaryBar>
-            <View className="flex flex-col w-full p-16 gap-12">
-              <ComponentList
-                components={agentProfile.components ?? []}
-              ></ComponentList>
-            </View>
-          </>
-        )}
+        <View className="blurBg">
+          {agentProfile && (
+            <>
+              <SummaryBar isVisitor agent={agentProfile}></SummaryBar>
+              <View className="flex flex-col w-full p-16 gap-12">
+                <ComponentList
+                  components={agentProfile.components ?? []}
+                ></ComponentList>
+              </View>
+            </>
+          )}
+        </View>
+        
       </View>
     </PageCustom>
   );

+ 30 - 0
src/service/correction.ts

@@ -0,0 +1,30 @@
+// 我的音色库&形象库
+import { TCorrectionItem } from '@/types/correction'
+import {
+  bluebookAiAgent,
+} from '@/xiaolanbenlib/api/index'
+import request from '@/xiaolanbenlib/module/axios.js'
+
+
+
+// 我的纠错--列表
+export const getCorrectionList = (params: {
+  entId?: string|number,
+  startId?: string
+  pageSize?: number
+}) => {
+  return request.get<{
+  data?: TCorrectionItem[]
+  nextId: number|string,
+  totalCount: number|null
+} >(`${bluebookAiAgent}api/v1/my/correction/list`, {
+    params: params
+  })
+}
+
+// 获取指定的纠错记录详情
+export const getCorrectionDetail = (id: string) => {
+  return request.get<{shortScene: string}>(`${bluebookAiAgent}api/v1/my/correction/${id}`)
+}
+
+

+ 10 - 0
src/types/correction.ts

@@ -0,0 +1,10 @@
+// 纠错记录项
+export type TCorrectionItem = {
+  "answer": string,
+  "id": number|string,
+  "links": string[],
+  "pics": string[],
+  "questions": string[],
+}
+
+