guhongwei 4 år sedan
förälder
incheckning
b1006f115b

+ 2 - 0
src/store/index.js

@@ -4,6 +4,7 @@ import marketproduct from '@common/store/market/marketproduct';
 import expertsuser from '@common/store/market/exportuser';
 import maarkettype from '@common/store/market/markettype';
 import authUser from './user/auth-user';
+import dock from '@common/store/live/dock';
 
 Vue.use(Vuex);
 
@@ -16,5 +17,6 @@ export default new Vuex.Store({
     expertsuser,
     maarkettype,
     authUser,
+    dock,
   },
 });

+ 52 - 6
src/views/userCenter/dock/index.vue

@@ -6,7 +6,24 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          展会管理
+          <el-col :span="24" class="one">
+            <van-tabs v-model="active" animated>
+              <van-tab>
+                <template #title>
+                  <van-icon name="live" />
+                  <p>下期直播</p>
+                </template>
+                <nextList :nextLive="nextLive"></nextList>
+              </van-tab>
+              <van-tab>
+                <template #title>
+                  <van-icon name="live" />
+                  <p>已往直播</p>
+                </template>
+                <alreadyList></alreadyList>
+              </van-tab>
+            </van-tabs>
+          </el-col>
         </el-col>
       </el-col>
     </el-row>
@@ -15,11 +32,17 @@
 
 <script>
 import NavBar from '@/layout/common/topInfo.vue';
+import nextList from './parts/nextList.vue';
+import alreadyList from './parts/alreadyList.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
+    nextList, //下期直播
+    alreadyList, //已往直播
   },
   data: () => ({
     // 头部标题
@@ -28,10 +51,24 @@ export default {
     isleftarrow: '',
     // 返回
     navShow: true,
+    // 标签
+    active: '1',
+    // 下期直播
+    nextLive: [],
   }),
-  created() {},
+  created() {
+    this.searchList();
+  },
   computed: {},
-  methods: {},
+  methods: {
+    ...dock({ dockQuery: 'query' }),
+    async searchList({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.dockQuery({ skip, limit, status: 0, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `nextLive`, res.data);
+      }
+    },
+  },
   mounted() {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
@@ -55,8 +92,17 @@ export default {
 .main {
   min-height: 570px;
 }
-.foot {
-  position: absolute;
-  bottom: 0;
+/deep/.van-tab {
+  text-align: center;
+}
+/deep/.van-tabs--line .van-tabs__wrap {
+  height: 70px;
+  margin: 0 0 10px 0;
+}
+/deep/.van-tab--active {
+  color: red;
+}
+.van-icon {
+  font-size: 20px;
 }
 </style>

+ 30 - 0
src/views/userCenter/dock/parts/alreadyList.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="alreadyList">
+    <p>以往直播</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'alreadyList',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 72 - 0
src/views/userCenter/dock/parts/nextList.vue

@@ -0,0 +1,72 @@
+<template>
+  <div id="nextList">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="list" v-for="(item, index) in nextLive" :key="index">
+          <el-col :span="4" class="left">
+            <i class="el-icon-video-camera-solid"></i>
+          </el-col>
+          <el-col :span="20" class="right">
+            <p>{{ item.title }}</p>
+            <p>开始时间:{{ item.start_time }}</p>
+            <p>报名截止时间:{{ item.join_end }}</p>
+            <p>{{ item.desc }}</p>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'nextList',
+  props: {
+    nextLive: null,
+  },
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.list {
+  padding: 0 15px;
+  background-color: #fff;
+  border-bottom: 1px solid red;
+  .left {
+    padding: 15px 0;
+    text-align: center;
+    i {
+      font-size: 18px;
+    }
+  }
+  .right {
+    font-size: 14px;
+    color: #666;
+    p:first-child {
+      color: #000;
+    }
+    p:nth-child(2) {
+    }
+    p:nth-child(3) {
+    }
+    p:nth-child(4) {
+    }
+  }
+}
+</style>

+ 27 - 31
src/views/userCenter/myProduct/index.vue

@@ -6,35 +6,33 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <el-col :span="24" class="main">
-            <el-col :span="24" class="one">
-              <van-tabs v-model="active" animated>
-                <van-tab>
-                  <template #title>
-                    <van-icon name="todo-list" />
-                    <p>草稿</p>
-                  </template>
-                  <caogaoList></caogaoList>
-                </van-tab>
-                <van-tab>
-                  <template #title>
-                    <van-icon name="column" />
-                    <p>待审核</p>
-                  </template>
-                  <noauditList></noauditList>
-                </van-tab>
-                <van-tab>
-                  <template #title>
-                    <van-icon name="label" />
-                    <p>审核成功</p>
-                  </template>
-                  <auditList></auditList>
-                </van-tab>
-              </van-tabs>
-            </el-col>
-            <el-col :span="24" class="two">
-              <van-button type="primary" @click="$router.push({ path: '/userCenter/myProduct/detail' })">发布产品</van-button>
-            </el-col>
+          <el-col :span="24" class="one">
+            <van-tabs v-model="active" animated>
+              <van-tab>
+                <template #title>
+                  <van-icon name="todo-list" />
+                  <p>草稿</p>
+                </template>
+                <caogaoList></caogaoList>
+              </van-tab>
+              <van-tab>
+                <template #title>
+                  <van-icon name="column" />
+                  <p>待审核</p>
+                </template>
+                <noauditList></noauditList>
+              </van-tab>
+              <van-tab>
+                <template #title>
+                  <van-icon name="label" />
+                  <p>审核成功</p>
+                </template>
+                <auditList></auditList>
+              </van-tab>
+            </van-tabs>
+          </el-col>
+          <el-col :span="24" class="two">
+            <van-button type="primary" @click="$router.push({ path: '/userCenter/myProduct/detail' })">发布产品</van-button>
           </el-col>
         </el-col>
       </el-col>
@@ -66,7 +64,6 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-
       // 标签
       active: '1',
     };
@@ -101,7 +98,6 @@ export default {
   .two {
     position: fixed;
     top: 80%;
-
     left: 10px;
     z-index: 999;
   }