wxy hace 4 años
padre
commit
63bdfdee24
Se han modificado 5 ficheros con 122 adiciones y 37 borrados
  1. 7 0
      src/router/index.js
  2. 41 36
      src/store/index.js
  3. 64 0
      src/store/live/dock.js
  4. 0 0
      src/store/login.js
  5. 10 1
      src/views/live/index.vue

+ 7 - 0
src/router/index.js

@@ -12,6 +12,13 @@ const routes = [
     meta: { title: '首页', isleftarrow: false },
     component: () => import('../views/index.vue'),
   },
+  // 直播大厅
+  {
+    path: '/live/index',
+    name: 'live_index',
+    meta: { title: '直播大厅', isleftarrow: true },
+    component: () => import('../views/live/index.vue'),
+  },
   // // 绑定
   // {
   //   path: '/bind',

+ 41 - 36
src/store/index.js

@@ -1,24 +1,27 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
-import login from '@common/store/login';
-import marketproduct from '@common/store/market/marketproduct';
-import expertsuser from '@common/store/market/exportuser';
-import maarkettype from '@common/store/market/markettype';
-import productpact from '@common/store/market/productpact';
-import authUser from './user/auth-user';
-import dock from '@common/store/live/dock';
-import wxchattest from './user/wxchattest';
-import market from '@common/store/market/market';
-import apply from '@common/store/live/apply';
-import transaction from '@common/store/market/transaction';
-import expertsaudit from '@common/store/market/expertsaudit';
-import exportuser from '@common/store/market/exportuser';
-import user from './user';
+//直播大厅
+import dock from './live/dock';
 import place from './place';
-import onliveUser from './onlive/user';
-import gensign from './onlive/gensign';
-import room from './onlive/room';
-import chat from './chat';
+// import login from '@common/store/login';
+// import marketproduct from '@common/store/market/marketproduct';
+// import expertsuser from '@common/store/market/exportuser';
+// import maarkettype from '@common/store/market/markettype';
+// import productpact from '@common/store/market/productpact';
+// import authUser from './user/auth-user';
+// import dock from '@common/store/live/dock';
+// import wxchattest from './user/wxchattest';
+// import market from '@common/store/market/market';
+// import apply from '@common/store/live/apply';
+// import transaction from '@common/store/market/transaction';
+// import expertsaudit from '@common/store/market/expertsaudit';
+// import exportuser from '@common/store/market/exportuser';
+// import user from './user';
+// import place from './place';
+// import onliveUser from './onlive/user';
+// import gensign from './onlive/gensign';
+// import room from './onlive/room';
+// import chat from './chat';
 import * as ustate from '@/store/common/state';
 import * as umutations from '@/store/common/mutations';
 
@@ -29,25 +32,27 @@ export default new Vuex.Store({
   mutations: { ...umutations },
   actions: {},
   modules: {
-    login,
-    market,
-    marketproduct,
-    expertsuser,
-    maarkettype,
-    authUser,
-    dock,
-    wxchattest,
-    apply,
-    transaction,
-    expertsaudit,
-    productpact,
-    exportuser,
-    user,
     dock,
     place,
-    onliveUser,
-    room,
-    gensign,
-    chat,
+    // login,
+    // market,
+    // marketproduct,
+    // expertsuser,
+    // maarkettype,
+    // authUser,
+    // dock,
+    // wxchattest,
+    // apply,
+    // transaction,
+    // expertsaudit,
+    // productpact,
+    // exportuser,
+    // user,
+    // dock,
+    // place,
+    // onliveUser,
+    // room,
+    // gensign,
+    // chat,
   },
 });

+ 64 - 0
src/store/live/dock.js

@@ -0,0 +1,64 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  dockInfo: `/api/live/dock`,
+  myapplyInfo: `/api/live/dock/myapply`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
+    const res = await this.$axios.$get(api.dockInfo, { skip, limit, ...info });
+    return res;
+  },
+  async myapply({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
+    const res = await this.$axios.$get(api.myapplyInfo, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.dockInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.dockInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.dockInfo}/${id}`, { ...info });
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.dockInfo}/${payload}`);
+    return res;
+  },
+  async shenhe({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.dockInfo}/check/${id}`, data);
+    return res;
+  },
+  async updateVip({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.dockInfo}/updatevipuser/${id}`, data);
+    return res;
+  },
+  async createvipuser({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.dockInfo}/createvipuser/${id}`, data);
+    return res;
+  },
+  async updateGood({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.dockInfo}/goods/${id}`, data);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 0 - 0
src/store/login.js


+ 10 - 1
src/views/live/index.vue

@@ -6,7 +6,12 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <liveList></liveList>
+          <!-- <liveList></liveList> -->
+          <el-tabs v-model="activeName" @tab-click="handleClick" stretch>
+            <el-tab-pane label="正在直播" name="first">正在直播</el-tab-pane>
+            <el-tab-pane label="下期预告" name="second">下期预告</el-tab-pane>
+            <el-tab-pane label="往期直播" name="third">往期直播</el-tab-pane>
+          </el-tabs>
         </el-col>
         <el-col :span="24" class="foot">
           <footInfo></footInfo>
@@ -38,6 +43,7 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
+      activeName: 'second',
     };
   },
   created() {
@@ -53,6 +59,9 @@ export default {
       console.log(user);
       this.setUser(user);
     },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
   },
   computed: {
     ...mapState(['user']),