소스 검색

fix: shareKey 编码

王晓东 6 일 전
부모
커밋
ec8dab84fb

+ 0 - 14
project.private.config.json

@@ -8,20 +8,6 @@
   "condition": {
     "miniprogram": {
       "list": [
-        {
-          "name": "pages/profile/index",
-          "pathName": "pages/profile/index",
-          "query": "agentId=e_d4426640dca3-6719d6aYig5s-agent_435",
-          "scene": null,
-          "launchMode": "default"
-        },
-        {
-          "name": "pages/profile/index",
-          "pathName": "pages/profile/index",
-          "query": "agentId=p_8e726e825bagi5Ki-agent_1001",
-          "launchMode": "default",
-          "scene": null
-        },
         {
           "name": "pages/contact/index",
           "pathName": "pages/contact/index",

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

@@ -140,11 +140,11 @@ export default ({ show, setShow }: IProps) => {
         <>
           <View className="pt-12 relative">
             <View className={style.tabContainer}>
-              <View className="pb-52">
+              <View className="pb-66">
                 {renderPersonalAgents()}
               </View>
             </View>
-            <View className="absolute left-0 right-0 bottom-0 z-10 bg-white">
+            <View className="absolute left-0 right-0 bottom-0 z-10 bg-white pt-14">
               <View className="button-rounded button-primary-light gap-8 mb-15" onClick={handleCreate}>
                 <IconPlusBlue />
                 <View>创建新的智能体</View>

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

@@ -4,6 +4,10 @@
   padding: 12px 16px;
   background-color: white;
   gap: 10px;
+  border-top-left-radius: 16px;
+  border-top-right-radius: 2px;
+  border-bottom-right-radius: 16px;
+  border-bottom-left-radius: 16px;
 }
 .avatarContainer{
   width: 24px;
@@ -29,7 +33,6 @@
   display: flex;
   justify-content: flex-end;
   padding: 12px 16px;
-  border-radius: 16px;
   background: var(--color-primary);
 }
 .messageMeRich{
@@ -45,7 +48,7 @@
 .messageContent{
   font-size: 15px;
   line-height: 28px;
-  color: #111A34;
+  color: white;
   word-break: break-all;
   font-family: PingFang SC;
 }

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

@@ -135,7 +135,7 @@ export default ({
           data?.layout === "center" ? "justify-center" : ""
         } truncate`}
       >
-        <Text className="block truncate">{data?.text ? data?.text : data?.link}</Text>
+        <Text className="block truncate">{data?.text ? data?.text : (data?.link ?  data?.link: data.placeholder)}</Text>
         
       </View>
     );

+ 2 - 1
src/components/custom-share/shareUtils.ts

@@ -15,9 +15,10 @@ export const getSharePromise = async (agentId:string, shareTitle: string, tmpIma
   const response = await getAgentShareInfo(agentId);
   console.log('share:', response)
   if( isSuccess(response.status) ){
+    const encodeShareKey = encodeURIComponent(response.data.shareKey??"")
     const o = {
       title: shareTitle,
-      path: `/pages/profile/index?agentId=${agentId}&shareKey=${response.data.shareKey}`,
+      path: `/pages/profile/index?agentId=${agentId}&shareKey=${encodeShareKey}`,
       imageUrl: tmpImage,
       promise: response,
     };

+ 1 - 1
src/pages/chat/components/input-bar/TextInputBar.tsx

@@ -22,7 +22,7 @@ export default ({disabled, onIconClick, onSend}:Props) => {
     setValue('')
   }
   const iconMic = ()=> {
-    return <View onClick={onIconClick}><IconMic /></View>
+    return <View className="flex-center" onClick={onIconClick}><IconMic /></View>
   }
   return <>
     

+ 1 - 0
src/pages/chat/components/input-bar/index.module.less

@@ -15,4 +15,5 @@
   background: url(https://cdn.wehome.cn/cmn/gif/199/META-H8UKVHWU-KIGP3BIL7M5AYC6XHNUA2-OSAK6A2M-72.gif) center center no-repeat;
   background-size: 124px 27px;
   background-color: #000;
+  background-color: var(--color-primary);
 }

+ 2 - 2
src/pages/chat/components/personal-card/index.tsx

@@ -19,11 +19,11 @@ export default ({size='large', agent}:IProps) => {
         </View>
         <View className="flex flex-col flex-1 gap-4">
           <View className="flex items-center gap-4">
-            <View className="text-12 font-medium leading-12">{agent?.name}</View>
+            <View className="text-12 font-medium leading-12 text-white">{agent?.name}</View>
             {agent?.isEnt && <View className="text-12 leading-12"><IconCertificateColor/></View>}
           </View>
           {agent?.entId && <View className="flex items-center gap-2">
-            <View className="text-12 leading-12 truncate max-w-[180px]">
+            <View className="text-12 leading-12 truncate max-w-[180px] text-white">
               {agent?.entName}
             </View>
           </View>}

+ 2 - 1
src/pages/index/components/WelcomeTips/index.module.less

@@ -75,7 +75,8 @@
   width: 100%;
   height: 184px;
   margin-bottom: 16px;
-  background-image: linear-gradient(45deg, #f2fcff 0%, #EBF5FF 49%, #E2EAFF 100%);
+  background-image: linear-gradient(1deg, #f2fcff00 0%, #EBF5FF 49%, #E2EAFF 100%);
+  
   border-radius: 8px;
 }
 

+ 4 - 0
src/store/agentStore.ts

@@ -123,6 +123,10 @@ export const useAgentStore = create<AgentStoreState>((set, get) => ({
   },
   // 请求无需登录的 getAgent 接口
   fetchAgentProfile: async (agentId: string, shareKey?:string) => {
+    if(shareKey){
+      shareKey = decodeURIComponent(shareKey)
+      console.log(shareKey,33333)
+    }
     const response = await _getAgent(agentId, shareKey);
     const result = isSuccess(response.status)
     const agent = response.data