Browse Source

feat: 我的,登录

王晓东 3 tuần trước cách đây
mục cha
commit
0a94c9b989
63 tập tin đã thay đổi với 793 bổ sung586 xóa
  1. 22 23
      src/app.config.ts
  2. 42 28
      src/app.less
  3. 8 0
      src/components/AvatarDefault/index.tsx
  4. 72 0
      src/components/LoginPopup/index.tsx
  5. 9 4
      src/components/empty-data/index.tsx
  6. 4 0
      src/components/icon/IconArrowRight24/index.module.less
  7. 7 0
      src/components/icon/IconArrowRight24/index.tsx
  8. 2 0
      src/components/popup/popup/index.tsx
  9. BIN
      src/images/avatar-default.png
  10. 3 0
      src/images/svgs/IconArrowRight24.svg
  11. 6 0
      src/images/svgs/personal/IconAccount.svg
  12. 6 0
      src/images/svgs/personal/IconAgreement.svg
  13. 7 0
      src/images/svgs/personal/IconDesktop.svg
  14. 6 0
      src/images/svgs/personal/IconFeedback.svg
  15. 6 0
      src/images/svgs/personal/IconPrivacy.svg
  16. BIN
      src/images/tabbar/agent-actived.png
  17. BIN
      src/images/tabbar/agent.png
  18. BIN
      src/images/tabbar/analysis-actived.png
  19. BIN
      src/images/tabbar/analysis.png
  20. BIN
      src/images/tabbar/contact-actived.png
  21. BIN
      src/images/tabbar/contact.png
  22. BIN
      src/images/tabbar/contacts-actived.png
  23. BIN
      src/images/tabbar/contacts.png
  24. BIN
      src/images/tabbar/data-actived.png
  25. BIN
      src/images/tabbar/data.png
  26. BIN
      src/images/tabbar/home-actived.png
  27. BIN
      src/images/tabbar/home.png
  28. BIN
      src/images/tabbar/knowledge-actived.png
  29. BIN
      src/images/tabbar/knowledge.png
  30. BIN
      src/images/tabbar/personal-actived.png
  31. BIN
      src/images/tabbar/personal.png
  32. BIN
      src/images/tabbar/vip-actived.png
  33. BIN
      src/images/tabbar/vip.png
  34. 11 0
      src/pages/account/components/MenuLabel.tsx
  35. 9 0
      src/pages/account/index.config.ts
  36. 9 0
      src/pages/account/index.module.less
  37. 60 0
      src/pages/account/index.tsx
  38. 1 1
      src/pages/agent-avatars/index.tsx
  39. 2 9
      src/pages/contact/index.tsx
  40. 1 6
      src/pages/index/components/InitView/index.tsx
  41. 59 19
      src/pages/index/components/WelcomeTips/index.module.less
  42. 35 60
      src/pages/index/components/WelcomeTips/index.tsx
  43. 92 54
      src/pages/knowledge/components/CompanyTab/index.tsx
  44. 88 43
      src/pages/knowledge/components/CorrectionList/index.tsx
  45. 1 1
      src/pages/knowledge/components/PersonalTab/index.tsx
  46. 0 0
      src/pages/knowledge/components/RoundedLabel/index.module.less
  47. 0 0
      src/pages/knowledge/components/RoundedLabel/index.tsx
  48. 2 0
      src/pages/knowledge/components/view-style/ViewStyleList.tsx
  49. 5 3
      src/pages/knowledge/components/view-style/ViewStyleListCorrection.tsx
  50. 2 32
      src/pages/knowledge/index.tsx
  51. 0 9
      src/pages/login/index.config.ts
  52. 0 67
      src/pages/login/index.tsx
  53. 11 0
      src/pages/personal/components/MenuLabel.tsx
  54. 9 0
      src/pages/personal/index.config.ts
  55. 9 0
      src/pages/personal/index.module.less
  56. 168 0
      src/pages/personal/index.tsx
  57. 0 78
      src/pages/profile/components/InitView/index.tsx
  58. 0 59
      src/pages/profile/components/WelcomeTips/index.module.less
  59. 0 77
      src/pages/profile/components/WelcomeTips/index.tsx
  60. 9 9
      src/service/system.ts
  61. 3 0
      src/utils/loadMore.ts
  62. 1 1
      src/xiaolanbenlib/hooks/data/useAuth.tsx
  63. 6 3
      src/xiaolanbenlib/module/axios.js

+ 22 - 23
src/app.config.ts

