chenparty
2021-09-26 24cfd2e7e5d9982eda688eaab4d64540d3ef1f9b
修正首次打开页面报请求失败的提示

mediaServerChoose获取到之前,执行updateData, 会导致getAllSession函数获取不到mediaServerChoose。
1个文件已修改
4 ■■■ 已修改文件
web_src/src/components/control.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_src/src/components/control.vue
@@ -137,15 +137,13 @@
    mounted() {
        this.initTable();
        this.updateData();
        this.chartInterval = setInterval(this.updateData, 3000);
        this.mediaServer.getOnlineMediaServerList((data)=>{
          this.mediaServerList = data.data;
          if (this.mediaServerList && this.mediaServerList.length > 0) {
            this.mediaServerChoose = this.mediaServerList[0].id
            this.loadCount = this.mediaServerList[0].count;
            this.getThreadsLoad();
            this.getAllSession();
            this.updateData();
          }
        })
    },