From 720231d33f387c6d1bf13bdef653314c5c450809 Mon Sep 17 00:00:00 2001 From: 648540858 <18010473990@163.com> Date: 星期六, 25 九月 2021 22:12:15 +0800 Subject: [PATCH] 添加发送媒体流, 添加媒体服务器节点管理ui,修复修改密码 --- web_src/src/components/service/MediaServer.js | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 1 deletions(-) diff --git a/web_src/src/components/service/MediaServer.js b/web_src/src/components/service/MediaServer.js index b905352..e9de603 100644 --- a/web_src/src/components/service/MediaServer.js +++ b/web_src/src/components/service/MediaServer.js @@ -6,10 +6,20 @@ this.$axios = axios; } - getMediaServerList(callback){ + getOnlineMediaServerList(callback){ this.$axios({ method: 'get', url:`/api/server/media_server/online/list`, + }).then(function (res) { + if (typeof (callback) == "function") callback(res.data) + }).catch(function (error) { + console.log(error); + }); + } + getMediaServerList(callback){ + this.$axios({ + method: 'get', + url:`/api/server/media_server/list`, }).then(function (res) { if (typeof (callback) == "function") callback(res.data) }).catch(function (error) { @@ -27,6 +37,49 @@ console.log(error); }); } + + checkServer(param, callback){ + this.$axios({ + method: 'get', + url:`/api/server/media_server/check`, + params: { + ip: param.ip, + port: param.httpPort, + secret: param.secret + } + }).then(function (res) { + if (typeof (callback) == "function") callback(res.data) + }).catch(function (error) { + console.log(error); + }); + } + + checkRecordServer(param, callback){ + this.$axios({ + method: 'get', + url:`/api/server/media_server/record/check`, + params: { + ip: param.ip, + port: param.recordAssistPort + } + }).then(function (res) { + if (typeof (callback) == "function") callback(res.data) + }).catch(function (error) { + console.log(error); + }); + } + + addServer(param, callback){ + this.$axios({ + method: 'post', + url:`/api/server/media_server/save`, + data: param + }).then(function (res) { + if (typeof (callback) == "function") callback(res.data) + }).catch(function (error) { + console.log(error); + }); + } } export default MediaServer; -- Gitblit v1.8.0