From 6484f52e4624f9c2dbd03443080adf6db6b800b4 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 07 二月 2023 20:59:33 +0800 Subject: [PATCH] 同时支持打包为Jar和War --- web_src/src/components/service/MediaServer.js | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/web_src/src/components/service/MediaServer.js b/web_src/src/components/service/MediaServer.js index e9de603..a2f306c 100644 --- a/web_src/src/components/service/MediaServer.js +++ b/web_src/src/components/service/MediaServer.js @@ -9,17 +9,17 @@ getOnlineMediaServerList(callback){ this.$axios({ method: 'get', - url:`/api/server/media_server/online/list`, - }).then(function (res) { + url:`./api/server/media_server/online/list`, + }).then((res) => { if (typeof (callback) == "function") callback(res.data) - }).catch(function (error) { + }).catch((error) => { console.log(error); }); } getMediaServerList(callback){ this.$axios({ method: 'get', - url:`/api/server/media_server/list`, + url:`./api/server/media_server/list`, }).then(function (res) { if (typeof (callback) == "function") callback(res.data) }).catch(function (error) { @@ -30,7 +30,7 @@ getMediaServer(id, callback){ this.$axios({ method: 'get', - url:`/api/server/media_server/one/` + id, + url:`./api/server/media_server/one/` + id, }).then(function (res) { if (typeof (callback) == "function") callback(res.data) }).catch(function (error) { @@ -41,7 +41,7 @@ checkServer(param, callback){ this.$axios({ method: 'get', - url:`/api/server/media_server/check`, + url:`./api/server/media_server/check`, params: { ip: param.ip, port: param.httpPort, @@ -57,7 +57,7 @@ checkRecordServer(param, callback){ this.$axios({ method: 'get', - url:`/api/server/media_server/record/check`, + url:`./api/server/media_server/record/check`, params: { ip: param.ip, port: param.recordAssistPort @@ -72,7 +72,7 @@ addServer(param, callback){ this.$axios({ method: 'post', - url:`/api/server/media_server/save`, + url:`./api/server/media_server/save`, data: param }).then(function (res) { if (typeof (callback) == "function") callback(res.data) @@ -80,6 +80,20 @@ console.log(error); }); } + + delete(id, callback) { + this.$axios({ + method: 'delete', + url:`./api/server/media_server/delete`, + params: { + id: id + } + }).then(function (res) { + if (typeof (callback) == "function") callback(res.data) + }).catch(function (error) { + console.log(error); + }); + } } export default MediaServer; -- Gitblit v1.8.0