Browse Source

Merge remote-tracking branch 'origin/master'

liql 2 years ago
parent
commit
0614ee21f9
2 changed files with 18 additions and 5 deletions
  1. 1 1
      src/api/Dict/index.js
  2. 17 4
      src/views/SkillTraining/SkillTrainingIndex.vue

+ 1 - 1
src/api/Dict/index.js

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-11 11:34:47
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-11 11:38:02
+ * @LastEditTime: 2022-12-21 10:26:05
  * @FilePath: \veterans_client_web\src\api\Dict\index.js
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  */

+ 17 - 4
src/views/SkillTraining/SkillTrainingIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-11 17:53:41
  * @LastEditors: 空白格
- * @LastEditTime: 2022-12-20 17:48:08
+ * @LastEditTime: 2022-12-21 14:29:18
  * @FilePath: \veterans_client_web\src\views\SkillTraining\SkillTrainingIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -120,6 +120,7 @@
 import { mapState } from "vuex";
 import BannerBreadcrumb from "@/components/BannerBreadcrumb";
 import { jumpPageAuth } from "@/utils";
+import { getDictData } from "@/api/Dict";
 import {
   getClassNoticeData,
   signUpClass,
@@ -142,6 +143,7 @@ export default {
       total: 0,
       loading: false,
       learnTime: 0,
+      chatUrl: "http://localhost:8080",
     };
   },
   computed: {
@@ -153,6 +155,7 @@ export default {
   mounted() {
     this.getClassNotice();
     this.getPackageList();
+    this.getDictData();
     setTimeout(() => {
       if (this.isLogin) {
         this.getDuration();
@@ -160,6 +163,11 @@ export default {
     }, 500);
   },
   methods: {
+    getDictData() {
+      getDictData({ key: "portal_site_chat_url" }).then((res) => {
+        this.chatUrl = res?.data[0].text;
+      });
+    },
     /**
      * 获取报班通知
      * @date 2022-08-12
@@ -242,9 +250,11 @@ export default {
       this.getPackageList();
     },
     openChatPage() {
-      window.open(
-        `http://localhost:8080?userID=${this.userInfo.id}&permission=2`
-      );
+      if (this.userInfo.id) {
+        window.open(`${this.chatUrl}?userID=${this.userInfo.id}&permission=2`);
+      } else {
+        this.$message.warning('请先登录!')
+      }
     },
   },
 };
@@ -419,6 +429,9 @@ export default {
             color: #3f3f3f;
             div {
               margin: 5px 0;
+              overflow: hidden;
+              white-space: nowrap;
+              text-overflow: ellipsis;
             }
             div:last-child {
               color: #a2a2a2;