guhongwei 4 lat temu
rodzic
commit
91bee8196b
2 zmienionych plików z 43 dodań i 9 usunięć
  1. 8 4
      src/store/market/market.js
  2. 35 5
      src/views/hall/direct.vue

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

@@ -18,12 +18,16 @@ const actions = {
     });
     return res;
   },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.userInfo}`, payload);
+  async operaFetch({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.operaInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
     return res;
   },
-  async operaFetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.operaInfo}/${payload}`);
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.userInfo}`, payload);
     return res;
   },
   async fetch({ commit }, payload) {

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

@@ -51,7 +51,29 @@
                   <div class="box">
                     <div class="con1" ref="con1" :class="{ anim: animate == true }" @mouseenter="mEnter" @mouseleave="mLeave">
                       <el-col class="lunboList" :span="24" v-for="(item, index) in lunboList" :key="index">
-                        <p>{{ item.market_username }}在{{ item.created_time }}{{ item.username }}{{ item.status }}</p>
+                        <p>
+                          <span>{{ item.type == '0' ? '欢迎' : '祝贺' }}</span>
+                          <span v-if="item.type == '0'">测试人</span>
+                          <span v-if="item.type == '1'">{{ item.market_username }}</span>
+                          <span>在</span>
+                          <span>{{ item.meta | getDate }}</span>
+                          <span v-if="item.type == '1'">和</span>
+                          <span v-if="item.type == '1'">{{ item.username }}</span>
+                          <span v-if="item.type == '1'">{{
+                            item.status == '0'
+                              ? '正在洽谈'
+                              : item.status == '1'
+                              ? '达成意向'
+                              : item.status == '2'
+                              ? '交易完成'
+                              : item.status == '3'
+                              ? '取消交易'
+                              : item.status == '4'
+                              ? '交易待确定'
+                              : '暂无'
+                          }}</span>
+                          <span v-if="item.type == '0'">位临现场</span>
+                        </p>
                       </el-col>
                     </div>
                   </div>
@@ -623,11 +645,9 @@ export default {
       this.$set(this, `directlist`, newjysk);
       // 展会动态
       // 登录情况+交易情况
-      let jioayi = await this.operaFetch(this.dock_id);
+      let jioayi = await this.operaFetch({ dockid: this.dock_id });
       console.log(jioayi);
-      // let jioayiData = jioayi.apply.map(item => item.transdata);
-      // jioayiData = _.flattenDeep(jioayiData);
-      // this.$set(this, `lunboList`, jioayiData);
+      this.$set(this, `lunboList`, jioayi.data);
       // 展会动态结束
       let zxzd = await this.danceQuery({ dock_id: this.dock_id });
       this.$set(this, `zxzdlist`, zxzd.data);
@@ -766,6 +786,16 @@ export default {
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  filters: {
+    getDate(meta) {
+      let createdAt = _.get(meta, `createdAt`);
+      let date = new Date(createdAt)
+        .toLocaleDateString()
+        .replace('/', '-')
+        .replace('/', '-');
+      return date;
+    },
+  },
 };
 </script>