guhongwei 4 years ago
parent
commit
ad75a7d008
2 changed files with 13 additions and 3 deletions
  1. 8 0
      src/store/market/market.js
  2. 5 3
      src/views/hall/direct.vue

+ 8 - 0
src/store/market/market.js

@@ -18,6 +18,14 @@ const actions = {
     });
     return res;
   },
+  async operaQuery({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.operaInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
   async operaFetch({ commit }, { skip = 0, limit, ...info } = {}) {
     const res = await this.$axios.$get(`${api.operaInfo}`, {
       skip,

+ 5 - 3
src/views/hall/direct.vue

@@ -502,7 +502,7 @@ export default {
   },
   methods: {
     ...mapProduct({ mapProductQuery: 'newquery' }),
-    ...market({ marketFetch: 'fetch', operaFetch: 'operaFetch', sendMsg: 'operationCreate' }),
+    ...market({ marketFetch: 'fetch', operaFetch: 'operaFetch', sendMsg: 'operationCreate', operaQuery: 'operaQuery' }),
     ...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
     ...expertsuser({ expertQuery: 'query' }),
     ...transaction({ tquery: 'query' }),
@@ -577,8 +577,10 @@ export default {
         val.date = date;
       }
       // 同时在线
-      let tszx = jioayi.data.filter(f => f.type == '0');
-      if (tszx) this.$set(this.statNum, `tszx`, tszx.length);
+      let tszx = await this.operaQuery({ type: '0' });
+      if (tszx) {
+        this.$set(this.statNum, `tszx`, tszx.total);
+      }
       this.$set(this, `lunboList`, jioayi.data.reverse());
       // 展会动态结束
       let zxzd = await this.danceQuery({ dock_id: this.dock_id });