guhongwei %!s(int64=4) %!d(string=hai) anos
pai
achega
a61b3abb7e
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 2 0
      src/store/index.js
  2. 3 3
      src/views/trainLive/parts/chat.vue

+ 2 - 0
src/store/index.js

@@ -20,6 +20,7 @@ import dockUser from '@common/src/store/dockUser';
 import dockChat from '@common/src/store/dock_chat';
 // 培训问诊
 import trainLive from '@common/src/store/trainLive';
+import trainchat from '@common/src/store/trainchat';
 // 交易备案
 import transaction from '@common/src/store/transaction';
 // 科技频道
@@ -63,6 +64,7 @@ export default new Vuex.Store({
     dock,
     dockUser,
     trainLive,
+    trainchat,
     channel,
     channelVideo,
     patent,

+ 3 - 3
src/views/trainLive/parts/chat.vue

@@ -44,7 +44,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
-// const { mapActions: trainchat } = createNamespacedHelpers('trainchat');
+const { mapActions: trainchat } = createNamespacedHelpers('trainchat');
 var moment = require('moment');
 import _ from 'lodash';
 export default {
@@ -61,13 +61,13 @@ export default {
     };
   },
   async created() {
-    // this.search();
+    this.search();
   },
   async mounted() {
     this.channel();
   },
   methods: {
-    // ...trainchat(['query', 'create']),
+    ...trainchat(['query', 'create']),
     async search() {
       const res = await this.query({ skip: 0, unit_id: this.liveInfo.id });
       if (this.$checkRes(res)) this.$set(this, `list`, res.data);