guhongwei 4 лет назад
Родитель
Сommit
bc1a28ce3c
2 измененных файлов с 10 добавлено и 1 удалено
  1. 9 1
      src/layout/kjpdCenter/menuInfo.vue
  2. 1 0
      src/store/live/channel.js

+ 9 - 1
src/layout/kjpdCenter/menuInfo.vue

@@ -16,11 +16,17 @@
             </el-menu-item>
             <el-menu-item index="2">
               <template slot="title">
-                <i class="el-icon-notebook-1"></i>
+                <i class="el-icon-video-camera-solid"></i>
                 <span>视频管理</span>
               </template>
             </el-menu-item>
             <el-menu-item index="3">
+              <template slot="title">
+                <i class="el-icon-refresh-right"></i>
+                <span>进入频道</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="4">
               <template slot="title">
                 <i class="el-icon-circle-close"></i>
                 <span>退出登录</span>
@@ -56,6 +62,8 @@ export default {
     // 菜单跳转
     async selectMenu(key) {
       if (key == '3') {
+        this.$router.push({ path: '/kjpdhall/index', query: { id: this.user.id } });
+      } else if (key == '4') {
         this.logout();
         this.$message({
           message: '退出登录成功',

+ 1 - 0
src/store/live/channel.js

@@ -40,6 +40,7 @@ const actions = {
   async login({ commit, dispatch }, { user, router, path = '/', needReturn = false, typeCheck = false, isWx = false, needNotice = true }) {
     let res = await this.$axios.$post(`${api.logininfo}`, user);
     if (res.errcode == '0') {
+      localStorage.setItem('user', JSON.stringify(res.data));
       commit('setUser', res.data, { root: true });
       Notification({
         title: '登录成功',