Browse Source

解决切换屏幕信号源消失的bug之前的一次提交

liuwei 4 years ago
parent
commit
583e5d1988
2 changed files with 17 additions and 39 deletions
  1. 4 16
      src/renderer/components/BigShow.vue
  2. 13 23
      src/renderer/components/Login.vue

+ 4 - 16
src/renderer/components/BigShow.vue

@@ -69,10 +69,7 @@
                         {
                             "src": "rtmp://58.200.131.2:1935/livetv/hunantv",
                             "type": "rtmp/flv"
-                        },/*{
-                            "src": "rtmp://58.200.131.2:1935/livetv/cctv1",
-                            "type": "rtmp/flv"
-                        }*/,
+                        }
                     ],
                     aspectRatio: '482:224',
                     techOrder: ['flash'],
@@ -188,6 +185,9 @@
 
             // 大屏初始化
             async initBigScreen() {
+                let bigscreenObj = this.$store.state.bigScreenObj
+                console.log(bigscreenObj)
+                
                 // 加载大屏json文件
                 const bigScreenJson = await getStaticFile('EnityBigScreen.Data')
                 // 过滤出显示的大屏
@@ -319,15 +319,3 @@
 </script>
 
 
-
-
-
-
-
-
-
-
-
-
-
-

+ 13 - 23
src/renderer/components/Login.vue

@@ -104,30 +104,20 @@
                     return
                 }
                 const userInfo = {name: username, password}
-
-                // 将user保存到vuex的state,同时保存到本地
-                this.$store.dispatch('saveUser', userInfo)
-                // 保存记住用户名和密码的状态
-                storageUtils.saveStatus(this.check)
-                // 将token保存到会议存储
-                // storageUtils.saveToken(res.token)
-                // 跳转到管理界面
-                this.$router.replace('/admin')
-
                 // 请求登录
-                // const res = await reqLogin(userInfo, 'login')
-                // if (res.token) {
-                //     // 将user保存到vuex的state,同时保存到本地
-                //     this.$store.dispatch('saveUser', userInfo)
-                //     // 保存记住用户名和密码的状态
-                //     storageUtils.saveStatus(this.check)
-                //     // 将token保存到会议存储
-                //     storageUtils.saveToken(res.token)
-                //     // 跳转到管理界面
-                //     this.$router.replace('/admin')
-                // } else {
-                //     this.$message.error('用户名或密码错误!')
-                // }
+                const res = await reqLogin(userInfo, 'login')
+                if (res.token) {
+                    // 将user保存到vuex的state,同时保存到本地
+                    this.$store.dispatch('saveUser', userInfo)
+                    // 保存记住用户名和密码的状态
+                    storageUtils.saveStatus(this.check)
+                    // 将token保存到会议存储
+                    storageUtils.saveToken(res.token)
+                    // 跳转到管理界面
+                    this.$router.replace('/admin')
+                } else {
+                    this.$message.error('用户名或密码错误!')
+                }
             },
 
             // 重置表单