Browse Source

Merge branch 'kt-20240909'

lex-xin 8 tháng trước cách đây
mục cha
commit
d1ab9bae88

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

@@ -117,7 +117,7 @@
       </div>
       <div class="input-section">
         <div class="input-title input-slider">
-          <span>设为置顶</span>
+          <span>设为置顶</span>
 
           <Slider :open="topFlag" @change="onTopFlag" />
         </div>
@@ -231,10 +231,20 @@ const ManageNotification = defineComponent({
             id: item.id,
           });
           getNotification();
+          TUIMessage({
+            message: item.topFlag ? '取消置顶成功' : '设为置顶成功',
+            isH5: false,
+            type: "success",
+          });
         } else if (type === "delete") {
           await imGroupNoticeRemove({
             id: item.id,
           });
+          TUIMessage({
+            message: '删除成功',
+            isH5: false,
+            type: "success",
+          });
           ctx.emit("changeStatus", "deleteDetail");
         } else if (type === "add") {
           data.isEdit = true;
@@ -278,6 +288,11 @@ const ManageNotification = defineComponent({
           });
         }
 
+        TUIMessage({
+          message: '发布成功',
+          isH5: false,
+          type: "success",
+        });
         data.isEdit = false;
         ctx.emit("changeStatus", "submitDetail");
         data.page = 1;
@@ -506,18 +521,18 @@ export default ManageNotification;
     font-size: 14px;
     color: #333333;
     font-weight: 600;
-    line-height: 22px;
+    line-height: 20px;
     padding-bottom: 10px;
     .iconNotifit1,
     .iconNotifit2 {
-      width: 22px;
-      height: 22px;
+      width: 20px;
+      height: 20px;
       margin-right: 6px;
       flex-shrink: 0;
     }
     span {
       line-height: 1;
-      padding-bottom: 5px;
+      padding-bottom: 2px;
     }
   }
 

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

@@ -131,7 +131,7 @@
       </div>
       <div class="input-section">
         <div class="input-title input-slider">
-          <span>设为置顶</span>
+          <span>设为置顶</span>
 
           <Slider :open="topFlag" @change="onTopFlag" />
         </div>
@@ -251,13 +251,22 @@ const ManageNotification = defineComponent({
           });
           data.page = 1;
           data.groupList = [];
-          getNotification();
+          TUIMessage({
+            message: item.topFlag ? '取消置顶成功' : '设为置顶成功',
+            isH5: false,
+            type: "success",
+          });
         } else if (type === "delete") {
           await imGroupNoticeRemove({
             id: item.id,
           });
           data.page = 1;
           data.groupList = [];
+          TUIMessage({
+            message: '删除成功',
+            isH5: false,
+            type: "success",
+          });
           getNotification();
         } else if (type === "add") {
           data.isEdit = true;
@@ -292,6 +301,7 @@ const ManageNotification = defineComponent({
             content: data.input,
             id: data.id,
           });
+          
         } else {
           await imGroupNoticeSave({
             groupId: data.groupProfile.groupID,
@@ -301,6 +311,12 @@ const ManageNotification = defineComponent({
           });
         }
 
+        TUIMessage({
+          message: '发布成功',
+          isH5: false,
+          type: "success",
+        });
+
         data.isEdit = false;
         ctx.emit("changeStatus", "submit");
         data.page = 1;
@@ -529,18 +545,18 @@ export default ManageNotification;
     font-size: 14px;
     color: #333333;
     font-weight: 600;
-    line-height: 22px;
+    line-height: 20px;
     padding-bottom: 10px;
     .iconNotifit1,
     .iconNotifit2 {
-      width: 22px;
-      height: 22px;
+      width: 20px;
+      height: 20px;
       margin-right: 6px;
       flex-shrink: 0;
     }
     span {
       line-height: 1;
-      padding-bottom: 5px;
+      padding-bottom: 2px;
     }
   }
 

+ 8 - 1
src/TUIKit/TUIComponents/container/TUIChat/utils/utils.ts

@@ -63,7 +63,14 @@ export function handleReferenceForShow(message: any) {
       data.referenceMessageType = 1;
       break;
     case TIM.TYPES.MSG_CUSTOM:
-      data.referenceMessageForShow = "[自定义消息]";
+      const { payload } = message;
+      const isCom = payload.data ? JSONToObject(payload.data) : {};
+      if(isCom.businessID === 'TC_GROUP_NOTICE') {
+        data.referenceMessageForShow = "[群公告]";
+      } else {
+        data.referenceMessageForShow = "[自定义消息]";
+      }
+       
       data.referenceMessageType = 2;
       break;
     case TIM.TYPES.MSG_IMAGE: