lex hace 2 años
padre
commit
6b381e2276

+ 2 - 2
src/layout/components/AppMain.vue

@@ -234,7 +234,7 @@ export default {
     //   this.$refs.instructions.showInstructions();
     // },
     gotoSet(guide) {
-      console.log();
+      // console.log();
       this.$router.push({ path: guide.path });
       this.guideVisible = false;
     },
@@ -263,7 +263,7 @@ export default {
       }
     },
     openDetail(row) {
-      console.log(row);
+      // console.log(row);
       this.activeRow = row;
       this.innerDrawer = true;
       this.$nextTick(res => {

+ 1 - 1
src/layout/components/components/message-list.vue

@@ -110,7 +110,7 @@ export default {
       this.myProfile = null;
     });
 
-    console.log(core.currentConversation, "core.currentConversation");
+    // console.log(core.currentConversation, "core.currentConversation");
     if (core.currentConversation) {
       this.handleSwitchConversation(core.currentConversation);
     }

+ 14 - 14
src/layout/components/fullPageIns.vue

@@ -16,7 +16,7 @@
       :docY="docY"
       :videoSrc="videoSrc"
       @isResizing="
-        (val) => {
+        val => {
           this.isResizing = val;
         }
       "
@@ -27,7 +27,7 @@
 import videoView from "./insVideo";
 export default {
   components: {
-    videoView,
+    videoView
   },
   data() {
     return {
@@ -38,8 +38,8 @@ export default {
       docY: "",
       isShow: false,
       showVideo: false,
-      isResizing:false,
-      src:""
+      isResizing: false,
+      src: ""
     };
   },
   mounted() {
@@ -62,11 +62,11 @@ export default {
       if (this.isShow) {
         this.isShow = false;
         this.initSize();
-        this.$nextTick((res) => {
+        this.$nextTick(res => {
           this.isShow = true;
         });
       }
-    },
+    }
   },
   computed: {
     // key() {
@@ -80,24 +80,24 @@ export default {
     iframeHeight() {
       return this.h - 30 + "px";
     },
-    videoSrc(){
-      return  this.src
+    videoSrc() {
+      return this.src;
     }
   },
   watch: {
     isShow(val) {
       if (val) {
-        this.$nextTick((res) => {
+        this.$nextTick(res => {
           let outFrame = this.$refs.iframe;
           let outFrameWindow = this.$refs.iframe.contentWindow;
-          console.log(outFrame)
-          setTimeout((res) => {
+          // console.log(outFrame)
+          setTimeout(res => {
             let rightFrame = outFrameWindow.document.querySelector(
               "#mainFrame"
             );
             rightFrame.contentWindow.document.addEventListener(
               "click",
-              (e) => {
+              e => {
                 let path = (e.composedPath && e.composedPath()) || e.path || [];
                 if (path.length > 0) {
                   for (let i in path) {
@@ -127,8 +127,8 @@ export default {
           }, 500);
         });
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 25 - 12
src/layout/components/modal/chat-model.vue

@@ -27,7 +27,12 @@
           <i
             class="el-icon-user"
             :class="active === 'contacts' && 'active'"
-            @click="active = 'contacts'"
+            @click="
+              () => {
+                firstLoad = true;
+                active = 'contacts';
+              }
+            "
           ></i>
         </el-tooltip>
         <el-tooltip
@@ -46,7 +51,12 @@
             t="1660637972073"
             class="icon icon-class"
             :class="active === 'class' && 'active'"
-            @click="active = 'class'"
+            @click="
+              () => {
+                firstLoad = true;
+                active = 'class';
+              }
+            "
             viewBox="0 0 1024 1024"
             version="1.1"
             xmlns="http://www.w3.org/2000/svg"
@@ -74,16 +84,18 @@
           ref="conversationList"
           v-show="active === 'conversation'"
         />
-        <contacts-list
-          ref="contactsList"
-          v-show="active === 'contacts'"
-          @select="onSelect"
-        />
-        <class-list
-          ref="classList"
-          v-show="active === 'class'"
-          @select="onSelect"
-        />
+        <template v-if="firstLoad">
+          <contacts-list
+            ref="contactsList"
+            v-show="active === 'contacts'"
+            @select="onSelect"
+          />
+          <class-list
+            ref="classList"
+            v-show="active === 'class'"
+            @select="onSelect"
+          />
+        </template>
       </el-aside>
       <!-- 判断是否有会话 -->
       <el-container
@@ -140,6 +152,7 @@ export default {
     return {
       emptyImg: require("../imkit/images/no-conversation.svg"),
       active: "conversation", // 会话 conversation; 联系人 contacts; 班级 class
+      firstLoad: false, // 是否加载了一次
       isConnect: false, // 连接中
       currentConversation: {
         channelId: "",

+ 2 - 2
src/layout/components/modal/chat.js

@@ -39,7 +39,7 @@ const getInitData = async list => {
         tempItem.portraitUri =
           item.conversationType === 1 ? teacherLogo : groupLogo;
       }
-      console.log({ ...item, ...tempItem }, "tempItem");
+      // console.log({ ...item, ...tempItem }, "tempItem");
       temp.push({ ...item, ...tempItem });
     });
     return temp;
@@ -116,7 +116,7 @@ export const custom_service = {
           portraitUri: item.user.avatar || teacherLogo
         };
       });
-      console.log(groupMembers, "groupMembers");
+      // console.log(groupMembers, "groupMembers");
       return Promise.resolve(groupMembers);
     } catch {
       //