Browse Source

更新打包

lex 1 year ago
parent
commit
293d0d1e76

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-08ff6c66.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-7c1e9ff9.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-fa8d6cac.css


+ 2 - 2
dist/index.html

@@ -6,8 +6,8 @@
   <link rel="icon" type="image/svg+xml" href="./vite.svg" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>IM</title>
-  <script type="module" crossorigin src="./assets/index-2b51f2d6.js"></script>
-  <link rel="stylesheet" href="./assets/index-08ff6c66.css">
+  <script type="module" crossorigin src="./assets/index-7c1e9ff9.js"></script>
+  <link rel="stylesheet" href="./assets/index-fa8d6cac.css">
 </head>
 
 <body>

+ 31 - 8
src/TUIKit/TUIComponents/container/TUIGroup/index.vue

@@ -49,6 +49,9 @@
         <img class="emptyImg" src="../../assets/nomore.png" />
         <p>暂无数据</p>
       </div>
+      <DialogTUI :show="dialogShow" :isHeaderShow="true" title="提示" :is-footer-show="true" @submit="handleManage()" @update:show="(e) => (dialogShow = e)">
+        <p>该群已解散,是否删除?</p>
+      </DialogTUI>
     </div>
   </div>
 </template>
@@ -56,11 +59,12 @@
 import { computed, defineComponent, onMounted, reactive, toRefs } from "vue";
 import { caculateTimeago } from "../utils";
 import { handleAvatar, handleName, handleAt } from "../TUIChat/utils/utils";
-import { imGroupPage } from "../../../api";
+import { imGroupPage, imGroupDetail } from "../../../api";
 import { useThrottleFn } from "@vueuse/core";
+import DialogTUI from "../../components/dialogTUi/index.vue";
 const TUIGroup = defineComponent({
   name: "TUIGroup",
-  // components: { TheEmpty, TheSearch },
+  components: { DialogTUI },
   props: {
     displayOnlineStatus: {
       type: Boolean,
@@ -81,6 +85,8 @@ const TUIGroup = defineComponent({
       currentGroup: null,
       netWork: "",
       userStatusList: new Map(),
+      dialogShow: false,
+      dialogItem: {} as any,
     });
 
     const handleItemTime = (time: number) => {
@@ -91,13 +97,29 @@ const TUIGroup = defineComponent({
     };
 
     const handleListItem = async (item: any) => {
-      const name = `GROUP${item.groupId}`;
-      TUIServer.TUICore.TUIServer.TUIConversation.getConversationProfile(name).then((imResponse: any) => {
-        // 通知 TUIConversation 添加当前会话
-        TUIServer.TUICore.TUIServer.TUIConversation.handleCurrentConversation(imResponse.data.conversation);
+      try {
+        // 判断群是否存在
+        const res = await imGroupDetail({ id: item.groupId });
+        // 判断是否有群
+        if (res.data?.id) {
+          const name = `GROUP${item.groupId}`;
+          TUIServer.TUICore.TUIServer.TUIConversation.getConversationProfile(name).then((imResponse: any) => {
+            // 通知 TUIConversation 添加当前会话
+            TUIServer.TUICore.TUIServer.TUIConversation.handleCurrentConversation(imResponse.data.conversation);
 
-        (data.currentGroup as any) = {};
-      });
+            (data.currentGroup as any) = {};
+          });
+        } else {
+          data.dialogShow = true;
+          data.dialogItem = item;
+        }
+      } catch (e) {
+        //
+      }
+    };
+    const handleManage = () => {
+      const index = data.groupList.findIndex((item: any) => item.groupId == data.dialogItem.groupId);
+      data.groupList.splice(index, 1);
     };
     const isNetwork = computed(() => {
       // const disconnected =
@@ -154,6 +176,7 @@ const TUIGroup = defineComponent({
     return {
       ...toRefs(data),
       handleListItem,
+      handleManage,
       isNetwork,
       handleAvatar,
       handleName,

+ 7 - 0
src/TUIKit/api.ts

@@ -55,3 +55,10 @@ export const imGroupNoticeUpdate = (params?: object) => {
     data: params,
   });
 };
+
+/**
+ * 即时通讯 - 详情
+ */
+export const imGroupDetail = (params?: any) => {
+  return request.get(api + "/imGroup/detail/" + params.id);
+};

+ 8 - 0
src/style.css

@@ -103,6 +103,14 @@ button:focus-visible {
   padding: 10px 0 0;
 }
 
+* {
+  padding: 0;
+  margin: 0;
+  border: 0;
+  box-sizing: border-box;
+  color: #333;
+}
+
 /* 搜索框前面放大镜样式重置 */
 .icon-search-input {
   display: inline-block;

Some files were not shown because too many files changed in this diff