Forráskód Böngészése

添加接口修改样式

lex-xin 8 hónapja
szülő
commit
11fd73802b

+ 8 - 8
src/TUIKit/TUIComponents/container/TUIChat/manage-components/manage-notification-detail.vue

@@ -419,14 +419,14 @@ export default ManageNotification;
   .section-content {
     h2 {
       font-weight: 600;
-      font-size: 16px;
+      font-size: 14px;
       color: #333333;
       line-height: 24px;
       word-wrap: break-word;
       word-break: break-all;
     }
     .content {
-      font-size: 16px;
+      font-size: 14px;
       color: #777777;
       line-height: 24px;
       word-wrap: break-word;
@@ -459,7 +459,7 @@ export default ManageNotification;
   }
 
   p {
-    font-size: 16px;
+    font-size: 14px;
     color: #aaaaaa;
     line-height: 22px;
   }
@@ -488,7 +488,7 @@ export default ManageNotification;
   .input-title {
     display: flex;
     align-items: center;
-    font-size: 16px;
+    font-size: 14px;
     color: #333333;
     line-height: 22px;
     padding-bottom: 10px;
@@ -501,7 +501,7 @@ export default ManageNotification;
     }
     span {
       line-height: 1;
-      padding-bottom: 4px;
+      padding-bottom: 2px;
     }
   }
 
@@ -532,9 +532,9 @@ export default ManageNotification;
   background: #198cfe;
   border-radius: 8px;
   font-weight: 600;
-  font-size: 18px;
+  font-size: 14px;
   color: #ffffff;
-  line-height: 47px;
+  line-height: 42px;
   text-align: center;
   cursor: pointer;
 
@@ -560,7 +560,7 @@ export default ManageNotification;
 
   .p-item {
     margin-bottom: 8px;
-    font-size: 16px;
+    font-size: 14px;
     color: #131415;
     border-radius: 8px;
     padding: 12px 0;

+ 8 - 8
src/TUIKit/TUIComponents/container/TUIChat/manage-components/manage-notification.vue

@@ -443,14 +443,14 @@ export default ManageNotification;
   .section-content {
     h2 {
       font-weight: 600;
-      font-size: 16px;
+      font-size: 14px;
       color: #333333;
       line-height: 24px;
       word-wrap: break-word;
       word-break: break-all;
     }
     .content {
-      font-size: 16px;
+      font-size: 14px;
       color: #777777;
       line-height: 24px;
       word-wrap: break-word;
@@ -483,7 +483,7 @@ export default ManageNotification;
   }
 
   p {
-    font-size: 16px;
+    font-size: 14px;
     color: #aaaaaa;
     line-height: 22px;
   }
@@ -512,7 +512,7 @@ export default ManageNotification;
   .input-title {
     display: flex;
     align-items: center;
-    font-size: 16px;
+    font-size: 14px;
     color: #333333;
     line-height: 22px;
     padding-bottom: 10px;
@@ -525,7 +525,7 @@ export default ManageNotification;
     }
     span {
       line-height: 1;
-      padding-bottom: 4px;
+      padding-bottom: 2px;
     }
   }
 
@@ -556,9 +556,9 @@ export default ManageNotification;
   background: #198cfe;
   border-radius: 8px;
   font-weight: 600;
-  font-size: 18px;
+  font-size: 14px;
   color: #ffffff;
-  line-height: 47px;
+  line-height: 42px;
   text-align: center;
   cursor: pointer;
 
@@ -584,7 +584,7 @@ export default ManageNotification;
 
   .p-item {
     margin-bottom: 8px;
-    font-size: 16px;
+    font-size: 14px;
     color: #131415;
     border-radius: 8px;
     padding: 12px 0;

+ 2 - 2
src/TUIKit/TUIComponents/container/TUIChat/manage-components/manage.vue

@@ -366,11 +366,11 @@ const manage = defineComponent({
           break;
         case "notificationAdd":
           case "notificationAddDetail":
-          name = '添加群公告';
+          name = '新建群公告';
           break;
         case "notificationUpdate":
         case "notificationUpdateDetail":
-          name = '修改群公告';
+          name = '编辑群公告';
           break;
         case "notificationDetail":
           name = "公告详情";

+ 1 - 1
src/TUIKit/TUIComponents/container/TUIChat/manage-components/style/web.scss

@@ -45,7 +45,7 @@
       }
 
       .icon {
-        margin-right: 14Px;
+        margin-right: 5Px;
         background-position: center;
       }
 

+ 6 - 5
src/TUIKit/TUIComponents/container/TUIChat/plugin-components/replies/replies-item.vue

@@ -5,7 +5,7 @@
       <main class="message-area">
         <div class="message-area-title">
           <label class="name">
-            {{ isRoot ? message.nameCard || message.nick || message.from : message.messageSender }}
+            {{ isRoot ? message.nameCard || message.nick || message.from : message.messageSenderName || message.messageSender }}
           </label>
           <label class="time">
             {{ caculateTimeago((isRoot ? message?.time : message?.messageTime) * 1000) }}
@@ -63,7 +63,7 @@ import { JSONToObject } from '../../utils/utils'
 import constant from "../../../constant";
 import TIM from "../../../../../TUICore/tim/index";
 import { eventGlobal } from "@/helpers";
-import { imGroupNoticeDetail } from "../../../../../api";
+// import { imGroupNoticeDetail } from "../../../../../api";
 const RepliesItem = defineComponent({
   props: {
     message: {
@@ -98,7 +98,6 @@ const RepliesItem = defineComponent({
        const {
         payload
       } = props.message;
-      console.log(payload, 'payload')
       data.isCustom = payload?.data || ' ';
       data.isCustom = JSONToObject(payload?.data);
       data.isH5 = props.isH5;
@@ -107,6 +106,7 @@ const RepliesItem = defineComponent({
         data.url = `https://web.sdk.qcloud.com/im/assets/face-elem/${data.message?.payload?.data}@2x.png`;
       }
 
+      console.log(props.message, '----------------- ')
     });
 
     const handleNotice = async () => {
@@ -163,6 +163,7 @@ export default RepliesItem;
     }
     .content {
       font-size: 14Px;
+      padding: 0 !important;
       color: #131415;
       line-height: 24px;
       .content-title {
@@ -245,7 +246,7 @@ export default RepliesItem;
       }
     }
     .content {
-      padding: 12px;
+      padding: 12px 0 0;
       font-weight: 400;
       font-size: 14px;
       color: #000000;
@@ -254,7 +255,7 @@ export default RepliesItem;
       word-break: break-all;
       width: fit-content;
       &-in {
-        background: #f2f2f2;
+        background: #fff;
         border-radius: 0px 10px 10px 10px;
         .message-img,
         .message-videoimg {

+ 9 - 2
src/TUIKit/TUIComponents/container/TUIChat/plugin-components/replies/replies.vue

@@ -38,6 +38,7 @@ import { Message } from '../../interface';
 import TIM from '../../../../../TUICore/tim';
 import RepliesItem from './replies-item.vue';
 import { JSONToObject } from '../../utils/utils';
+import { imUserFriendBatchFriend } from "../../../../../api";
 const ReadReceiptDialog = defineComponent({
   type: 'custom',
   components: {
@@ -115,18 +116,24 @@ const ReadReceiptDialog = defineComponent({
       close();
     });
 
-    const handleReplies = (message: Message) => {
+    const handleReplies = async (message: Message) => {
       try {
         const { cloudCustomData } = message;
         if (!cloudCustomData) return;
         const cloudCustomObject = JSONToObject(cloudCustomData);
         data.replies = cloudCustomObject?.messageReplies?.replies;
-        data?.replies?.forEach((item: any) => {
+        data?.replies?.forEach(async (item: any) => {
           const { messageID, messageSender } = item;
           const message = data.messageList.find((item: Message) => 
             (item.ID === messageID || item.from === messageSender)
           );
           item.avatar = message ? (message as Message)?.avatar : '';
+          try {
+            const res = await imUserFriendBatchFriend({ imUserIds: [messageSender] })
+            item.messageSenderName = res.data[0]?.friendNickname || res.data[0]?.imUserId
+          } catch {
+            // 
+          }
         });
       } catch (err) {
         console.log(err);

+ 9 - 0
src/TUIKit/api.ts

@@ -145,3 +145,12 @@ export const imGroupDismiss = (params?: any) => {
     data: params,
   });
 };
+
+/**
+ * 即时通讯 - 用户信息
+ */
+export const imUserFriendBatchFriend = (params?: any) => {
+  return request.post(api + "/imUserFriend/batchFriend", {
+    data: params,
+  });
+};