@@ -1,8 +1,8 @@
 export default defineAppConfig({
   pages: [
     'pages/index/index',
+    'pages/personal/index',
     'pages/profile/index',
-    'pages/login/index',
     'pages/dashboard/index',
     'pages/dashboard-visited-detail/index',
     'pages/contact/index',
@@ -20,6 +20,7 @@ export default defineAppConfig({
     'pages/agent-gen/index',
     'pages/editor-contact/index',
     'pages/contact-us/index',
+    'pages/account/index',
     
     'pages/test/index',
     'pages/component-library/index',
@@ -52,41 +53,39 @@ export default defineAppConfig({
   tabBar: {
     color: '#828282',
     selectedColor: '#000000',
-    backgroundColor: '#f5f5f2',
+    backgroundColor: '#FFFFFF',
     list: [
       
       {
         pagePath: 'pages/index/index',
-        selectedIconPath: 'images/tabbar/home-actived.png',
-        iconPath: 'images/tabbar/home.png',
-        text: '主页'
-      },
-      {
-        pagePath: 'pages/knowledge/index',
-        selectedIconPath: 'images/tabbar/contact-actived.png',
-        iconPath: 'images/tabbar/contact.png',
-        text: '知识库'
+        selectedIconPath: 'images/tabbar/agent-actived.png',
+        iconPath: 'images/tabbar/agent.png',
+        text: '智能体'
       },
       {
         pagePath: 'pages/contact/index',
-        selectedIconPath: 'images/tabbar/contact-actived.png',
-        iconPath: 'images/tabbar/contact.png',
+        selectedIconPath: 'images/tabbar/contacts-actived.png',
+        iconPath: 'images/tabbar/contacts.png',
         text: '联系人'
       },
-      
       {
         pagePath: 'pages/dashboard/index',
-        selectedIconPath: 'images/tabbar/analysis-actived.png',
-        iconPath: 'images/tabbar/analysis.png',
+        selectedIconPath: 'images/tabbar/data-actived.png',
+        iconPath: 'images/tabbar/data.png',
         text: '数据'
       },
-
-      // {
-      //   pagePath: 'pages/member/index',
-      //   selectedIconPath: 'images/tabbar/vip-actived.png',
-      //   iconPath: 'images/tabbar/vip.png',
-      //   text: '我的'
-      // }
+      {
+        pagePath: 'pages/knowledge/index',
+        selectedIconPath: 'images/tabbar/knowledge-actived.png',
+        iconPath: 'images/tabbar/knowledge.png',
+        text: '知识库'
+      },
+      {
+        pagePath: 'pages/personal/index',
+        selectedIconPath: 'images/tabbar/personal-actived.png',
+        iconPath: 'images/tabbar/personal.png',
+        text: '我的'
+      }
     ]
   },
   window: {

+ 42 - 28
src/app.less

@@ -177,6 +177,14 @@ page {
   color: var(--color-primary);
   background-color: rgba(var(--color-primary-rgb), .1);
 }
+.button-border-primary{
+  border: 1px solid #327BF9;
+}
+.button-inline-flex{
+  display: inline-flex;
+  padding: 14px 32px;
+}
+
 
 .button-warn{
   .warn-color();
@@ -203,30 +211,7 @@ page {
   .social-media-icon();
   background-image: url(@shipingUrl);
 }
-// .social-media-tiktok{
-//   .social-media-icon();
-//   background-image: url(@tiktokUrl);
-// }
-// .social-media-xiaohongshu{
-//   .social-media-icon();
-//   background-image: url(@xiaohongshuUrl);
-// }
-// .social-media-kwai{
-//   .social-media-icon();
-//   background-image: url(@kwaiUrl);
-// }
-// .social-media-bilibili{
-//   .social-media-icon();
-//   background-image: url(@bilibiliUrl);
-// }
-// .social-media-qq{
-//   .social-media-icon();
-//   background-image: url(@qqUrl);
-// }
-// .social-media-sina{
-//   .social-media-icon();
-//   background-image: url(@sinaUrl);
-// }
+
 .social-media-shipingVideo{
   .social-media-icon();
   background-image: url(@shipingVideoUrl);
@@ -269,12 +254,41 @@ page {
   background-size: 36px 36px;
 }
 
-.data-empty{
-  width: 134px;
-  height: 72px;
-  background: url(https://cdn.wehome.cn/cmn/png/6/META-H8UK1IWU-R9EPMWD4CDA7Y5NKEQSM2-QE2IP82M-39.png) no-repeat;
+
+// 空数据提示 ui
+// 飞机
+.data-empty, .data-empty1{
+  width: 120px;
+  height: 120px;
+  background-image: url(https://cdn.wehome.cn/cmn/png/8/META-H8UKWHWU-HGXWYHZT5H6E78JCO9YE2-OWTHCUCM-WC.png);
   background-size: 100%;
+  background-repeat: no-repeat;
+}
+// 放大镜
+.data-empty2{
+  background-image: url(https://cdn.wehome.cn/cmn/png/137/META-H8UKWHWU-HGXWYHZT5H6E78JCO9YE2-EZTHCUCM-YC.png);
 }
+// 空白写字板
+.data-empty3{
+  background-image: url(https://cdn.wehome.cn/cmn/png/87/META-H8UKWHWU-HGXWYHZT5H6E78JCO9YE2-QYTHCUCM-XC.png);
+}
+// 三角牌感叹号
+.data-empty4{
+  background-image: url(https://cdn.wehome.cn/cmn/png/63/META-H8UKWHWU-8HXWA0PE7HXUV4QMQUBV2-NYTHCUCM-SC.png);
+}
+// 两个对话框
+.data-empty5{
+  background-image: url(https://cdn.wehome.cn/cmn/png/30/META-H8UKWHWU-8HXWA0PE7HXUV4QMQUBV2-RYTHCUCM-TC.png);
+}
+// 破碎文件夹
+.data-empty6{
+  background-image: url(https://cdn.wehome.cn/cmn/png/82/META-H8UKWHWU-8HXWA0PE7HXUV4QMQUBV2-Z5UHCUCM-UC.png);
+}
+// 空白文件盒
+.data-empty7{
+  background-image: url(https://cdn.wehome.cn/cmn/png/69/META-H8UKWHWU-HGXWYHZT5H6E78JCO9YE2-36UHCUCM-ZC.png);
+}
+
 
 
 

+ 8 - 0
src/components/AvatarDefault/index.tsx

@@ -0,0 +1,8 @@
+import { Image } from "@tarojs/components";
+import AvatarDefaultImage from '@/images/avatar-default.png'
+
+export default function Index() {
+  return (
+    <Image className="w-60 h-60" src={AvatarDefaultImage}></Image>
+  );
+}

+ 72 - 0
src/components/LoginPopup/index.tsx

@@ -0,0 +1,72 @@
+import NavBarNormal from "@/components/nav-bar-normal/index";
+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 { useEffect, useState } from "react";
+
+import Popup from "@/components/popup/popup";
+import Taro from "@tarojs/taro";
+import { navToWebView } from "@/utils/index";
+import { getSysAgreements, type TAgreementItem } from "@/service/system";
+import { isSuccess } from "@/utils";
+
+interface IProps {
+  showPopup: boolean
+  setShowPopup: (b: boolean)=> void
+}
+
+export default function Index({showPopup, setShowPopup}:IProps) {
+  const { onGetPhoneNumber, onError, onClick, openType } = useLogin({
+    onSuccess: () => {
+      console.log('yes')
+      setShowPopup(false)
+    },
+  })
+  const [checked, setChecked] = useState(false);
+
+  const handleChecked = () => {
+    setChecked(prev => !prev)
+  }
+
+  const [agreements, setAgreements] = useState<TAgreementItem[]>([])
+
+  const fetchPageData = async () => {
+    const response = await getSysAgreements('register')
+    if(isSuccess(response.status)){
+      setAgreements(response.data)
+    }
+  }
+
+  useEffect(()=> {
+    fetchPageData()
+  }, [])
+  
+
+  return (
+    <Popup setShow={setShowPopup} show={showPopup}>
+      <View className="text-24 font-medium leading-32 text-black mb-16">欢迎来到小蓝本</View>
+      <View className="text-gray-45 text-14 leading-22 mb-70">登录后享受更好的服务体验</View>
+      <Button
+        disabled={!checked}
+        className="button-rounded-big mb-16"
+        style={{backgroundColor: '#317CFA', fontSize: '14px'}}
+        type='primary'
+        openType={openType}
+        onGetPhoneNumber={onGetPhoneNumber}
+        onError={onError}
+        onClick={() => {
+          onClick()
+        }}
+      >
+        手机号快捷登录
+      </Button>
+      <View className="flex items-center justify-center text-12 mb-86 text-center">
+        <View className="flex-center text-gray-45 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>
+  );
+}

+ 9 - 4
src/components/empty-data/index.tsx

@@ -1,9 +1,14 @@
 import { View } from "@tarojs/components";
-export default ()=> {
+interface IProps {
+  type: number,
+  text?: string,
+  children?: JSX.Element|JSX.Element[]
+}
+export default ({type, text = '暂无数据', children}: IProps)=> {
   return (
-    <View className="flex flex-col pt-56 items-center">
-      <View className='data-empty'></View>
-      <View className='text-12 text-gray-45 text-center leading-24 mt-12'>暂无数据</View>
+    <View className="flex flex-col items-center">
+      <View className={`data-empty data-empty${type}`}></View>
+      {children ? children : <View className='text-16 text-black font-medium text-center leading-24 mt-20'>{text}</View>}
     </View>
   )
 }

+ 4 - 0
src/components/icon/IconArrowRight24/index.module.less

@@ -0,0 +1,4 @@
+.icon{
+  width: 24px;
+  height: 24px;
+}

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

@@ -0,0 +1,7 @@
+import { Image } from '@tarojs/components'
+import IconArrow from '@/images/svgs/IconArrowRight24.svg'
+export default () => {
+  return (
+    <Image src={IconArrow} mode="widthFix" className='w-24 h-24'></Image>
+  )
+}

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

@@ -26,6 +26,8 @@ export default ({title = '', showCloseButton = true, show, setShow, children}:Pr
         setSlideUp(true)
       }, 100)  
       Taro.hideTabBar();
+    }else{
+      Taro.showTabBar();
     }
     
   }, [show])

BIN
src/images/avatar-default.png


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

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="design-iconfont">
+  <path stroke="#979797" stroke-width="1.5" stroke-linecap="round" transform="rotate(45 10 12)" d="M6 8L14 8 14 16" fill="none" fill-rule="evenodd"/>
+</svg>

+ 6 - 0
src/images/svgs/personal/IconAccount.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="design-iconfont">
+  <g fill-rule="nonzero" fill="none">
+    <path d="M12.1787446,16.707 L6.14174462,16.707 C5.02589647,16.7055465 3.99509332,16.11053 3.43574462,15.145 L0.417744621,9.917 C-0.139248207,8.94979118 -0.139248207,7.75920882 0.417744621,6.792 L3.43574462,1.565 C3.99433297,0.598315479 5.02527895,0.00207362472 6.14174462,0 L12.1787446,0 C13.2946883,0.00207002024 14.3253494,0.597385339 14.8847446,1.563 L17.9027446,6.79 C18.4587131,7.75748245 18.4587131,8.94751755 17.9027446,9.915 L14.8847446,15.143 C14.3257526,16.1091495 13.2949492,16.704928 12.1787446,16.707 L12.1787446,16.707 Z M6.14174462,1.2 C5.45427175,1.20137118 4.81937042,1.56814381 4.47474462,2.163 L1.45674462,7.392 C1.11369943,7.98781732 1.11369943,8.72118268 1.45674462,9.317 L4.47474462,14.545 C4.8194738,15.1396214 5.45442235,15.5060404 6.14174462,15.507 L12.1787446,15.507 C12.8660669,15.5060404 13.5010154,15.1396214 13.8457446,14.545 L16.8637446,9.317 C17.2067898,8.72118268 17.2067898,7.98781732 16.8637446,7.392 L13.8457446,2.165 C13.5016255,1.56937416 12.866629,1.20178474 12.1787446,1.2 L6.14174462,1.2 Z" fill="#111A34" transform="translate(4.8 5.6)"/>
+    <path d="M9.15974462,11.783 C7.7727526,11.783 6.52235155,10.9474427 5.99166615,9.66599042 C5.46098074,8.38453816 5.75453476,6.9095857 6.73542925,5.92897727 C7.71632373,4.94836884 9.19136175,4.65524504 10.4726592,5.18630419 C11.7539566,5.71736333 12.5891491,6.96800803 12.5887448,8.355 C12.5865394,10.2477083 11.0524535,11.7813468 9.15974462,11.783 L9.15974462,11.783 Z M9.15974462,6.126 C8.25819828,6.126 7.44542399,6.66907841 7.10041714,7.50199863 C6.75541029,8.33491884 6.94611407,9.29365148 7.58360361,9.93114102 C8.22109314,10.5686305 9.17982578,10.7593343 10.012746,10.4143275 C10.8456662,10.0693206 11.3887446,9.25654634 11.3887446,8.355 C11.3876419,7.12441433 10.3903303,6.12710268 9.15974462,6.126 L9.15974462,6.126 Z" fill="#327BF9" transform="translate(4.8 5.6)"/>
+  </g>
+</svg>

+ 6 - 0
src/images/svgs/personal/IconAgreement.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="design-iconfont">
+  <g fill-rule="nonzero" fill="none">
+    <path d="M15.334,3.102 L13.008,3.102 L13.008,2.029 C13.0068999,0.909650725 12.1003476,0.00220398884 10.981,0 L6.381,0 C5.26165235,0.00220398884 4.35510009,0.909650725 4.354,2.029 L4.354,3.102 L2.028,3.102 C0.908261771,3.10365343 0.00110142765,4.01126109 0,5.131 L0,15.157 C0.00110142765,16.2767389 0.908261771,17.1843466 2.028,17.186 L15.334,17.186 C16.4537382,17.1843466 17.3608986,16.2767389 17.362,15.157 L17.362,5.131 C17.3608986,4.01126109 16.4537382,3.10365343 15.334,3.102 L15.334,3.102 Z M5.754,2.029 C5.754,1.68239244 6.0343942,1.40110209 6.381,1.4 L10.981,1.4 C11.3279965,1.40055166 11.609,1.68200304 11.609,2.029 L11.609,3.102 L5.754,3.102 L5.754,2.029 Z M2.028,4.502 L15.334,4.502 C15.6809965,4.50255166 15.962,4.78400304 15.962,5.131 L15.962,8.675 L1.4,8.675 L1.4,5.131 C1.4,4.78400304 1.68100348,4.50255166 2.028,4.502 L2.028,4.502 Z M15.334,15.786 L2.028,15.786 C1.68100348,15.7854483 1.4,15.503997 1.4,15.157 L1.4,10.075 L15.962,10.075 L15.962,15.157 C15.962,15.503997 15.6809965,15.7854483 15.334,15.786 L15.334,15.786 Z" fill="#111A34" transform="translate(5.4 5.4)"/>
+    <path d="M7.241,7.88 L10.121,7.88 C10.5075993,7.88 10.821,7.56659932 10.821,7.18 C10.821,6.79340068 10.5075993,6.48 10.121,6.48 L7.241,6.48 C6.85440068,6.48 6.541,6.79340068 6.541,7.18 C6.541,7.56659932 6.85440068,7.88 7.241,7.88 Z" fill="#327BF9" transform="translate(5.4 5.4)"/>
+  </g>
+</svg>

+ 7 - 0
src/images/svgs/personal/IconDesktop.svg

@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="design-iconfont">
+  <g fill-rule="nonzero" fill="none">
+    <path d="M10.957,17.034 L4.49,17.034 C2.01252298,17.0285006 0.00549941436,15.021477 0,12.544 L0,4.489 C0.00604901847,2.01191351 2.01291223,0.00549726724 4.49,0 L10.957,0 C13.4340878,0.00549726724 15.440951,2.01191351 15.447,4.489 L15.447,12.54 C15.4437007,15.019039 13.4360351,17.0284932 10.957,17.034 Z M4.49,1.204 C2.67561703,1.20564759 1.20440711,2.67462164 1.2,4.489 L1.2,12.54 C1.20220401,14.3561031 2.67389689,15.827796 4.49,15.83 L10.957,15.83 C12.7731031,15.827796 14.244796,14.3561031 14.247,12.54 L14.247,4.489 C14.2447949,2.67305925 12.7729413,1.20165303 10.957,1.2 L4.49,1.204 Z" fill="#111A34" transform="translate(6.3 5.4)"/>
+    <path d="M10.482,11.689 L4.965,11.689 C4.04037991,11.6878979 3.29110205,10.9386201 3.2899988,10.014 L3.2899988,4.367 C3.28946928,3.92232396 3.46567576,3.49566443 3.77982797,3.18094955 C4.09398018,2.86623468 4.52032372,2.689265 4.965,2.689 L10.482,2.689 C11.4068484,2.68955165 12.1564483,3.43915164 12.1570003,4.364 L12.1570003,10.011 C12.1575527,10.9367914 11.4077909,11.6878961 10.482,11.689 Z M4.965,3.889 C4.70266474,3.889 4.48999051,4.10166474 4.48999051,4.364 L4.48999051,10.011 C4.48920106,10.1374968 4.53889263,10.2590871 4.62805915,10.3488167 C4.71722567,10.4385464 4.83850066,10.489 4.965,10.489 L10.482,10.489 C10.7443353,10.489 10.9570095,10.2763353 10.9570095,10.014 L10.9570095,4.367 C10.9577989,4.24050318 10.9081074,4.11891294 10.8189408,4.02918326 C10.7297743,3.93945358 10.6084993,3.889 10.482,3.889 L4.965,3.889 Z" fill="#327BF9" transform="translate(6.3 5.4)"/>
+    <path d="M6.814,13.68 C6.814,14.0051117 6.987445,14.3055273 7.26899999,14.4680831 C7.55055497,14.630639 7.89744503,14.630639 8.17900001,14.4680831 C8.460555,14.3055273 8.634,14.0051117 8.634,13.68 C8.634,13.3548883 8.460555,13.0544727 8.17900001,12.8919169 C7.89744503,12.729361 7.55055497,12.729361 7.26899999,12.8919169 C6.987445,13.0544727 6.814,13.3548883 6.814,13.68 Z" fill="#327BF9" transform="translate(6.3 5.4)"/>
+  </g>
+</svg>

+ 6 - 0
src/images/svgs/personal/IconFeedback.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="design-iconfont">
+  <g fill-rule="nonzero" fill="none">
+    <path d="M12.381,0 L2.653,0 C1.18847391,0.00165327656 0.00165327656,1.18847391 0,2.653 L0,14.509 C0.00165327656,15.9735261 1.18847391,17.1603467 2.653,17.162 L10.139,17.162 C10.4939909,17.1616635 10.8327954,17.0134592 11.074,16.753 L14.695,12.84 C14.9130224,12.6047235 15.0340001,12.2957629 15.0340001,11.975 L15.0340001,2.653 C15.0323467,1.18847391 13.8455261,0.00165327656 12.381,0 Z M1.2,14.509 L1.2,2.653 C1.20110167,1.85098703 1.85098703,1.20110167 2.653,1.2 L12.381,1.2 C13.183013,1.20110167 13.8328983,1.85098703 13.834,2.653 L13.834,11.7 L11.068,11.7 C9.9634305,11.7 9.068,12.5954305 9.068,13.7 L9.068,15.961 L2.653,15.961 C1.85137663,15.9598998 1.20165208,15.3106224 1.2,14.509 Z M10.268,15.858 L10.268,13.701 C10.268,13.2591722 10.6261722,12.901 11.068,12.901 L13.005,12.901 L10.268,15.858 Z" fill="#111A34" transform="translate(6.5 5.4)"/>
+    <path d="M4.674,5.307 L10.36,5.307 C10.6913708,5.307 10.96,5.03837085 10.96,4.707 C10.96,4.37562915 10.6913708,4.107 10.36,4.107 L4.674,4.107 C4.34262915,4.107 4.074,4.37562915 4.074,4.707 C4.074,5.03837085 4.34262915,5.307 4.674,5.307 Z M4.674,8.533 L10.36,8.533 C10.6913708,8.533 10.96,8.26437084 10.96,7.933 C10.96,7.60162916 10.6913708,7.333 10.36,7.333 L4.674,7.333 C4.34262916,7.333 4.07400003,7.60162916 4.07400003,7.933 C4.07400003,8.26437084 4.34262916,8.533 4.674,8.533 Z M7.618,10.558 L4.674,10.558 C4.45964064,10.558 4.26156441,10.6723593 4.15438473,10.858 C4.04720504,11.0436406 4.04720504,11.2723594 4.15438473,11.458 C4.26156441,11.6436407 4.45964064,11.758 4.674,11.758 L7.618,11.758 C7.94937085,11.758 8.218,11.4893708 8.218,11.158 C8.218,10.8266292 7.94937085,10.558 7.618,10.558 L7.618,10.558 Z" fill="#327BF9" transform="translate(6.5 5.4)"/>
+  </g>
+</svg>

+ 6 - 0
src/images/svgs/personal/IconPrivacy.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="design-iconfont">
+  <g fill-rule="nonzero" fill="none">
+    <path d="M14.4580002,1.61900026 L8.46400016,0.0630002603 C8.13866821,-0.0210000868 7.7973321,-0.0210000868 7.47200016,0.0630002603 L1.47800016,1.61900026 C0.607394303,1.845369 -0.000253331687,2.63144632 7.92317138e-08,3.53100026 L7.92317138e-08,10.5310003 C7.92317138e-08,12.2720003 1.00000008,13.9260003 2.96900016,15.4450003 C4.49900016,16.6250003 6.24600016,17.4290003 7.15100016,17.8030003 C7.68407669,18.0239724 8.28727628,17.9998444 8.80100016,17.7370003 C9.70100016,17.2800003 11.4300002,16.3310003 12.9520002,15.1130003 C14.9320002,13.5300003 15.9350008,11.9880003 15.9350008,10.5310003 L15.9350008,3.53100026 C15.9357244,2.63161394 15.3284143,1.84544128 14.4580002,1.61900026 Z M14.7350035,10.5310003 C14.7350035,12.6210003 11.3890002,15.0710003 8.25600016,16.6680003 C8.05484059,16.7707589 7.81876729,16.7802603 7.61000016,16.6940003 C6.11000016,16.0720003 1.19999999,13.7940003 1.19999999,10.5310003 L1.19999999,3.53100026 C1.19976557,3.17877815 1.43796247,2.87105573 1.77900016,2.78300026 L7.77000016,1.22500026 C7.89718445,1.19165702 8.03081587,1.19165702 8.15800016,1.22500026 L14.1580002,2.78100026 C14.4987601,2.87031989 14.7360303,3.17873012 14.7350035,3.53100026 L14.7350035,10.5310003 Z" fill="#111A34" transform="translate(6.1 5)"/>
+    <path d="M10.1590002,10.2810003 L8.57000016,10.2810003 L8.57000016,9.27100026 C9.6206634,8.97169516 10.2900552,7.94384668 10.1389503,6.86188361 C9.98784533,5.77992054 9.06246379,4.97479514 7.97000016,4.97479514 C6.87753653,4.97479514 5.95215499,5.77992054 5.80105004,6.86188361 C5.6499451,7.94384668 6.31933692,8.97169516 7.37000016,9.27100026 L7.37000016,12.6950003 C7.37000016,13.0263711 7.63862931,13.2950003 7.97000016,13.2950003 C8.30137101,13.2950003 8.57000016,13.0263711 8.57000016,12.6950003 L8.57000016,11.4810003 L10.1610002,11.4810003 C10.492371,11.4810003 10.7610002,11.2123711 10.7610002,10.8810003 C10.7610002,10.5496294 10.492371,10.2810003 10.1610002,10.2810003 L10.1590002,10.2810003 Z M6.98000016,7.16400026 C6.98055231,6.61736887 7.42403461,6.17463248 7.97066615,6.17500026 C8.51729769,6.17536849 8.96018346,6.61870162 8.95999965,7.16533326 C8.95981573,7.71196489 8.51663182,8.15500026 7.97000016,8.15500026 C7.42307654,8.15444837 6.98000016,7.71092416 6.98000016,7.16400026 L6.98000016,7.16400026 Z" fill="#327BF9" transform="translate(6.1 5)"/>
+  </g>
+</svg>

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


BIN
src/images/tabbar/agent.png


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


BIN
src/images/tabbar/analysis.png


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


BIN
src/images/tabbar/contact.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/home-actived.png


BIN
src/images/tabbar/home.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


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


BIN
src/images/tabbar/vip.png


+ 11 - 0
src/pages/account/components/MenuLabel.tsx

@@ -0,0 +1,11 @@
+import { View } from "@tarojs/components";
+export interface MenuLabelProps {
+  children: string|JSX.Element|JSX.Element[]
+}
+
+const MenuLabel = ({ children }: MenuLabelProps) => {
+  
+  return <View className="text-14 py-18 font-medium leading-22">{children}</View>
+}
+
+export default MenuLabel;

+ 9 - 0
src/pages/account/index.config.ts

@@ -0,0 +1,9 @@
+export default definePageConfig({
+  navigationBarTitleText: '账号管理',
+  "usingComponents": {},
+  "navigationStyle": 'custom',
+  backgroundColor: '#F4F9FF',
+  enableShareAppMessage: true,
+  enableShareTimeline: true,
+  enablePageMeta: true,
+})

+ 9 - 0
src/pages/account/index.module.less

@@ -0,0 +1,9 @@
+.nickname{
+  flex:1;
+  height: 32px;
+  font-family: PingFangSC-Semibold;
+  font-weight: 600;
+  font-size: 24px;
+  color: #111A34;
+  line-height: 32px; 
+}

+ 60 - 0
src/pages/account/index.tsx

@@ -0,0 +1,60 @@
+import PageCustom from "@/components/page-custom/index";
+import NavBarNormal from "@/components/nav-bar-normal";
+
+import { View, Input, Image } from "@tarojs/components";
+import { useEffect, useState } from "react";
+import CardList from "@/components/list/card-list";
+import CardListItem from "@/components/list/card-list-item";
+import IconArrowRight24 from "@/components/icon/IconArrowRight24";
+import IconAccount from "@/images/svgs/personal/IconAccount.svg";
+
+import style from "./index.module.less";
+import MenuLabel from "./components/MenuLabel";
+import Taro from "@tarojs/taro";
+
+
+export default function Index() {
+  // const name = "";
+  
+
+  
+
+  const IconArrowRight = () => {
+    return (
+      <View className="flex items-center">
+        <IconArrowRight24 />
+      </View>
+    );
+  };
+
+  
+  return (
+    <PageCustom>
+      <NavBarNormal backText="账号管理"></NavBarNormal>
+      <View className="w-full px-16 py-24 flex flex-col gap-16">
+
+        <CardList>
+          <CardListItem
+            className="pl-16 pr-8"
+            underline
+            rightRenderer={()=> <View>helo</View>}
+            onClick={() => {
+              // Taro.navigateTo({ url: "/pages/voice/index" });
+            }}
+          >
+            <MenuLabel>绑定手机</MenuLabel>
+          </CardListItem>
+          <CardListItem
+            className="pl-16 pr-8"
+            rightRenderer={()=> <View>yoyo</View>}
+            onClick={() => {
+              
+            }}
+          >
+            <MenuLabel>用户ID</MenuLabel>
+          </CardListItem>
+        </CardList>
+      </View>
+    </PageCustom>
+  );
+}

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

@@ -103,7 +103,7 @@ export default function Index() {
   const renderList = ()=> {
     if(!list.length){
       return <>
-        <EmptyData></EmptyData>
+        <EmptyData type={2}></EmptyData>
       </>
     }
     

+ 2 - 9
src/pages/contact/index.tsx

@@ -1,6 +1,6 @@
 import Taro, { useReachBottom,} from "@tarojs/taro";
 import { View, Text } from "@tarojs/components";
-
+import EmptyData from "@/components/empty-data";
 import NavBarNormal from "@/components/nav-bar-normal/index";
 import SearchBar from "@/components/search-bar/index";
 import style from "./index.module.less";
@@ -95,14 +95,7 @@ export default function Index() {
         </slide-delete>
       ));
     }
-    return (
-      <View className="flex flex-col pt-56 items-center">
-        <View className="data-empty"></View>
-        <View className="text-12 text-gray-45 text-center leading-24 mt-12">
-          暂无数据
-        </View>
-      </View>
-    );
+    return <EmptyData type={2} />
   };
 
   return (

+ 1 - 6
src/pages/index/components/InitView/index.tsx

@@ -66,12 +66,7 @@ export default function Index({setDefault}: IProps) {
     <PageCustom>
       <NavBarNormal leftColumn={renderLogo}></NavBarNormal>
       <View className="relative w-full">
-        <WelcomeTips setDefault={setDefault}>
-          <View className="flex items-center">
-            <View>{userInfo?.logo && <Image className="w-24 h-24" src={userInfo?.logo}></Image>}</View>
-            <View>{isLogin ? `已登录「${userInfo?.nickName}」` : '未登录'}</View>
-          </View>      
-        </WelcomeTips>
+        <WelcomeTips setDefault={setDefault}></WelcomeTips>
       </View>
       </PageCustom>
   );

+ 59 - 19
src/pages/index/components/WelcomeTips/index.module.less

@@ -5,43 +5,75 @@
   bottom: 16px;
   left: 0;
   right: 0;
-  // display: flex;
-  // box-sizing: border-box;
-  // flex-direction: column;
-  // justify-content: flex-end;
+  z-index: 2;
+  display: flex;
+  justify-content: center;
+  box-sizing: border-box;
+  flex-direction: column;
+  align-items: center;
+}
+.demoAvatar{
+  position: absolute;
+  z-index: 1;
+  top: 0;
+  left: 50%;
+  margin-left: -113.5px;
+  width: 227px;
+  height: 402px;
+}
+.content{
+  position: relative;
+  padding-top: 260px;
+  z-index: 2;
+  display: flex;
+  justify-content: center;
+  box-sizing: border-box;
+  flex-direction: column;
+  align-items: center;
+}
+.welcomBar{
+  padding: 12px 16px;
+  border-radius: 8px;
+  width: 312px;
+  background-color:rgba(255, 255, 255, 0.4);
+  backdrop-filter: blur(7px) brightness(0.94) contrast(146%) grayscale(3%) opacity(81%);
+  margin-bottom: 8px;
 }
 .hello {
-  padding-left: 12px;
-  margin-bottom: 10px;
-  font-family: PingFang SC;
+  margin-bottom: 4px;
+  font-family: PingFangSC-Medium;
   font-weight: 500;
-  font-size: 24px;
-  line-height: 32px;
-  color: #000;
+  font-size: 16px;
+  color: #111A34;
+  line-height: 24px;
+  background: #2ACCF7;
+  background: radial-gradient(circle farthest-corner at top left, #2ACCF7 0%, #327BF9 10%, #4649F9 100%);
+  -webkit-background-clip: text;
+  background-clip: text;
+  -webkit-text-fill-color: transparent;
 }
 
 .welcome {
-  padding-left: 12px;
-  margin-bottom: 54px;
-  font-family: PingFang SC;
+  font-family: PingFangSC-Regular;
   font-weight: 400;
   font-size: 12px;
+  color: rgba(#000, .6);
   line-height: 20px;
 
 }
 
 .box {
-  margin-bottom: 20px;
   border-radius: 12px;
-  padding: 20px;
+  padding: 16px;
   background-color: white;
 }
 
 .boxInner {
-  margin-bottom: 20px;
-  padding: 12;
+  padding: 16px;
+  min-height: 184px;
+  margin-bottom: 16px;
+  background-image: linear-gradient(120deg, #f2fcff 0%, #EBF5FF 49%, #E2EAFF 100%);
   border-radius: 8px;
-  background-color: rgba(var(--primary-color, .1));
 }
 
 .headline {
@@ -52,8 +84,16 @@
 }
 
 .list {
+  display: flex;
+  flex-direction: column;
+  gap: 12px;
+  width: 100%;
   padding-bottom: 38px;
+  font-family: PingFangSC-Regular;
   font-weight: 400;
   font-size: 14px;
-  line-height: 22px;
+  color: #414A64;
+  line-height: 20px;
 }
+
+

+ 35 - 60
src/pages/index/components/WelcomeTips/index.tsx

@@ -1,77 +1,52 @@
-import { View } from "@tarojs/components";
+import { View, Image } from "@tarojs/components";
 import style from "./index.module.less";
 import Taro from "@tarojs/taro";
 
 import { getAgents, getAgent, createAgent, } from "@/service/agent";
 
 import { isSuccess } from "@/utils";
+import { useAgentStore } from "@/store/agentStore";
 interface IProps {
   setDefault: (agent: TAgent) => void
-  children: JSX.Element|JSX.Element[]
+  // children: JSX.Element|JSX.Element[]
 }
-export default function Index({children, setDefault}: IProps) {
-  
-  const saveAgent = async () => {
-    const res = await createAgent()
-    console.log(res)
-    Taro.navigateTo({url: '/pages/agent-gen/index'})
-  }
-  
-  const go = async () => {
-    const response = await getAgents()
-    const res = await createAgent()
-    
-    if(isSuccess(res.status)){
-      setDefault(res.data)
-      console.log(response, 'gogogo')
+export default function Index({setDefault}: IProps) {  
+  const { createAgent } = useAgentStore()
+  const handleCreate = async ()=> {
+    const result = await createAgent()
+    if(result){
+      setDefault(result)
     }
-    
-    // return 
-    // saveAgent({
-    //   address: '浙江杭州余杭文一西路1700号',
-    //   avatarUrl: 'https://cdn.wehome.cn/cmn/png/53/META-H8UKWHWU-2JNUAG2BARJF55VHU9QS3-YBQGHDAM-IW.png',
-    //   email: '',
-    //   enabledChatBg: false,
-    //   enabledPersonalKb: false,
-    //   "entId": '',
-    //   "entName": '',
-    //   "greeting": '',
-    //   "isDefault": true,
-    //   "isEnt": false,
-    //   "isNewEnt": false,
-    //   "isSystemVoice": true,
-    //   "mobile": '18658870618',
-    //   "name": 'xiaodong',
-    //   "personality": '一名疯瘨的数码博主',
-    //   "position": 'CEO',
-    //   "qrCodeUrl": '',
-    //   "questionGuides": ['想要了解相机?', '想要了解手机?'],
-    //   // "voice": ''
-    // })
-    
   }
-
-
-  
-
   return (
     <View className={style.container}>
-      <View className={style.hello}>你好</View>      
-      <View>{children}</View>
-      <View className={style.welcome}>欢迎你,小蓝本的第39293位用户</View>
-      <View className={style.box}>
-        <View className={style.boxInner}>
-          <View className={style.headline}>
-            <View>开启你的专属 AI 分身,</View>
-            <View>让客户随时随地了解你和你的解决方案。</View>
-          </View>
-          <View className={style.list}>
-              <View>1.企业 + 个人资料统一管理</View>
-              <View>2.客户问题,AI 自动回应</View>
-              <View>3.你的内容,一页呈现</View>
+      <View className={style.demoAvatar}>
+        <Image className={style.demoAvatar} src="https://cdn.wehome.cn/cmn/png/159/META-H8UKWHWU-8HXWA0PE7HXUV4QMQUBV2-EHO2AUCM-HC.png" mode="widthFix"></Image>
+      </View>
+      <View className={style.content}>
+        <View className={style.welcomBar}>
+          <View className={style.hello}>你好!</View>      
+          <View className={style.welcome}>欢迎你,体验「小蓝本智能体」</View>
+        </View>
+        <View className={style.box}>
+          <View className={style.boxInner}>
+            <View className={style.headline}>
+              <View>开启你的专属 AI 分身,</View>
+              <View>让客户随时随地了解你和你的解决方案。</View>
+            </View>
+            <View className={style.list}>
+                <View className="flex items-center gap-6">
+                  <View>企业 + 个人资料统一管理</View>
+                </View>
+                <View className="flex items-center gap-6">
+                  <View>客户问题,AI 自动回应</View>
+                </View>
+                <View className="flex items-center gap-6">
+                  <View>你的内容,一页呈现</View>
+                </View>
+            </View>
           </View>
-          <View className="button-rounded-big" onClick={go}>创建智能体</View>
-          {/* <View className="button-rounded-big" onClick={test}>test</View> */}
+          <View className="button-rounded-big" onClick={handleCreate}>创建智能体</View>
         </View>
       </View>
       </View>

+ 92 - 54
src/pages/knowledge/components/CompanyTab/index.tsx

@@ -1,90 +1,95 @@
 import { View } from "@tarojs/components";
-import RoundedLabel from "../rounded-label";
+import RoundedLabel from "../RoundedLabel";
 import IconFilterFeeds from "@/components/icon/IconFilterFeeds";
 import IconFilterBatch from "@/components/icon/IconFilterBatch";
 import IconFilterList from "@/components/icon/IconFilterList";
 
-
-
+import EmptyData from "@/components/empty-data";
 import Popup from "@/components/popup/popup";
 import WemetaSwitch from "@/components/wemeta-switch";
 import { useState } from "react";
 
-import ViewStyleChatEnt from '../view-style/ViewStyleChatEnt'
-import ViewStyleListEnt from '../view-style/ViewStyleListEnt'
+import ViewStyleChatEnt from "../view-style/ViewStyleChatEnt";
+import ViewStyleListEnt from "../view-style/ViewStyleListEnt";
 
-import  PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
-import IconArrowDownRounded from '@/components/icon/IconArrowDownRounded';
+import PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
+import IconArrowDownRounded from "@/components/icon/IconArrowDownRounded";
 import { useKnowledgeEntStore } from "@/store/knowledgeEnt";
 import { useUserStore } from "@/store/userStore";
+import { useAgentStore } from "@/store/agentStore";
 
 type TListStyle = "chat" | "list";
 
 const Index = () => {
-  const ents = useUserStore(state => state.entList)
+  const ents = useUserStore((state) => state.entList);
   const [checked, setChecked] = useState(false);
   const [showPopup, setShowPopup] = useState(false);
   const [listStyle, setListStyle] = useState<TListStyle>("chat");
-  const {ent, setEnt, total, listTotalCount } = useKnowledgeEntStore()
-  
+  const { ent, setEnt, total, listTotalCount } = useKnowledgeEntStore();
+  // const agents = useAgentStore((state) => state.agents);
 
   const handleListStyleChange = (listStyle: TListStyle) => {
     setListStyle(listStyle);
   };
 
   // 如果没有当前企业,则默认第一个
-  if(!ent){
-    setEnt(ents[0])
-  }
-
-  // 当前选中的值
-  const options = ents.map( item => item.entName)
-  // 是否显示选择器
-  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){
-      setEnt(ent)
-    }
+  if (!ent) {
+    setEnt(ents[0]);
   }
 
-  
-  const renderContent = () => {
-
-    if(!ent?.entId){
-      return <></>
-    }
-    if(listStyle === 'chat'){ 
-      return <ViewStyleChatEnt entId={ent.entId}/>
+  const renderTabContent = () => {
+    if (!ents.length) {
+      return (
+        <View className="flex-center pt-40">
+          <EmptyData type={7}>
+            <View className="text-center text-14 leading-28 text-gray-45 mb-44 w-172">
+              <View className="text-center text-16 leading-24 font-medium text-black">
+                绑定企业,知识自动到位
+              </View>
+              <View>访问公司统一知识内容</View>
+              <View>一键同步到你的智能体</View>
+              <View>提升回复效率与专业度</View>
+              <View
+                className="button-rounded button-primary-light button-border-primary button-inline-flex mt-24"
+                onClick={() =>
+                  Taro.navigateTo({ url: "/pages/contact-us/index" })
+                }
+              >
+                联系我们
+              </View>
+            </View>
+          </EmptyData>
+        </View>
+      );
     }
-    return <ViewStyleListEnt entId={ent.entId} />
-  }
-
 
-  return (
-    <>
-      <View className="pt-12 h-full">
-        <View className="rounded-container-header"></View>
+    return (
+      <>
         <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>
+            <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/>
+                  <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} 个文件
+              共 {listStyle === "chat" ? total : listTotalCount} 个文件
             </View>
             <View className="flex items-center">
               {listStyle === "chat" ? (
@@ -105,7 +110,7 @@ const Index = () => {
                   <RoundedLabel
                     text="列表"
                     onClick={() => {
-                      setShowPopup(true)
+                      setShowPopup(true);
                     }}
                     icon={IconFilterList}
                   ></RoundedLabel>
@@ -114,11 +119,44 @@ const Index = () => {
             </View>
           </View>
         </View>
-        <View className="px-16 h-full">
-          {renderContent()}
-        </View>
+        <View className="px-16 h-full">{renderContent()}</View>
+      </>
+    );
+  };
+
+  // 当前选中的值
+  const options = ents.map((item) => item.entName);
+  // 是否显示选择器
+  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) {
+      setEnt(ent);
+    }
+  };
+
+  const renderContent = () => {
+    if (!ent?.entId) {
+      return <></>;
+    }
+    if (listStyle === "chat") {
+      return <ViewStyleChatEnt entId={ent.entId} />;
+    }
+    return <ViewStyleListEnt entId={ent.entId} />;
+  };
+
+  return (
+    <>
+      <View className="pt-12 h-full">
+        <View className="rounded-container-header"></View>
+        {renderTabContent()}
       </View>
-      
+
       <Popup setShow={setShowPopup} show={showPopup} title="展示样式">
         <View
           className={`rounded-card ${

+ 88 - 43
src/pages/knowledge/components/CorrectionList/index.tsx

@@ -1,87 +1,125 @@
 import { View } from "@tarojs/components";
-import RoundedLabel from "../rounded-label";
+import RoundedLabel from "../RoundedLabel";
 import IconFilterFeeds from "@/components/icon/IconFilterFeeds";
 import IconFilterBatch from "@/components/icon/IconFilterBatch";
 import IconFilterList from "@/components/icon/IconFilterList";
-
-
+import EmptyData from "@/components/empty-data";
 
 import Popup from "@/components/popup/popup";
 import WemetaSwitch from "@/components/wemeta-switch";
 import { useState } from "react";
 
-import ViewStyleListCorrection from '../view-style/ViewStyleListCorrection'
+import ViewStyleListCorrection from "../view-style/ViewStyleListCorrection";
 
-import  PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
-import IconArrowDownRounded from '@/components/icon/IconArrowDownRounded';
+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 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 [current, setCurrent] = useState<TEntItem | string>("");
+
+  // 默认设一个值,先去加载
+  const [list, setList] = useState<any[]>([1]);
 
   const handleListStyleChange = (listStyle: TListStyle) => {
     setListStyle(listStyle);
   };
 
-  
-
   // 当前选中的值
-  const options = ['个人知识库', ...ents.map( item => item.entName)]
+  const options = ["个人知识库", ...ents.map((item) => item.entName)];
 
   // 如果没有当前企业,则默认第一个
-  if(!current){
-    setCurrent(options[0])
+  if (!current) {
+    setCurrent(options[0]);
   }
   // 是否显示选择器
-  const [showPicker, setShowPicker] = useState(false)
+  const [showPicker, setShowPicker] = useState(false);
 
   // 当前选中的值
-  const [selected, setSelected] = useState(options[0])
+  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)
+    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"/>
+    const entId = typeof current === "string" ? undefined : current.entId;
+    if (listStyle === "card") {
+      return (
+        <ViewStyleListCorrection
+          setData={setList}
+          entId={entId}
+          viewStyle="card"
+        />
+      );
     }
-    return <ViewStyleListCorrection entId={entId} viewStyle="list"/>
-  }
-
+    return (
+      <ViewStyleListCorrection
+        setData={setList}
+        entId={entId}
+        viewStyle="list"
+      />
+    );
+  };
 
-  return (
-    <>
-      <View className="pt-12 h-full">
-        <View className="rounded-container-header"></View>
+  // 渲染主体
+  const renderTabContent = () => {
+    // 空数据
+    if (!list.length) {
+      return (
+        <View className="flex-center pt-40">
+          <EmptyData type={3}>
+            <View className="text-center text-14 leading-28 text-gray-45 mb-44 w-[296px]">
+              <View className="text-center text-16 leading-24 font-medium text-black">
+                还没有纠正过的内容
+              </View>
+              <View>当你发现 AI 理解有误的知识点并进行修改后,</View>
+              <View>会汇总在这里,用于优化AI回答。</View>
+            </View>
+          </EmptyData>
+        </View>
+      );
+    }
+    // 
+    return (
+      <>
         <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>
+            <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/>
+                  <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>
@@ -97,7 +135,7 @@ const Index = () => {
                   <RoundedLabel
                     text="列表"
                     onClick={() => {
-                      setShowPopup(true)
+                      setShowPopup(true);
                     }}
                     icon={IconFilterList}
                   ></RoundedLabel>
@@ -106,11 +144,18 @@ const Index = () => {
             </View>
           </View>
         </View>
-        <View className="px-16 h-full">
-          {renderContent()}
-        </View>
+        <View className="px-16 h-full">{renderContent()}</View>
+      </>
+    );
+  };
+
+  return (
+    <>
+      <View className="pt-12 h-full">
+        <View className="rounded-container-header"></View>
+        {renderTabContent()}
       </View>
-      
+
       <Popup setShow={setShowPopup} show={showPopup} title="展示样式">
         <View
           className={`rounded-card ${

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

@@ -1,5 +1,5 @@
 import { Text, View, Image } from "@tarojs/components";
-import RoundedLabel from "../rounded-label";
+import RoundedLabel from "../RoundedLabel";
 import IconFilterFeeds from "@/components/icon/IconFilterFeeds";
 import IconFilterBatch from "@/components/icon/IconFilterBatch";
 import IconFilterList from "@/components/icon/IconFilterList";

+ 0 - 0
src/pages/knowledge/components/rounded-label/index.module.less → src/pages/knowledge/components/RoundedLabel/index.module.less


+ 0 - 0
src/pages/knowledge/components/rounded-label/index.tsx → src/pages/knowledge/components/RoundedLabel/index.tsx


+ 2 - 0
src/pages/knowledge/components/view-style/ViewStyleList.tsx

@@ -12,6 +12,7 @@ import { useKnowledgeStore } from "@/store/knowledge";
 import type { TKnowledgeItem } from "@/types/knowledge";
 import { EKnowlegeTypes } from "@/consts/enum";
 import KnowledgeIcon from "@/components/KnowledgeIcon";
+import EmptyData from "@/components/empty-data";
 export interface IProps {
   types?: EKnowlegeTypes[]
 }
@@ -67,6 +68,7 @@ const Index = ({types}: IProps) => {
         height: "100%", // 高度自适应
       }}
     >
+      {listItems.length<=0 ? <EmptyData type={2}/> : <></>}
       <FigureList>
       {listItems.map(item => {
         return <FigureListItem

+ 5 - 3
src/pages/knowledge/components/view-style/ViewStyleListCorrection.tsx

@@ -16,8 +16,9 @@ import { useModalStore } from "@/store/modalStore";
 export interface Iprops {
   viewStyle: 'list'|'card'
   entId?: number|string
+  setData: (value: any[])=> void
 }
-const Index = ({viewStyle, entId}:Iprops) => {
+const Index = ({viewStyle, entId, setData}:Iprops) => {
   
   const [list, setList] = useState<TCorrectionItem[]>([]);
   const { showModal } = useModalStore();
@@ -38,13 +39,14 @@ const Index = ({viewStyle, entId}:Iprops) => {
     loadMore()
   }
   useDidShow(()=> {
-    // loadMore()
     refetch()
     console.log(333)
   })
   useEffect(() => {
     if (data?.data) {
-      setList([...list, ...data.data]);
+      const result = [...list, ...data.data]
+      setList(result);
+      setData(result)
     }
   }, [data]);
 

+ 2 - 32
src/pages/knowledge/index.tsx

@@ -7,47 +7,17 @@ import { useState } from "react";
 import PageCustom from "@/components/page-custom/index";
 import NavBarNormal from "@/components/nav-bar-normal/index";
 import WemetaTabs from "@/components/wemeta-tabs/index";
-import PersonalTab from './components/personal-tab'
+import PersonalTab from './components/PersonalTab'
 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";
-
 
 export default function Index() {
-  
-const agents = useAgentStore(state => state.agents)
-const entAgents = agents.filter((item)=> item.isEnt)
-
-
-
-const renderCompanyTab = ()=> {
-  if(entAgents.length){
-    return <CompanyTab/>
-  }
-  return <View className="flex-center pt-40">
-  <View className="text-center text-14 leading-28 text-gray-45 mb-44 w-172">
-    <View className="text-center text-16 leading-24 font-medium text-black">绑定企业,知识自动到位</View>
-    <View>访问公司统一知识内容</View>
-    <View>一键同步到你的智能体</View>
-    <View>提升回复效率与专业度</View>
-    <View className="button-rounded button-primary" onClick={()=> Taro.navigateTo({url: '/pages/contact-us/index'})}>联系我们</View>
-  </View>
-</View>        
-}
-
   const tabList = [
     {
       key: "1",
       label: "个人知识",
       children: <View className={style.tabContent}>
-        {/* <View className="flex flex-col pt-56 items-center">
-          <View className="data-empty"></View>
-          <View className="text-12 text-gray-45 text-center leading-24 mt-12">
-            暂无数据
-          </View>
-        </View> */}
         <PersonalTab />
       </View> ,
     },
@@ -55,7 +25,7 @@ const renderCompanyTab = ()=> {
       key: "2",
       label: "企业知识",
       children: <View className={style.tabContent}>
-          {renderCompanyTab()}
+          <CompanyTab/>
       </View>,
     },
     {

+ 0 - 9
src/pages/login/index.config.ts

@@ -1,9 +0,0 @@
-export default definePageConfig({
-  navigationBarTitleText: `${process.env.TARO_APP_NAME_TEXT}`,
-  enableShareAppMessage: true,
-  enableShareTimeline: true,
-  navigationStyle: 'custom',
-  usingComponents: {
-    
-  }
-})

+ 0 - 67
src/pages/login/index.tsx

@@ -1,67 +0,0 @@
-import NavBarNormal from "@/components/nav-bar-normal/index";
-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 { useState } from "react";
-
-import Popup from "@/components/popup/popup";
-import Taro from "@tarojs/taro";
-
-
-export default function Index() {
-  const { onGetPhoneNumber, onError, onClick, openType } = useLogin({
-    onSuccess: () => {
-      console.log('yes')
-      Taro.reLaunch({
-        url: '/pages/index/index',
-      })
-    },
-  })
-  
-
-
-  const [showPopup, setShowPopup] = useState(true);
-  const [checked, setChecked] = useState(false);
-
-  const handleChecked = () => {
-    setChecked(prev => !prev)
-  }
-
-  const renderLogo = ()=> {
-    return <View><Image className="w-68 h-24" src={LogoImage}></Image></View>
-  }
-  
-
-  return (
-    <PageCustom>
-      <NavBarNormal leftColumn={renderLogo}></NavBarNormal>
-      
-        
-        <Popup setShow={setShowPopup} show={showPopup} showCloseButton={false}>
-          <View className="text-24 font-medium leading-32 text-black mb-16">欢迎来到小蓝本</View>
-          <View className="text-gray-45 text-14 leading-22 mb-70">登录后享受更好的服务体验</View>
-          <Button
-            disabled={!checked}
-            className="button-rounded-big mb-16"
-            style={{backgroundColor: '#317CFA', fontSize: '14px'}}
-            type='primary'
-            openType={openType}
-            onGetPhoneNumber={onGetPhoneNumber}
-            onError={onError}
-            onClick={() => {
-              onClick()
-            }}
-          >
-            手机号快捷登录
-          </Button>
-          <View className="flex items-center justify-center text-12 mb-86 text-center">
-            <View className="flex-center text-gray-45 gap-8" onClick={handleChecked}><WemetaRadio checkbox checked={checked}></WemetaRadio>同意</View>
-            <Text className="primary-color">《用户隐私条款》</Text><Text className="primary-color">《用户服务须知》</Text>
-          </View>
-        </Popup>
-    </PageCustom>
-  );
-}

+ 11 - 0
src/pages/personal/components/MenuLabel.tsx

@@ -0,0 +1,11 @@
+import { View } from "@tarojs/components";
+export interface MenuLabelProps {
+  children: string|JSX.Element|JSX.Element[]
+}
+
+const MenuLabel = ({ children }: MenuLabelProps) => {
+  
+  return <View className="text-14 py-18 font-medium leading-22">{children}</View>
+}
+
+export default MenuLabel;

+ 9 - 0
src/pages/personal/index.config.ts

@@ -0,0 +1,9 @@
+export default definePageConfig({
+  navigationBarTitleText: '我的',
+  "usingComponents": {},
+  "navigationStyle": 'custom',
+  backgroundColor: '#F4F9FF',
+  enableShareAppMessage: true,
+  enableShareTimeline: true,
+  enablePageMeta: true,
+})

+ 9 - 0
src/pages/personal/index.module.less

@@ -0,0 +1,9 @@
+.nickname{
+  flex:1;
+  height: 32px;
+  font-family: PingFangSC-Semibold;
+  font-weight: 600;
+  font-size: 24px;
+  color: #111A34;
+  line-height: 32px; 
+}

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

@@ -0,0 +1,168 @@
+import PageCustom from "@/components/page-custom/index";
+import NavBarNormal from "@/components/nav-bar-normal";
+
+import { View, Input, Image } from "@tarojs/components";
+import Logo from "@/components/logo";
+import AvatarDefault from "@/components/AvatarDefault";
+import { useEffect, useState } from "react";
+import CardList from "@/components/list/card-list";
+import CardListItem from "@/components/list/card-list-item";
+import IconArrowRight24 from "@/components/icon/IconArrowRight24";
+import IconAccount from "@/images/svgs/personal/IconAccount.svg";
+import IconPrivacy from "@/images/svgs/personal/IconPrivacy.svg";
+import IconAgreement from "@/images/svgs/personal/IconAgreement.svg";
+import IconFeedback from "@/images/svgs/personal/IconFeedback.svg";
+import IconDesktop from "@/images/svgs/personal/IconDesktop.svg";
+import style from "./index.module.less";
+import MenuLabel from "./components/MenuLabel";
+import { navToWebView } from "@/utils/index";
+import Taro from "@tarojs/taro";
+import { getSysAgreements, type TAgreementItem } from "@/service/system";
+import { isSuccess } from "@/utils";
+import { useIsLogin } from '@/xiaolanbenlib/hooks/data/useAuth'
+
+import LoginPopup from '@/components/LoginPopup/index'
+
+export default function Index() {
+  // const name = "";
+  const isLogin = useIsLogin()
+  const [agreements, setAgreements] = useState<TAgreementItem[]>([])
+
+  const [showPopup, setShowPopup] = useState(false)
+
+  const fetchPageData = async () => {
+    const response = await getSysAgreements('register')
+    if(isSuccess(response.status)){
+      setAgreements(response.data)
+    }
+  }
+
+  useEffect(()=> {
+    fetchPageData()
+  }, [])
+
+
+  const handleClick = () => {
+    if(!isLogin){
+      setShowPopup(true)
+    }
+  }
+  
+
+  // 自定义背景样式
+  const handleNicknameChange = async (e: any) => {
+    const nickname = e.detail.value.trim();
+    if (nickname) {
+      console.log();
+    }
+  };
+
+  const IconArrowRight = () => {
+    return (
+      <View className="flex items-center">
+        <IconArrowRight24 />
+      </View>
+    );
+  };
+
+  const getIcon = (name: string)=> {
+    if(name === '用户协议'){
+      return IconAgreement
+    }
+    if(name === '隐私政策'){
+      return IconPrivacy
+    }
+  }
+
+  return (
+    <PageCustom>
+      <NavBarNormal leftColumn={Logo}></NavBarNormal>
+      <View className="w-full px-16 py-24 flex flex-col gap-16">
+        <View className="flex items-center w-full gap-12 mb-16">
+          <View className="w-60 h-60">
+            <AvatarDefault />
+          </View>
+          <View className={style.nickname} onClick={handleClick}>
+            { isLogin ? '已登录': '立即登录' }
+          </View>
+          {/* <Input
+            type="nickname"
+            defaultValue={name}
+            placeholder="您的昵称"
+            placeholder-style="color: #111A34"
+            className={style.nickname}
+            onConfirm={(e) => {
+              handleNicknameChange(e);
+            }}
+            onBlur={(e) => {
+              handleNicknameChange(e);
+            }}
+          ></Input> */}
+        </View>
+        
+        <CardList>
+          <CardListItem
+            className="pl-16 pr-8"
+            underline
+            rightRenderer={IconArrowRight}
+            leftRenderer={() => (
+              <Image src={IconAccount} className="w-28 h-28" mode="widthFix" />
+            )}
+            onClick={() => {
+              Taro.navigateTo({ url: "/pages/account/index" });
+            }}
+          >
+            <MenuLabel>账号管理</MenuLabel>
+          </CardListItem>
+          <>
+          {agreements.map( item => {
+            return <CardListItem
+                className="pl-16 pr-8"
+                underline
+                rightRenderer={IconArrowRight}
+                leftRenderer={() => (
+                  <Image src={getIcon(item.name)} className="w-28 h-28" mode="widthFix" />
+                )}
+                onClick={() => {
+                  navToWebView(item.link)
+                }}
+              >
+                <MenuLabel>{item.name}</MenuLabel>
+              </CardListItem>
+          })}
+          </>
+        </CardList>
+
+        <CardList>
+          <CardListItem
+            className="pl-16 pr-8"
+            underline
+            rightRenderer={IconArrowRight}
+            leftRenderer={() => (
+              <Image src={IconFeedback} className="w-28 h-28" mode="widthFix" />
+            )}
+            onClick={() => {
+              // Taro.navigateTo({ url: "/pages/voice/index" });
+            }}
+          >
+            <MenuLabel>意见反馈</MenuLabel>
+          </CardListItem>
+          <CardListItem
+            className="pl-16 pr-8"
+            underline
+            rightRenderer={IconArrowRight}
+            leftRenderer={() => (
+              <Image src={IconDesktop} className="w-28 h-28" mode="widthFix" />
+            )}
+            onClick={() => {
+              
+            }}
+          >
+            <MenuLabel>将智能体添加到桌面</MenuLabel>
+          </CardListItem>
+        </CardList>
+      </View>
+      <LoginPopup showPopup={showPopup} setShowPopup={setShowPopup}></LoginPopup>
+    </PageCustom>
+  );
+}

+ 0 - 78
src/pages/profile/components/InitView/index.tsx

@@ -1,78 +0,0 @@
-import { useEffect, useState } from "react";
-import { View,Image } from "@tarojs/components";
-import Taro, { useDidShow, useReady } from "@tarojs/taro";
-import NavBarNormal from "@/components/nav-bar-normal/index";
-import LogoImage from '@/images/logo.png'
-import PageCustom from "@/components/page-custom/index";
-import { UserInfoResponse } from '@/xiaolanbenlib/api/auth'
-import { onLogout, useIsLogin } from '@/xiaolanbenlib/hooks/data/useAuth'
-import refreshUserId, { clearUserInfo, getOpenIdAsync } from '@/xiaolanbenlib/utils/auth'
-
-import WelcomeTips from '../WelcomeTips/index'
-import { useAgentStore } from '@/store/agentStore'
-import { useSystemStore } from '@/store/systemStore'
-import { TAgent } from "@/types/agent";
-import { useUserStore } from "@/store/userStore";
-interface Iprops {
-  setDefault: (agent: TAgent) => void
-}
-export default function Index({setDefault}: Iprops) {
-
-  const [userInfo, setUserInfo] = useState<UserInfoResponse>()
-  const isLogin = useIsLogin()
-
-  const {fetchAgents} =  useAgentStore()
-  const { getSysCoreCnf } =  useSystemStore()
-  const { getMyInfo } = useUserStore()
-
-  async function initUserInfo() {
-    await refreshUserId()
-      .then( async (value) => {
-        setUserInfo(value)
-        getOpenIdAsync().then((openId) => {
-          console.log('🚀 ~ getOpenIdAsync ~ value:', openId)
-        })
-      })
-      .catch((error) => {
-        if (error.message === 'unauthorized' || error.code === 401) {
-          Taro.showToast({
-            title: '未登录',
-            icon: 'none',
-            duration: 2000,
-          })
-        }
-      })
-    await getSysCoreCnf()
-    await getMyInfo()
-    const agents = await fetchAgents()
-    const agent = agents.find( item=> item.isDefault)
-    if(agent){
-      setDefault(agent)
-    }
-  }
-
-  useEffect(() => {
-    if (isLogin) {
-      initUserInfo()
-    }
-  }, [isLogin])
-  
-
-  const renderLogo = ()=> {
-    return <View><Image className="w-68 h-24" src={LogoImage}></Image></View>
-  }
-
-  return (
-    <PageCustom>
-      <NavBarNormal leftColumn={renderLogo}></NavBarNormal>
-      <View className="relative w-full">
-        <WelcomeTips>
-          <View className="flex items-center">
-            <View>{userInfo?.logo && <Image className="w-24 h-24" src={userInfo?.logo}></Image>}</View>
-            <View>{isLogin ? `已登录「${userInfo?.nickName}」` : '未登录'}</View>
-          </View>      
-        </WelcomeTips>
-      </View>
-      </PageCustom>
-  );
-}

+ 0 - 59
src/pages/profile/components/WelcomeTips/index.module.less

@@ -1,59 +0,0 @@
-.container{
-  width: 100%;
-  padding: 12px;
-  position: fixed;
-  bottom: 16px;
-  left: 0;
-  right: 0;
-  // display: flex;
-  // box-sizing: border-box;
-  // flex-direction: column;
-  // justify-content: flex-end;
-}
-.hello {
-  padding-left: 12px;
-  margin-bottom: 10px;
-  font-family: PingFang SC;
-  font-weight: 500;
-  font-size: 24px;
-  line-height: 32px;
-  color: #000;
-}
-
-.welcome {
-  padding-left: 12px;
-  margin-bottom: 54px;
-  font-family: PingFang SC;
-  font-weight: 400;
-  font-size: 12px;
-  line-height: 20px;
-
-}
-
-.box {
-  margin-bottom: 20px;
-  border-radius: 12px;
-  padding: 20px;
-  background-color: white;
-}
-
-.boxInner {
-  margin-bottom: 20px;
-  padding: 12;
-  border-radius: 8px;
-  background-color: rgba(var(--primary-color, .1));
-}
-
-.headline {
-  margin-bottom: 10px;
-  font-weight: 500;
-  font-size: 16px;
-  line-height: 24px;
-}
-
-.list {
-  padding-bottom: 38px;
-  font-weight: 400;
-  font-size: 14px;
-  line-height: 22px;
-}

+ 0 - 77
src/pages/profile/components/WelcomeTips/index.tsx

@@ -1,77 +0,0 @@
-import { View } from "@tarojs/components";
-import style from "./index.module.less";
-import Taro from "@tarojs/taro";
-
-import { getAgents, getAgent, createAgent, } from "@/service/agent";
-
-import { isSuccess } from "@/utils";
-
-export default function Index({children}) {
-  
-  const saveAgent = async () => {
-    const res = await createAgent()
-    console.log(res)
-    Taro.navigateTo({url: '/pages/agent-gen/index'})
-  }
-  const test = ()=> {
-    
-  }
-  const go = async () => {
-    const response = await getAgents()
-    const res = await createAgent()
-    
-    if(isSuccess(res.status)){
-      console.log(response, 'gogogo')
-    }
-    
-    // return 
-    // saveAgent({
-    //   address: '浙江杭州余杭文一西路1700号',
-    //   avatarUrl: 'https://cdn.wehome.cn/cmn/png/53/META-H8UKWHWU-2JNUAG2BARJF55VHU9QS3-YBQGHDAM-IW.png',
-    //   email: '',
-    //   enabledChatBg: false,
-    //   enabledPersonalKb: false,
-    //   "entId": '',
-    //   "entName": '',
-    //   "greeting": '',
-    //   "isDefault": true,
-    //   "isEnt": false,
-    //   "isNewEnt": false,
-    //   "isSystemVoice": true,
-    //   "mobile": '18658870618',
-    //   "name": 'xiaodong',
-    //   "personality": '一名疯瘨的数码博主',
-    //   "position": 'CEO',
-    //   "qrCodeUrl": '',
-    //   "questionGuides": ['想要了解相机?', '想要了解手机?'],
-    //   // "voice": ''
-    // })
-    
-  }
-
-
-  
-
-  return (
-    <View className={style.container}>
-      <View className={style.hello}>你好</View>      
-      <View>{children}</View>
-      <View className={style.welcome}>欢迎你,小蓝本的第39293位用户</View>
-      <View className={style.box}>
-        <View className={style.boxInner}>
-          <View className={style.headline}>
-            <View>开启你的专属 AI 分身,</View>
-            <View>让客户随时随地了解你和你的解决方案。</View>
-          </View>
-          <View className={style.list}>
-              <View>1.企业 + 个人资料统一管理</View>
-              <View>2.客户问题,AI 自动回应</View>
-              <View>3.你的内容,一页呈现</View>
-          </View>
-          <View className="button-rounded-big" onClick={go}>创建智能体</View>
-          {/* <View className="button-rounded-big" onClick={test}>test</View> */}
-        </View>
-      </View>
-      </View>
-  );
-}

+ 9 - 9
src/service/system.ts

@@ -8,15 +8,15 @@ import { TSystemCoreCnf, TSystemDefaultPageContent } from '@/types/system'
 
 
 // 获取协议列表
-export type TAgreementItem = [
-  {
-    "link": string,
-    "name": string
-  }
-]
-// type??
-export const getSysAgreements = () => {
-  return  request.get<TAgreementItem>(`${bluebookAiAgent}api/v1/sys/agreements`)
+export type TAgreementItem = {
+  "link": string,
+  "name": string
+}
+// 获取协议列表
+export const getSysAgreements = (type: 'register'|'service') => {
+  return  request.get<TAgreementItem[]>(`${bluebookAiAgent}api/v1/sys/agreements`, {
+    params: {type}
+  })
 }
 
 // 获取个人最多允许创建N个智能体、智能助手二维码照片、录音文案等核心配置

+ 3 - 0
src/utils/loadMore.ts

@@ -38,6 +38,9 @@ export const useLoadMore = <T>({url, fetcher, startId, pageIndex=1,  pageSize =
     if(data?.totalCount  === null || data?.totalCount === undefined){
       return false
     }
+    if(data?.totalCount <= 0){
+      return false
+    }
     // 如果返回的是 nextId 则没有 pageIndex 和 pageSize
     if(data?.pageIndex === undefined){
       return false

+ 1 - 1
src/xiaolanbenlib/hooks/data/useAuth.tsx

@@ -134,7 +134,7 @@ export function useIsLogin() {
     }
     if(!newState){
       
-      Taro.navigateTo({url: '/pages/login/index'})
+      // Taro.navigateTo({url: '/pages/login/index'})
     }
   }, [isLogin])
 

+ 6 - 3
src/xiaolanbenlib/module/axios.js

@@ -68,9 +68,12 @@ axiosIns.interceptors.response.use(
     }
     if (error.code === 401) {
       //   await customCallback()
-      Taro.navigateTo({
-        url: '/pages/login/index'
-      })
+      Taro.switchTab({
+        url: '/pages/personal/index',
+      });
+      // Taro.navigateTo({
+      //   url: '/pages/login/index'
+      // })
       return Promise.reject(error)
     } else if (error.code === 1020 || error.code === 1021) {
       return error