浏览代码

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-test

guhongwei 5 年之前
父节点
当前提交
a45487f472
共有 1 个文件被更改,包括 15 次插入9 次删除
  1. 15 9
      src/views/hallList/index.vue

+ 15 - 9
src/views/hallList/index.vue

@@ -10,8 +10,10 @@
             <p>
               <span class="textOver" @click="turnTo(item)">{{ item.title }}</span
               ><span class="textOver">
-                <el-link :underline="false" :href="`/static/liveIndex.html?id=${item.id}`" target="_blank" class="duijie">进入对接会</el-link>
-                <el-link :underline="false" @click="apply(item.id)" class="duijie"> 申请对接会 </el-link></span
+                <el-link :underline="false" :href="`/static/liveIndex.html?id=${item.id}`" target="_blank" class="duijie" v-if="canIn(item)">
+                  进入对接会
+                </el-link>
+                <el-link :underline="false" @click="apply(item.id)" class="duijie" v-if="canJoin(item)"> 申请对接会 </el-link></span
               >
             </p>
           </el-col>
@@ -67,12 +69,9 @@ export default {
   methods: {
     ...dock({ dockQuery: 'query' }),
     async searchList({ skip = 0, limit = 10, ...info } = {}) {
-      console.log('ccc');
-
-      let res = await this.dockQuery({});
+      let res = await this.dockQuery({ is_allowed: 1 });
       this.$set(this, `pageTotal`, res.total);
       console.log(res.data);
-
       if (res.errcode === 0) {
         this.$set(this, `hangyeList`, res.data);
       }
@@ -86,16 +85,23 @@ export default {
     },
 
     handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
       this.limit = 5;
       this.initList({ skip: (val - 1) * this.limit, limit: this.limit });
     },
 
     turnTo(item) {
-      console.log('a');
-
       this.$router.push({ path: '/live/hallDetail', query: { id: item.id } });
     },
+    canIn(data) {
+      let nowTime = new Date().getTime();
+      let start_time = new Date(data.start_time).getTime();
+      return start_time >= nowTime && data.status != 2;
+    },
+    canJoin(data) {
+      let nowTime = new Date().getTime();
+      let join_end = new Date(data.join_end).getTime();
+      return join_end < nowTime && data.status != 2;
+    },
   },
 };
 </script>