瀏覽代碼

修改样式

lex-xin 8 月之前
父節點
當前提交
a9c4a60213

+ 16 - 1
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;

+ 18 - 2
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;

+ 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: